Repository navigation
Conversation
Model::forward fails for every input with "slice-set only supports contiguous tensors". value_states is transposed and passed straight to KvCache::append, which slice_sets it into the cache buffer and requires a contiguous source. key_states avoids this only incidentally, because apply_rotary_emb_qkv calls .contiguous() on it first. Reproduced on 0.10.2 and on main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
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.
gemma3::Model::forwardfails for every input withslice-set only supports contiguous tensors.value_statesis transposed and then handed straight toKvCache::append, whichslice_sets it into the cache buffer and requires a contiguous source.key_statesgets away with it only incidentally —apply_rotary_emb_qkvcalls.contiguous()on it first (gemma3.rs:109-110) — andvalue_statesnever goes through that path.Reproduced on 0.10.2 and on current
main. No downloads needed:Before:
After:
It fails with
sliding_window_pattern: 1too, so both theNormalandRotatingcache paths are affected.I suspect this has gone unnoticed because the recent Gemma 3 activity (#3745, #3747, #3326, #3299) is all against
quantized_gemma3.rs, which has its own attention path.