[Core][2/N] Model runner refactoring part 2. Combine prepare prefill / decode to a single API (#4681)
This PR combines prepare_prompt and prepare_decode into a single API. This PR also coelsce the attn metadata for prefill/decode to a single class and allow to slice them when running attn backend. It also refactors subquery_start_loc which was not refactored in the previous PR
This commit is contained in:
+2
-1
@@ -654,8 +654,9 @@ class SequenceGroupMetadata:
|
||||
return self.lora_request.lora_int_id if self.lora_request else 0
|
||||
|
||||
@property
|
||||
def token_chunk_size(self) -> Optional[int]:
|
||||
def token_chunk_size(self) -> int:
|
||||
"""Return the number of tokens to be processed (chunk size)."""
|
||||
assert self._token_chunk_size is not None
|
||||
return self._token_chunk_size
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user