Skip to content

Commit

Permalink
workaround for transformers bug requireing do_sample for saveing pret…
Browse files Browse the repository at this point in the history
…rained (#1206)
  • Loading branch information
winglian authored Jan 25, 2024
1 parent badda37 commit ba944e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/axolotl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def train(
msg += " and peft_config..."
LOG.debug(msg)
model, peft_config = load_model(cfg, tokenizer, inference=cli_args.inference)
model.generation_config.do_sample = True

model_ref = None
if cfg.rl:
if cfg.adapter and not cfg.rl_adapter_ref_model:
Expand Down

0 comments on commit ba944e6

Please sign in to comment.