Conversation
GoooIce
added a commit
to GoooIce/shadow-peft
that referenced
this pull request
Aug 23, 2026
…refactor ShadowLLM#1 (High) MLX quantize_model_2bit now always repacks ternary even at refine_iters=0 (absmean init without Lloyd); manifest matches reality. +1 test. ShadowLLM#2 (High) load_quantized_checkpoint derives skip patterns from the manifest's "skipped" list by default (skip_patterns=None), making the checkpoint format self-describing; explicit patterns still override. +2 tests. ShadowLLM#3 (Medium) MLX ShadowForSequenceClassification.__call__ restores labels to its original positional slot; attention_mask is keyword-only. +1 test. ShadowLLM#5 (Medium) swap_adapter clears shadow state BEFORE loading weights (no new-weights + old-cache hazard); MLX validates input keys upfront (closes strict=False gap); both registries restore the previous specialist on failed swap. Docstrings no longer overclaim atomicity. +2 tests. ShadowLLM#6 (Medium) Re-export InferenceMode from both harness config shims and save_quantized_checkpoint from affine_1bit; audit also found+fixed router shims dropping Session/ShadowHarnessConfig. New tests/test_compat_imports.py pins all old import paths. +11 tests. ShadowLLM#4 (Medium) train_shadow summary JSON-dumps survives TrainConfig(dtype=...); torch.dtype stringified via _summary_args_dump. +1 test. ShadowLLM#7 (Low) MLX pack_2bit_ternary / pack_1bit_refined validate group_size multiples upfront with torch-twin error messages. +1 test. ShadowLLM#8 (Low) eval_ppl raises a clear ValueError on too-short texts and evaluates the exact-fit (chunk_len+1) single window; window sets for long inputs unchanged (E1/E2 parity verified). +2 tests. Tests: 199 -> 219 passed after fixes (1 pre-existing trl skip).
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.
No description provided.