Skip to content

Commit

Permalink
fix(decoder): use revision when fetching generation_config
Browse files Browse the repository at this point in the history
  • Loading branch information
dacorvo committed Apr 25, 2024
1 parent e364105 commit a59f629
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optimum/neuron/modeling_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _export(
# Try to reload the generation config (if any)
generation_config = None
try:
generation_config = GenerationConfig.from_pretrained(model_id)
generation_config = GenerationConfig.from_pretrained(model_id, revision=revision)
except OSError:
pass

Expand Down Expand Up @@ -419,7 +419,7 @@ def _from_pretrained(
# Try to reload the generation config (if any)
generation_config = None
try:
generation_config = GenerationConfig.from_pretrained(model_id)
generation_config = GenerationConfig.from_pretrained(model_id, revision=revision)
except OSError:
pass

Expand Down

0 comments on commit a59f629

Please sign in to comment.