Skip to content

Remove production checkpoint revision gates - #676

Merged
justinchuby merged 1 commit into
mainfrom
justinchuby-remove-production-revision-pin
Aug 27, 2026
Merged

justinchuby merged 1 commit into
mainfrom
justinchuby-remove-production-revision-pin

Conversation

@justinchuby

Copy link
Copy Markdown
Member

Summary

  • restore standard Hugging Face revision behavior for Transformers builds: omitted revisions remain omitted and explicit refs pass through unchanged
  • remove Qwen4Exp GGUF repository, revision, filename, size, and LFS identity gates
  • keep GGUF payload handling fail-closed based on detected architecture and metadata/tensor layout, with immutable source pins retained only as evidence
  • add regressions for default and arbitrary explicit revision forwarding across config and FP8 weight loaders

Validation

  • python -m pytest src/mobius/integrations/transformers/_builder_test.py src/mobius/integrations/gguf/_qwen4_exp_test.py src/mobius/models/qwen4_exp_test.py -q --tb=short
  • python -m pytest tests/cli_test.py src/mobius/integrations/_weight_loading_test.py src/mobius/integrations/compressed_tensors/_loader_test.py src/mobius/integrations/transformers/_builder_test.py src/mobius/integrations/gguf/_qwen4_exp_test.py -q --tb=short
  • python -m pytest tests/build_graph_test.py tests/cli_test.py src/ -q -k "not phi4mm and not apply_weights_unknown" --tb=short
  • lintrunner f --output oneline --all-files
  • independent code review: no findings

Restore normal Hugging Face revision semantics for Transformers builds and route Qwen4Exp GGUF fail-closed checks by detected architecture and tensor contract instead of repository, revision, or shard identity. Keep immutable checkpoint details in tests and evidence documentation only.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
@justinchuby
justinchuby requested review from a team and a lite review from Copilot August 27, 2026 14:55
@github-actions

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 91225ed → efa4524

Model Sub-model Changes Status
qwen model 0 ⚪
qwen (static-cache) model 0 ⚪

No architecture changes detected. ✅


Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed)

@github-actions

Copy link
Copy Markdown

Performance Comparison

Comparing 91225ed → efa4524

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0% ⚪
bert (feature-extraction) num_nodes 68 68 +0.0% ⚪
falcon model_size_bytes 364 KB 364 KB +0.0% ⚪
falcon num_nodes 66 66 +0.0% ⚪
gemma2 model_size_bytes 428 KB 428 KB +0.0% ⚪
gemma2 num_nodes 105 105 +0.0% ⚪
gpt2 model_size_bytes 324 KB 324 KB +0.0% ⚪
gpt2 num_nodes 54 54 +0.0% ⚪
llama model_size_bytes 425 KB 425 KB +0.0% ⚪
llama num_nodes 60 60 +0.0% ⚪
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0% ⚪
llama (static-cache) num_nodes 56 56 +0.0% ⚪
mamba (ssm-text-generation) model_size_bytes 296 KB 296 KB +0.0% ⚪
mamba (ssm-text-generation) num_nodes 94 94 +0.0% ⚪
phi3 model_size_bytes 421 KB 421 KB +0.0% ⚪
phi3 num_nodes 58 58 +0.0% ⚪
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0% ⚪
phi3 (static-cache) num_nodes 54 54 +0.0% ⚪
qwen2 model_size_bytes 425 KB 425 KB +0.0% ⚪
qwen2 num_nodes 60 60 +0.0% ⚪
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0% ⚪
qwen2 (static-cache) num_nodes 56 56 +0.0% ⚪
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0% ⚪
qwen3_5_moe (hybrid-text-generation) num_nodes 265 265 +0.0% ⚪
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0% ⚪
qwen3_5_text (hybrid-text-generation) num_nodes 127 127 +0.0% ⚪
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0% ⚪
qwen3_5_vl (hybrid-qwen-vl) num_nodes 450 450 +0.0% ⚪
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0% ⚪
t5 (seq2seq) num_nodes 176 176 +0.0% ⚪
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0% ⚪
whisper (speech-to-text) num_nodes 128 128 +0.0% ⚪

No performance regressions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the hard-coded “production checkpoint” revision and artifact identity gates, restoring standard Hugging Face behavior: revision=None uses the Hub default, and explicit revisions are forwarded unchanged. It also keeps Qwen4Exp GGUF handling fail-closed based on detected architecture plus metadata/tensor-layout validation, while retaining immutable pins only as evidence.

Changes:

  • Removed pinned revision enforcement for the Transformers builder and added regression tests for explicit/None revision forwarding.
  • Removed Qwen4Exp GGUF repo/revision/filename/size/hash gates, keeping header-based contract validation and explicit payload rejection.
  • Updated documentation and error strings from “pinned” to “supported/evidenced” wording.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testdata/cases/causal-lm/qwen3.8-flash-next-fp8.yaml Updates skip_reason wording from pinned → evidenced.
src/mobius/models/qwen4_exp.py Adjusts validation/error text to describe supported layout rather than pinned checkpoint.
src/mobius/models/qwen4_exp_test.py Updates regex expectation for revised error wording.
src/mobius/integrations/transformers/_builder.py Removes pinned revision gate and updates one fp8_kv_cache error message.
src/mobius/integrations/transformers/_builder_test.py Adds tests ensuring explicit revision forwarding and that None stays “Hub default”.
src/mobius/integrations/gguf/_qwen4_exp.py Removes pinned Hub identity gates; retains tensor-contract validation + payload rejection.
src/mobius/integrations/gguf/_qwen4_exp_test.py Reworks tests to validate contract behavior without pinned Hub identity enforcement.
src/mobius/integrations/gguf/_builder.py Removes strict “never fallback-download” preflight policy for the formerly pinned Qwen4Exp repo; now rejects qwen4exp via reject_qwen4exp_payload().
docs/design/qwen4-exp-text-core.md Updates narrative from pinned → evidenced and describes revised revision/payload policy.
Suppressed comments (1)

src/mobius/integrations/gguf/_builder.py:584

  • _preflight_hf_gguf_file() now falls back to _GGUFPreflightFallbackRevision on bounded header transport errors/truncation, which leads _resolve_gguf_path_impl to download the full GGUF later. For general.architecture=qwen4exp, the import path is designed to fail-closed, so this fallback can trigger a large Hub download before we ultimately raise Qwen4ExpGGUFImportError, contradicting the “no payload was downloaded” messaging/docs and increasing CI/user cost on transient range failures.
    except _HUB_PREFLIGHT_TRANSPORT_ERRORS as error:
        logger.warning(
            "Bounded GGUF header range read failed for %s (%s); downloading the "
            "same immutable revision and validating its local header before dispatch.",
            source,

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 105 to 106
Payload conversion deliberately fails before Hub download. The combined PLE
table is an enormous IQ4_NL embedding for which the graph has no compatible
Comment on lines 52 to 57
@@ -103,72 +57,15 @@ def _payload_blocker(*, keep_quantized: bool) -> Qwen4ExpGGUFImportError:
)
from mobius.integrations.gguf._tensor_mapping import map_gguf_to_hf_names
from mobius.models.qwen4_exp import _build_layer_multipliers, _find_nth_prime_after

_EVIDENCE_REPO = "unsloth/Qwen3.8-Flash-Next-GGUF"
from mobius.models.qwen4_exp import _build_layer_multipliers, _find_nth_prime_after

_EVIDENCE_REPO = "unsloth/Qwen3.8-Flash-Next-GGUF"
_EVIDENCE_REVISION = "d3bc75ee6ccef3efc1e228ec00a6cc2cdb1e2249"
@justinchuby
justinchuby merged commit 20a29ed into main Aug 27, 2026
24 of 26 checks passed
@justinchuby
justinchuby deleted the justinchuby-remove-production-revision-pin branch August 27, 2026 15:04
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