Skip to content

Commit

Permalink
Add trust_remote_code (huggingface#1786)
Browse files Browse the repository at this point in the history
Co-authored-by: regisss <[email protected]>
  • Loading branch information
atakaha and regisss authored Feb 24, 2025
1 parent f7ea96e commit 0191c17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/text-generation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ python run_generation.py \
--dataset_name JulesBelveze/tldr_news \
--column_name content \
--bf16 \
--sdp_on_bf16
--sdp_on_bf16 \
--trust_remote_code
```
> The prompt length is limited to 16 tokens. Prompts longer than this will be truncated.
Expand Down Expand Up @@ -637,7 +638,7 @@ python run_generation.py \
### Saving FP8 Checkpoints in Hugging Face format
After quantizing the model, we can save it to a local path.

> [!NOTE]
> [!NOTE]
> Before executing the command below, please refer to the [Running with FP8](#running-with-fp8) section to measure the model quantization statistics.
Here is an example of how to quantize and save the LLama3.1-70B model on two cards:
Expand Down
2 changes: 1 addition & 1 deletion examples/text-generation/run_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def rounder(x):

assert not args.simulate_dyn_prompt, "Both dataset_name and simulate_dyn_prompt are set"

raw_dataset = load_dataset(args.dataset_name)
raw_dataset = load_dataset(args.dataset_name, trust_remote_code=args.trust_remote_code)
if "test" in raw_dataset:
split = "test"
elif "validation" in raw_dataset:
Expand Down

0 comments on commit 0191c17

Please sign in to comment.