Repository navigation
test(ricursive): cover Transformers 4 default-cache rollback - #3752
Merged
Merged
Conversation
Transformers 4.57 builds hybrid sliding layers from DynamicCache(config=...), but those layers cannot be cropped after passing the window. Reusing a cache returned by a direct forward in assisted decoding then raises "Cannot crop a DynamicSlidingWindowLayer". The native fix keeps a plain full cache on Transformers 4. Pin the reviewed revision to that commit, assert the 4.x default can be cropped, and add the reported prompt-lookup reproduction as a regression. The test reuses the cache from a direct forward; constructing an explicit full cache would hide the defect.
Qubitium
marked this pull request as ready for review
November 10, 2026 05:12
Qubitium
pushed a commit
that referenced
this pull request
Nov 10, 2026
…3756) * test(contracts): align fused-bias oracles and GLM-5.3 MTP ownership Update stale test contracts that no longer match shipped behavior after bias was fused into the FP32 epilogue and after the checkpoint-only MTP block became visible in the module tree. Neither change is a kernel regression. ROCm/NVIDIA bias epilogue: - The visible output is round(matmul + bias), not round(matmul) + bias, on the fused GEMV/GEMM paths and on the split addmm path. Update the ROCm GEMM/GEMV and Ada GEMM/GEMV oracles to add bias to the FP32 partial sum and round once. - Apply the same fused epilogue to the independent FP64 adjudication oracle, and keep FP32 arithmetic error separate from output rounding: a visible difference is accepted only when the FP32 and FP64 fused values straddle the rounding boundary. - Assert the fused GEMV dispatch so a fallback cannot silently pass. GLM-5.3 MTP ownership: - The checkpoint-only layer 45 MTP block owns enorm, hnorm, eh_proj and shared_head.norm beyond the target-layer schema. Declare them as dense `:!` owners in Glm5NextQModel.module_tree and in the registry fixture. - The resolved layer list is 46 (45 target + 1 MTP) with 41 owners. The test now derives the MTP count instead of hard-coding only target layers, and checks every declared dense owner resolves through ModulePlan.find() with an explicit exclusion tag. AWQ GEMV gating: - Device-family rejection used out_features=64, which AwqGEMVFastLinear rejects for shape reasons. Use a legal shape per kernel and assert the error is the device family, then add a separate test for the illegal width rejection on a supported device. Reference pages with diagrams and measured numbers: docs/rocm-rdna4.md and docs/glm-integrated-mtp.md. * style(tests): rewrite kwargs dict as a literal main's ruff-check fails on this file at 1c50395 (introduced by #3752): `C408 Unnecessary dict() call`. Rewrite the call kwargs as a plain literal so the lint gate can pass. No behavioural change; the file's 27 tests pass.
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.
Follow-up to the Hugging Face review in ricursiveAI/Ripple-65B-Preview#11.
The native modeling fix keeps a plain, crop-compatible default
DynamicCacheon Transformers 4 and the configured hybrid cache on Transformers 5. It is in the same HF PR at commit2f007aabfcedd0f8763d86d08f9aa0afbc344cea.This PR syncs the regression coverage:
RIPPLE_REVISIONto the fixed native revision.Verification with a tiny model (four sliding layers + one full layer,
sliding_window=8):tests/test_ricursive_modeling_contracts.py.