Skip to content

Add an environment variable to support calling flaggems attention interface - #283

Closed
ZenithJoyH wants to merge 0 commit into
flagos-ai:mainfrom
ZenithJoyH:main
Closed

Add an environment variable to support calling flaggems attention interface#283
ZenithJoyH wants to merge 0 commit into
flagos-ai:mainfrom
ZenithJoyH:main

Conversation

@ZenithJoyH

@ZenithJoyH ZenithJoyH commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PR Category

OP

PR Type

Description

Add an environment variable(VLLM_FL_USE_FLAGGEMS_ATTN) to support calling flaggems attention interface

Related Issues

Changes

Add an environment variable(VLLM_FL_USE_FLAGGEMS_ATTN) to support calling flaggems attention interface

Testing

在NV和平头哥上设置VLLM_FL_USE_FLAGGEMS_ATTN=1进行了minicpm5模型的精度测试无精度问题(math_500&mmlu_pro_other)

Checklist

  • I have run the existing tests and they pass
  • I have added tests for my changes (if applicable)
  • I have updated the documentation (if applicable)

@github-actions github-actions Bot added the core label Jul 15, 2026
raise ValueError("use_sparse=True requires use_mla=True.")
# TODO: return "vllm_fl.dispatch.backends.flaggems.impl.attention.AttentionFLBackend"

use_flaggems_attn = os.environ.get(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add device check , if nvidia or ppu, use_flaggems_attn=true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Returns:
Fully qualified class path string
"""
import os

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move import to the top of file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

use_flaggems_attn = True

if use_flaggems_attn:
return "vllm_fl.dispatch.backends.flaggems.impl.attention.AttentionFLBackend"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add log to show call flaggems attn

@ZenithJoyH ZenithJoyH Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants