Skip to content

Commit

Permalink
Quickfix use model kwargs in Autoconfig loading
Browse files Browse the repository at this point in the history
  • Loading branch information
gsarti committed Jan 23, 2024
1 parent 5742858 commit 5f0b534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inseq/models/huggingface_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def load(
) -> "HuggingfaceModel":
"""Loads a HuggingFace model and tokenizer and wraps them in the appropriate AttributionModel."""
if isinstance(model, str):
is_encoder_decoder = AutoConfig.from_pretrained(model).is_encoder_decoder
is_encoder_decoder = AutoConfig.from_pretrained(model, **model_kwargs).is_encoder_decoder
else:
is_encoder_decoder = model.config.is_encoder_decoder
if is_encoder_decoder:
Expand Down

0 comments on commit 5f0b534

Please sign in to comment.