Skip to content

feat: support text_encoder for flux2#1452

Open
wang-shuibin wants to merge 2 commits into
jd-opensource:mainfrom
wang-shuibin:my-clean-branch
Open

feat: support text_encoder for flux2#1452
wang-shuibin wants to merge 2 commits into
jd-opensource:mainfrom
wang-shuibin:my-clean-branch

Conversation

@wang-shuibin
Copy link
Copy Markdown

Compared with the side of MindIE SD, it has been verified that the precision of the text encoder on the xLLM side reaches 99.99%.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds NPU support for Mistral and Mistral3 models, including the necessary decoder layer implementations, weight loaders, and model registration. The reviewer identified critical issues regarding hardcoded absolute file paths and debugging torch::save calls that must be removed before production. Additionally, several violations of the repository style guide were noted, including incorrect naming conventions for member variables and constants, the use of non-fixed-width integers, redundant virtual keywords, and the use of relative include paths.

Comment thread xllm/models/llm/npu/mistral.h Outdated
Comment thread xllm/models/llm/npu/mistral3.h Outdated
Comment thread xllm/core/layers/npu/loader/mistral_decoder_loader.h Outdated
Comment thread xllm/core/layers/npu/loader/mistral_decoder_loader.h Outdated
Comment thread xllm/core/layers/npu/loader/mistral_decoder_loader.h Outdated
Comment thread xllm/core/layers/npu/npu_mistral_decoder_layer_impl.h Outdated
Comment thread xllm/core/layers/npu/npu_mistral_decoder_layer_impl.h Outdated
Comment thread xllm/core/layers/npu/loader/mistral_decoder_loader.cpp Outdated
Comment thread xllm/core/layers/npu/npu_mistral_decoder_layer_impl.cpp Outdated
Comment thread xllm/core/layers/npu/npu_mistral_decoder_layer_impl.cpp Outdated
Copy link
Copy Markdown
Author

@wang-shuibin wang-shuibin left a comment

Choose a reason for hiding this comment

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

This PR adapts text_encoder(Mistral3 model) for the Flux2 model, and completes the accuracy verification. Compared with the side of MindIE SD, it has been verified that the precision of the text encoder on the xLLM side reaches 99.99%.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant