mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
Update server/text_generation_server/models/flash_causal_lm.py
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
This commit is contained in:
parent
8d7448de9f
commit
3e0a82d512
@ -1922,7 +1922,7 @@ class FlashCausalLM(Model):
|
|||||||
batch.adapter_meta.adapter_indices = next_adapter_indices
|
batch.adapter_meta.adapter_indices = next_adapter_indices
|
||||||
|
|
||||||
if prefill and prefill_logprobs:
|
if prefill and prefill_logprobs:
|
||||||
# Get prefill logprobs with inplace softmax (avoid copying the `out` tensor (max_batch_size * vocab_size))
|
# Get prefill logprobs with inplace softmax (avoid copying the `out` tensor (max_batch_prefill_tokens * vocab_size))
|
||||||
torch.log_softmax(out, -1, out=out)
|
torch.log_softmax(out, -1, out=out)
|
||||||
prefill_logprobs_tensor = out
|
prefill_logprobs_tensor = out
|
||||||
prefill_logprobs = torch.gather(
|
prefill_logprobs = torch.gather(
|
||||||
|
Loading…
Reference in New Issue
Block a user