mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-24 10:00:16 +00:00
fix(neuron): wrong assertion when batch_size==1
This commit is contained in:
parent
bd1bdebb47
commit
82ebfd67bb
@ -341,7 +341,10 @@ class NeuronGenerator(Generator):
|
|||||||
self.model = model
|
self.model = model
|
||||||
if not isinstance(self.model, NeuronModelForCausalLM):
|
if not isinstance(self.model, NeuronModelForCausalLM):
|
||||||
raise ValueError("The model must be a NeuronModelForCausalLM.")
|
raise ValueError("The model must be a NeuronModelForCausalLM.")
|
||||||
if not model.neuron_config.continuous_batching:
|
if (
|
||||||
|
model.neuron_config.batch_size > 1
|
||||||
|
and not model.neuron_config.continuous_batching
|
||||||
|
):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"The neuron model must be compiled with continuous_batching=True."
|
"The neuron model must be compiled with continuous_batching=True."
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user