mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
[Moshi] disable automatic compilation if the model can't compile (#35992)
moshi cant compile
This commit is contained in:
parent
e6f4a4ebbf
commit
5bbee12ac9
1 changed files with 1 additions and 1 deletions
|
|
@ -3183,7 +3183,7 @@ class GenerationMixin:
|
|||
|
||||
model_forward = self.__call__
|
||||
if isinstance(model_kwargs.get("past_key_values"), Cache):
|
||||
is_compileable = model_kwargs["past_key_values"].is_compileable
|
||||
is_compileable = model_kwargs["past_key_values"].is_compileable and self._supports_static_cache
|
||||
if is_compileable and (
|
||||
self.device.type == "cuda" or generation_config.compile_config._compile_all_devices
|
||||
):
|
||||
|
|
|
|||
Loading…
Reference in a new issue