Skip to content

Conversation

@wly-115
Copy link
Collaborator

@wly-115 wly-115 commented Oct 29, 2025

feat:
1.support Qwen3-VL.
2.Qwen3-VL-MOE is currently not supported.

const ParallelArgs& parallel_args) {
param.hasSharedExpert = (args.n_shared_experts() > 0);
param.hasSharedExpertGate = true;
param.hasSharedExpertGate = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

other qwen models will be effected by this modification.

const int local_index = expert_index % num_experts_per_partition_;
const bool is_sharded = shard_map.count(index);

std::lock_guard<std::mutex> lock(experts_mutex_);
Copy link
Collaborator

Choose a reason for hiding this comment

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

as above


void load_model(std::unique_ptr<ModelLoader> loader,
std::string prefix = "" /*llm model weight prefix*/) {
std::string prefix = "model." /*llm model weight prefix*/) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: all models has the prefix model. ?

It seems that the llm_head does not have this prefix.

lm_head_->load_state_dict(
            state_dict->get_dict_with_prefix(prefix + "lm_head."));

return embed_tokens_(input_ids, 0);
#elif defined(USE_MLU)
return embed_tokens_(input_ids);
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Defensive programming is needed here.

#else
    LOG(FATAL) << "...." 

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

@liutongxuan liutongxuan changed the title feat: support Qwen3-VL. feat: support Qwen3-VL model on npu device. Nov 4, 2025
@liutongxuan liutongxuan merged commit 3028d49 into jd-opensource:main Nov 4, 2025
5 of 6 checks passed
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.

3 participants