Skip to content

fix(inference): preserve index metadata when converting fp8 to bf16 - #1597

Open
loulanyue wants to merge 1 commit into
deepseek-ai:mainfrom
loulanyue:fix/preserve-model-index-metadata
Open

fix(inference): preserve index metadata when converting fp8 to bf16#1597
loulanyue wants to merge 1 commit into
deepseek-ai:mainfrom
loulanyue:fix/preserve-model-index-metadata

Conversation

@loulanyue

Copy link
Copy Markdown

Summary

In inference/fp8_cast_bf16.py, when writing the updated model.safetensors.index.json, metadata was being overwritten with an empty dict {} instead of preserving metadata from the source index (model_index.get("metadata", {})). This change preserves the original index metadata.

@qingkong66

Copy link
Copy Markdown

@loulanyue

This is clean. One line, one fix, no collateral damage.

The issue is real — losing metadata during conversion can break downstream tools that rely on the index file. Preserving it from the source index is the correct behavior.

This is the kind of PR that doesn't get much attention but saves someone debugging time later.

— qingkong66

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