Skip to content

[AMD] Strip auto_map from Quark export for Phi-4 support#2374

Open
poganesh wants to merge 1 commit intomicrosoft:mainfrom
poganesh:fix/quark-0.11-phi-4-support
Open

[AMD] Strip auto_map from Quark export for Phi-4 support#2374
poganesh wants to merge 1 commit intomicrosoft:mainfrom
poganesh:fix/quark-0.11-phi-4-support

Conversation

@poganesh
Copy link
Copy Markdown
Contributor

@poganesh poganesh commented Mar 27, 2026

Describe your changes

Workaround for Quark export not copying auxiliary files referenced by auto_map in config.json. For example, Phi-4-mini-instruct config references configuration_phi3.py and modeling_phi3.py via auto_map, but Quark doesn't include these files in the output causing onnxruntime_genai builder to fail when loading model.

Workaround until fixed in quark: strip auto_map from exported config.json post-export when trust_remote_code=False. This is safe because transformers natively supports these models via model_type (e.g., phi3) without needing custom code files. No impact on other models, it's a no-op if auto_map isn't present.

@poganesh poganesh changed the title Strip auto_map from Quark export for Phi-4 support [AMD] Strip auto_map from Quark export for Phi-4 support Mar 27, 2026
@poganesh
Copy link
Copy Markdown
Contributor Author

@xieofxie, @jambayk - This PR adds support for Phi-4-mini-instruct in Olive, with a workaround in Quark 0.11.

Could you please help review it.

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