Skip to content

Commit

Permalink
Fix ovis1.6 infer (modelscope#2242)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintao-Huang authored Oct 14, 2024
1 parent 5d64d39 commit 2a28740
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions swift/llm/utils/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,7 @@ def get_model_tokenizer_with_flash_attn(model_dir: str,
def get_model_tokenizer_ovis(*args, **kwargs):
model, tokenizer = get_model_tokenizer_with_flash_attn(*args, **kwargs)
if model is not None:
model.generation_config.cache_implementation = None
func_list = ['generate', 'forward', 'get_input_embeddings']
_use_submodel_func(model, 'llm', func_list)
embedding = model.get_input_embeddings()
Expand Down

0 comments on commit 2a28740

Please sign in to comment.