Skip to content

fix: convert grouped-expert fc1 bias together with its FP8 scale - #227

Open
shiaho777 wants to merge 1 commit into
modelscope:mainfrom
shiaho777:fix/expert-fc1-bias-with-scale
Open

shiaho777 wants to merge 1 commit into
modelscope:mainfrom
shiaho777:fix/expert-fc1-bias-with-scale

Conversation

@shiaho777

Copy link
Copy Markdown
Contributor

Loading linear_fc1 for local experts aborted when add_bias_linear and a block scale were both set. The weight path already reads gate_up_proj_scale_inv, and the bias path already copies gate_up_proj_bias with hf_scale_inv left empty. The assert was the only thing keeping the two apart. Export already writes the bias and the scale as separate tensors.

The assert now only requires a local expert. A non-expert fc1 bias is still refused, because that layout is not converted here.

flake8 is clean on gpt_bridge.py.

Loading linear_fc1 for local experts aborted when add_bias_linear and a block scale were both set. The weight path already reads gate_up_proj_scale_inv, and the bias path already copies gate_up_proj_bias with hf_scale_inv left empty. The assert was the only thing keeping the two apart. Export already writes the bias and the scale as separate tensors.

The assert now only requires a local expert. A non-expert fc1 bias is still refused, because that layout is not converted here.

flake8 is clean on gpt_bridge.py.
@hjh0119

hjh0119 commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Which model actually encountered this issue?

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.

2 participants