Skip to content

Commit e5afbde

Browse files
authored
Readme to go along with system instructions for lm_eval (#2239)
1 parent 086854e commit e5afbde

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

examples/text-generation/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,9 +824,26 @@ pip install -r requirements_lm_eval.txt
824824
>
825825
> If custom models on hub is being used, please set env variable HF_DATASETS_TRUST_REMOTE_CODE=true instead of arg --trust_remote_code with the installed lm_eval version and dependency datasets==3.6.0
826826
827+
The argument --system_instruction adds a system message to the beginning of the prompt.
828+
This instruction is treated as part of the input context and can influence how the model interprets the task or responds.
827829
828830
### Examples
829831
832+
Evaluate [Moonlight-16B-A3B](https://huggingface.co/moonshotai/Moonlight-16B-A3B) (a DeepSeek-V3 like model) on Gaudi on task mmlu_abstract_algebra, with system instruction:
833+
```bash
834+
PT_HPU_LAZY_MODE=1 python run_lm_eval.py \
835+
--model_name_or_path moonshotai/Moonlight-16B-A3B-Instruct \
836+
--tasks mmlu_abstract_algebra \
837+
--system_instruction "You are a helpful assistant that thinks step-by-step before answering." \
838+
--buckets=256 \
839+
--use_hpu_graphs \
840+
--use_kv_cache \
841+
--bf16 \
842+
--batch_size=1 \
843+
--trust_remote_code \
844+
-o mmlu.json
845+
```
846+
830847
Evaluate Llama 7B on Gaudi on task PiQA, using the BF16 data type:
831848
```bash
832849
PT_HPU_LAZY_MODE=1 python run_lm_eval.py \

0 commit comments

Comments
 (0)