Repository navigation
model: fix vllm d3 multi seq case - #30408
Merged
Merged
Conversation
ggerganov
approved these changes
Oct 12, 2026
ggerganov
left a comment
Member
There was a problem hiding this comment.
Yes, when computing non-causal data, it has to fit in a single ubatch. The proposed fix should be good.
It can be improved by allowing split_seq to fit multiple sequences in the ubatch, as long as they can fit fully. This way for example, with an ubatch of 4096 tokens, one can process in a single pass 4 sequences of length 1024, instead of splitting them in 4 ubatches.
Add TODO to support that:
diff --git a/src/llama-batch.h b/src/llama-batch.h
index 8882c9941e..e1e43979b5 100644
--- a/src/llama-batch.h
+++ b/src/llama-batch.h
@@ -186,6 +186,7 @@ public:
llama_ubatch split_equal(uint32_t n_ubatch, bool sequential, uint32_t n_keep_tail);
// sequence-set-wise split - each ubatch contains a single sequence-set
+ // TODO: extend to support multiple _full_ sequences in the ubatch
llama_ubatch split_seq(uint32_t n_ubatch);
// a helper method for creating a well-defined ubatch of tokens
edwardyoon
pushed a commit
to edwardyoon/focus-llama
that referenced
this pull request
Oct 24, 2026
* model: fix vllm d3 multi seq case * add TODO
auRose94
pushed a commit
to auRose94/llama.cpp
that referenced
this pull request
Oct 28, 2026
* model: fix vllm d3 multi seq case * add TODO
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.
Overview
Fix efe3626#commitcomment-204575113
Not 100% sure but seems like there is a problem with the case: non-causal + hybrid + multi seq
This seems to fix the problem
Requirements