Repository navigation
Conversation
Signed-off-by: n1ck-guo <heng.guo@intel.com>
|
Azure Pipelines: Successfully started running 5 pipeline(s). 3 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Three critical correctness issues remain: a background staging write can race with finalization, stale resume data can be reused across incompatible runs, and reloaded quantization tensors may remain on CPU while weights are on an accelerator.
3 open issues
What changed in this PR
Adds GGUF immediate-saving and resumable export support, safer large-tensor packing, and quantization metadata preservation.
Changes:
- Introduces per-block GGUF staging and crash-resume recovery.
- Adds chunked packing and CPU/OOM fallback handling.
- Expands offload support and related integration tests.
| File | Description |
|---|---|
| test/unit/test_cuda/export/test_gguf_format.py | Updates CUDA GGUF format tests for tensor-type handling. |
| test/unit/test_cpu/export/test_gguf_immediate_saving_resume.py | Adds CPU tests for GGUF immediate saving and resume behavior. |
| test/unit/test_cpu/core/test_resume_integration.py | Tests export-crash recovery and resume integration. |
| test/unit/common/utils/test_offload_helpers.py | Tests quantization metadata persistence during offload and reload. |
| test/unit/common/export/test_gguf_packing_helpers.py | Tests chunked GGUF packing and OOM fallback behavior. |
| auto_round/utils/offload.py | Adds persistence of extra quantization attributes and configurable staging directories. |
| auto_round/export/formats/gguf/writer.py | Manages temporary GGUF output and export lifecycle. |
| auto_round/export/formats/gguf/staging.py | Implements per-block GGUF staging and recovery. |
| auto_round/export/formats/gguf/packing.py | Adds chunked and memory-efficient GGUF tensor packing. |
| auto_round/export/formats/gguf/hf_checkpoint_restorer.py | Supports lazy restoration of staged checkpoint tensors. |
| auto_round/export/formats/gguf/convert.py | Integrates staged tensors into GGUF conversion. |
| auto_round/compressors/shard_writer.py | Handles resumed shard writing and finalization. |
| auto_round/compressors/orchestrator.py | Integrates GGUF staging and resume orchestration. |
| auto_round/compressors/base.py | Configures immediate GGUF saving during quantization. |
Review effort: Lite
Comment on lines
+2026
to
+2027
| if self.compress_context.is_immediate_saving and has_single_gguf_format: | ||
| self.compress_context.is_immediate_packing = False |
Comment on lines
+147
to
+148
| def _persist_index(self) -> None: | ||
| _atomic_write_json(self._index_path, {"modules": sorted(self._staged_modules)}) |
| continue | ||
| if hasattr(target, "orig_layer"): | ||
| target = target.orig_layer | ||
| setattr(target, parts[-1], tensor) |
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.

Description
Type of Change
New feature
Related Issues
Fixes or relates to #
Checklist Before Submitting
/azp run Unit-Test-CUDA-AutoRound.