Update vision.py
This commit is contained in:
parent
5505445b70
commit
77dbbb6e74
1 changed files with 4 additions and 1 deletions
|
|
@ -184,9 +184,12 @@ def unsloth_base_fast_generate(
|
|||
if "generation_config" in kwargs:
|
||||
kwargs["generation_config"].cache_implementation = cache_implementation
|
||||
kwargs["generation_config"].compile_config = _compile_config
|
||||
else:
|
||||
elif getattr(self, "_supports_static_cache", True):
|
||||
kwargs["cache_implementation"] = cache_implementation
|
||||
kwargs["compile_config"] = _compile_config
|
||||
else:
|
||||
kwargs["cache_implementation"] = "hybrid"
|
||||
kwargs["compile_config"] = _compile_config
|
||||
pass
|
||||
|
||||
with torch.inference_mode(), autocaster:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue