Skip to content

[Feat] add bf16 sft to mxfp4 conversion #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

yiakwy-xpu-ml-framework-team

Add bf16 SFT to mxfp4 conversion

Currently the model can runs in either bf16 (group-wise fp8 is also possible) data type in H800/H100 or mxfp4 data type in Blackwell.

After sft the GPT-OSS model and injecting the new identity, we need to convert the model back to MXFP4 to reduce model size when loading weights from HBM with 4-bit IO (in H800, the model will be converted back to bf16 in runtime).

Verification of correctness

We checked the model end-to-end and compared fp4 weight values par-to-par:

bf16_to_mxfp4

@dkundel-openai
Copy link
Collaborator

Hey @yiakwy-xpu-ml-framework-team thanks for your contribution. We'd recommend putting this script alongside the tool you are using for SFT. Will close this PR but thank you for your contribution

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