Repository navigation
FP8 LoRA test: expect the kernel route when unsloth_zoo drops HF output flags - #16855
Merged
Merged
Conversation
…ut flags itself unsloth_zoo's fused lm_head adapter now drops output_attentions / output_hidden_states for every head, so heads without FP8 LoRA keep the chunked kernel route too. The test reads which zoo it runs against and still checks the FP8 head and the restore paths.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Nov 6, 2026
This was referenced Nov 6, 2026
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.
Problem
tests/test_fp8_lora.py::test_fp8_loss_ignores_model_output_flags_only_on_its_headfails on main against the current unsloth_zoo (6 parametrized cases,assert not run(owner)).The test assumed that unsloth_zoo's fused lm_head adapter forwards
output_attentions/output_hidden_statesinto the fused CE, which makes_use_chunked_cerefuse the kernel on every head except the FP8 LoRA one. unsloth_zoo now drops those flags in the adapter itself (_KERNEL_KWARGSinunsloth_zoo/fused_losses/forward_adapter.py). So every head keeps the chunked kernel route, and the "ordinary head refuses the kernel" assertions no longer hold.Fix
Test only. The test reads whether the installed unsloth_zoo already drops the flags and expects that route on the heads without FP8 LoRA: the head before FP8 is enabled, an ordinary model, and after
restore_fp8_lora_for_inference. The FP8 head still has to take the kernel route, and the namespace restore checks are unchanged.Testing
tests/test_fp8_lora.py -k "output_flags or fp8_loss_route":