mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 04:14:52 +00:00
Fix.
This commit is contained in:
parent
be481a4799
commit
cb8a1680fe
@ -833,7 +833,7 @@ class FlashCausalLM(Model):
|
||||
batch.top_n_tokens, batch.top_n_tokens_tensor, logprobs
|
||||
)
|
||||
|
||||
speculative_length = speculative_ids.shape[1]
|
||||
speculative_length = 0 if speculative_ids is None else speculative_ids.shape[1]
|
||||
if prefill:
|
||||
if len(batch) > 1 and prefill_logprobs:
|
||||
# We create the prefill_tokens_indices tensor that will be used to gather prefill logprobs
|
||||
|
@ -21,6 +21,7 @@ from text_generation_server.models.custom_modeling.flash_mistral_modeling import
|
||||
FlashMistralForCausalLM,
|
||||
MistralConfig,
|
||||
)
|
||||
from text_generation_server.utils.speculate import get_speculate
|
||||
from text_generation_server.utils import (
|
||||
initialize_torch_distributed,
|
||||
weight_files,
|
||||
@ -132,8 +133,7 @@ class FlashMistralBatch(FlashCausalLMBatch):
|
||||
|
||||
# Paged attention
|
||||
# Remove one as the first token des not have a past
|
||||
from text_generation_server.models import SPECULATE
|
||||
speculative_length = SPECULATE
|
||||
speculative_length = get_speculate()
|
||||
total_tokens = input_length + max_new_tokens - 1 + speculative_length
|
||||
|
||||
# Needed blocks can not go over SLIDING_WINDOW_BLOCKS
|
||||
|
Loading…
Reference in New Issue
Block a user