fix(neuron): wrong assertion when batch_size==1

This commit is contained in:
David Corvoysier 2025-06-18 18:54:53 +00:00
parent bd1bdebb47
commit 82ebfd67bb

View File

@ -341,7 +341,10 @@ class NeuronGenerator(Generator):
self.model = model
if not isinstance(self.model, 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(
"The neuron model must be compiled with continuous_batching=True."
)