Skip to content

Commit

Permalink
Fix run_generation test commands for TRL out usage example (huggingfa…
Browse files Browse the repository at this point in the history
…ce#1621)

Fix run_generation example for TRL out
  • Loading branch information
shepark authored Dec 17, 2024
1 parent 2f245a0 commit bd6afbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/trl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ steps like:
To merge the adaptors into the base model we can use the `merge_peft_adapter.py` helper script that comes with TRL:
```
python merge_peft_adapter.py --base_model_name="meta-llama/Llama-2-7b-hf" --adapter_model_name="dpo" --output_name="stack-llama-2"
python merge_peft_adapter.py --base_model_name="meta-llama/Llama-2-70b-hf" --adapter_model_name="dpo" --output_name="stack-llama-2"
```
which will also push the model to your HuggingFace hub account.
Expand All @@ -239,7 +239,7 @@ which will also push the model to your HuggingFace hub account.
We can load the DPO-trained LoRA adaptors which were saved by the DPO training step and run it through the [text-generation example](https://github.com/huggingface/optimum-habana/tree/main/examples/text-generation).
```
python run_generation.py \
python ../gaudi_spawn.py --world_size 8 --use_deepspeed run_generation.py \
--model_name_or_path ../trl/stack-llama-2/ \
--use_hpu_graphs --use_kv_cache --batch_size 1 --bf16 --max_new_tokens 100 \
--prompt "Here is my prompt"
Expand Down

0 comments on commit bd6afbc

Please sign in to comment.