Skip to content

Commit

Permalink
chore: config_name_to_class uses config.model_type now
Browse files Browse the repository at this point in the history
  • Loading branch information
tengomucho committed Apr 10, 2024
1 parent 2215595 commit f334bbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimum/tpu/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
from optimum.tpu.modeling_gemma import TpuGemmaForCausalLM

def config_name_to_class(pretrained_model_name_or_path: str):
if "gemma" in pretrained_model_name_or_path:
config = AutoConfig.from_pretrained(pretrained_model_name_or_path)
if config.model_type == "gemma":
return TpuGemmaForCausalLM
return BaseAutoModelForCausalLM

Expand Down

0 comments on commit f334bbd

Please sign in to comment.