Scope quantization-config served-id inference to Qwen3.6-27B#77
Open
wwadge wants to merge 1 commit into
Open
Conversation
The config.json quantization layout (Q4 weights with a Q8 head, flat Q8, etc.) is shared across many MLX builds, so it cannot identify the model family on its own. _public_model_id_from_metadata was using it as the last-resort signal and unconditionally returning one of the mtplx-qwen36-27b-* ids, so a third-party artifact like Qwen3.6-35B-A3B-4bit-MTPLX-Optimized-Speed was being served as mtplx-qwen36-27b-optimized-quality on /v1/models. Gate that fallback on _public_model_id_from_name already identifying the folder as a Qwen3.6-27B MTPLX variant. Explicit metadata fields (public_model_id, served_model_id, model_id, precision_variant, artifact_role, verified_on.model) still take precedence, so the existing "runtime metadata before folder name" behavior is preserved. Unknown folders now fall through to the basename-sanitized id, e.g. qwen3.6-35b-a3b-4bit-mtplx-optimized-speed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
|
I had trouble serving 35b via --model, this fixed it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_public_model_id_from_metadatawas treating theconfig.jsonquantization layout (e.g. Q4 weights with a Q8 head) as proof the model was a Qwen3.6-27B MTPLX artifact, so unrelated third-party builds got served under one of themtplx-qwen36-27b-*ids on/v1/models.mtplx serve --model .../samuelfaj/Qwen3.6-35B-A3B-4bit-MTPLX-Optimized-Speedwas returning{"id":"mtplx-qwen36-27b-optimized-quality", ...}._public_model_id_from_namealready identifying the folder as a Qwen3.6-27B MTPLX variant. Explicit metadata fields (public_model_id,served_model_id,model_id,precision_variant,artifact_role,verified_on.model) still take precedence, so the existing "runtime metadata before folder name" behavior is preserved. Unknown folders fall through to the basename-sanitized id (qwen3.6-35b-a3b-4bit-mtplx-optimized-speed).Test plan
pytest tests/test_default_models.py(all 42 tests pass, including the new regression covering the third-party 35B-A3B Q4/Q8 case)pytest tests/test_public_cli.py::test_quality_model_ref_uses_quality_public_model_id tests/test_public_cli.py::test_legacy_optimized_model_ref_uses_neutral_public_model_id tests/test_public_cli.py::test_explicit_model_id_wins_over_loaded_artifact_identitymtplx serve --model .../Qwen3.6-35B-A3B-4bit-MTPLX-Optimized-Speedand confirm/v1/modelsreportsqwen3.6-35b-a3b-4bit-mtplx-optimized-speed.🤖 Generated with Claude Code