Repository navigation
Conversation
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Qubitium
force-pushed
the
upstream/22-native-checkpoint-export-20261108
branch
from
November 9, 2026 09:30
fdeb514 to
56742ff
Compare
Qubitium
reviewed
Nov 9, 2026
Qubitium
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed against current main. The layer composes cleanly:
_merge_missing_config_fieldskeeps source-only config keys (including nestedtext_config) while letting the live serialized config win, and_CONFIG_MERGE_SKIP_KEYScorrectly excludes the regeneratedquantization_config/quantize_configso_quantization_config_for_model_configremains the single writer of that field._quantization_config_for_model_configstripstensor_storagefor EXL3 so the multi-megabyte manifest is not duplicated intoconfig.json; the external quantize config stays authoritative._validated_save_state_overlay/_exllamav3_checkpoint_passthrough_plan/_build_exllamav3_checkpoint_passthrough_state_dictfail closed on missing prefixes, ambiguous prefix contracts, missing source suffixes, and tensor-contract violations, and the EXL3 publication guard rejects native recovery targets._merge_selected_tensors_into_state_dictgeneralizes prefix selection to suffix/exact selections while keeping undeclared prefixes optional and still erroring on declared-but-unreadable tensors.- Split-by-layer save suspends active source staging during materialization, as exercised by the new test.
Validation: ruff check clean on the touched modules; pytest on the six touched test files reports 134 passed, 3 skipped (the skips are the pre-existing CUDA/optional-dtype guards).
No blocking issues found.
Qubitium
marked this pull request as ready for review
November 9, 2026 09:32
ZX-ModelCloud
added a commit
that referenced
this pull request
Nov 11, 2026
_merge_prefix_tensors_into_state_dict was removed in #3602, and _normalize_out_of_model_tensors_entries now returns four selector lists. Update the MTP absent-auxiliary test to the current _merge_selected_tensors_into_state_dict API so collection no longer fails.
Qubitium
pushed a commit
that referenced
this pull request
Nov 11, 2026
* test(mimo): use current writer out-of-model selector API _merge_prefix_tensors_into_state_dict was removed in #3602, and _normalize_out_of_model_tensors_entries now returns four selector lists. Update the MTP absent-auxiliary test to the current _merge_selected_tensors_into_state_dict API so collection no longer fails. * test: gate optional deps and CUDA-only kernels by device family Optional server dependencies and CUDA-only kernels must not break collection or fail on ROCm: - Skip test_openai_server.py and test_openai_server_contract.py at module scope when openai / fastapi are not installed, instead of raising during collection. - Gate every backend in test_gptq.py through the kernel's own SUPPORTS_DEVICES family declaration, validate_device() rules and validate_once() availability. TRITON, MARLIN, MACHETE, SWORDFISH and EXLLAMA_V2 now skip on ROCm instead of failing while loading. - Stub cached_validate_once() alongside the dummy BitBLAS operator in test_qlinear_hierarchy.py so the runtime-state assertions do not require a CUDA BitBLAS install. * test: gate optional httpx and harden the kernel skip gate test_openai_server_contract.py imported httpx at module scope, so a server environment without the optional httpx package still failed collection after fastapi and starlette were gated. Skip the module when httpx is absent. _kernel_skip_reason() assumed validate_once() always returns (ok, error). TritonV2Linear raises ImportError when its optional runtime is missing, which turned the new gate into a test error instead of a skip. Treat a raising probe as an unavailable kernel, and cover the family mismatch, device rejection, unavailable and raising paths with a host-independent unit test.
Collaborator
|
Review found selected checkpoint tensor names could disappear silently. #3712 now validates the indexed names before continuing. |
Merged
8 tasks done
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
Preserve source-native checkpoint names and untouched tensors, compose validated auxiliary overlays, stream exact passthrough exports, reject incomplete publication trees, and publish EXL3 ledgers without embedding the tensor manifest in model config. Retain early auxiliary-source validation and the earlier atomic shard writer.
This is layer 22/36, extracted from an already-used fork for initial maintainer feedback. It depends on #3601. Review only this feature; the cross-fork Files changed view is cumulative because the PR targets upstream
main.Incremental change: 9 files, +1576/−126 lines, including carried tests and the mechanism reference. No merge is automatic. Review value and API shape first; substantial rework can follow that feedback.
Flow and existing-code boundary
flowchart TD S0["_validated_save_state_overlay"] S1["_exllamav3_checkpoint_passthrough_plan"] S2["_build_exllamav3_checkpoint_passthrough_state_dict"] S3["ModelWriter"] E["RuntimeError, TypeError, ValueError"] S0 -->|"raises on rejected input/state"| E S1 -->|"raises on rejected input/state"| E S2 -->|"raises on rejected input/state"| E S3 -->|"calls where selected"| S0 S3 -->|"calls where selected"| S1 S3 -->|"calls where selected"| S2 S3 -->|"raises on rejected input/state"| E style E fill:#fee,stroke:#b22gptqmodel/models/writer.py:658:_validated_save_state_overlaygptqmodel/models/writer.py:792:_exllamav3_checkpoint_passthrough_plangptqmodel/models/writer.py:936:_build_exllamav3_checkpoint_passthrough_state_dictgptqmodel/models/writer.py:799gptqmodel/models/writer.py:1387:ModelWriterCommitted reference: docs/native-checkpoint-export.md, linked from README. Class entry points/calls and rejected-state paths describe code present in this branch, rather than planned integrations.
Validation
Carried test files:
tests/test_writer_state_overlay.py,tests/test_writer_attention.py,tests/test_writer_quant_log.py,tests/test_out_of_model_tensors.py,tests/test_split_by_layer_save.py,tests/test_offload_files.pyThis packaging pass checked Python parsing, whitespace, dependency order and balanced Mermaid blocks. The author reports successful prior use of these features. Per the requested resource limit and feedback-first scope, existing model quantization, GPU/ROCm tests, heavyweight CPU workloads and full model benchmarks were not rerun; no new performance or model-accuracy claim is made. Tests accompanying earlier stack layers retain their previously reported results.