[Misc] fix docstrings (#4191)
Co-authored-by: Zhong Wang <wangzhong@infini-ai.com>
This commit is contained in:
parent
221d93ecbf
commit
8f20fc04bf
@ -160,7 +160,7 @@ class SequenceData:
|
|||||||
self._stage = SequenceStage.PREFILL
|
self._stage = SequenceStage.PREFILL
|
||||||
|
|
||||||
def get_num_uncomputed_tokens(self) -> int:
|
def get_num_uncomputed_tokens(self) -> int:
|
||||||
"""Return the number of prefil tokens that are not computed."""
|
"""Return the number of prefill tokens that are not computed."""
|
||||||
# we use `get_len()` which includes prompt_len + output_len instead
|
# we use `get_len()` which includes prompt_len + output_len instead
|
||||||
# of prompt_len here. This is because during recompute we need to
|
# of prompt_len here. This is because during recompute we need to
|
||||||
# prefill for both prompt and output.
|
# prefill for both prompt and output.
|
||||||
@ -345,12 +345,9 @@ class Sequence:
|
|||||||
def get_num_new_tokens(self) -> int:
|
def get_num_new_tokens(self) -> int:
|
||||||
"""Get the number of new tokens to be computed.
|
"""Get the number of new tokens to be computed.
|
||||||
|
|
||||||
Args:
|
|
||||||
remainig_token_budget: The remaining token budgets.
|
|
||||||
Returns:
|
Returns:
|
||||||
The new number of tokens to be computed. I.e., 1 for decode, prompt
|
The new number of tokens to be computed. I.e., 1 for decode, or
|
||||||
size for prefill. If there's not enough remainig_token_budget, it
|
the remaining prompt size for prefill.
|
||||||
can return the chunked number of new tokens.
|
|
||||||
"""
|
"""
|
||||||
if self.data.stage == SequenceStage.DECODE:
|
if self.data.stage == SequenceStage.DECODE:
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user