Views
No views yet
1python trl/scripts/sft.py --model_name_or_path Qwen/Qwen3-1.7B --dataset_name theblackcat102/evol-codealpaca-v1 --learning_rate 2e-5 \
2--num_train_epochs 1 --per_device_train_batch_size 2 --gradient_accumulation_steps 8 --gradient_checkpointing --eos_token '<|im_end|>' --eval_strategy no \
3--completion_only_loss True --report_to wandb --output_dir /path/to/the/finetuned/model1# trl/scripts/sft.py
2
3dataset = load_dataset(...)
4
5def preprocess_function(example):
6 return {
7 "prompt": [{"role": "user", "content": example["instruction"]}],
8 "completion": [
9 {"role": "assistant", "content": example['output']}
10 ],
11 }
12
13dataset = dataset.map(preprocess_function)1python -m lm_eval --model vllm --model_args pretrained=${model},tensor_parallel_size=1,dtype=auto,gpu_memory_utilization=0.9,data_parallel_size=1 \
2 --tasks humaneval_instruct --batch_size 1 --apply_chat_template=True --confirm_run_unsafe_code --trust_remote_code| Model | humaneval_instruct |
|---|---|
| Qwen3-1.7B | 67.1 |
| Qwen3-1.7B-Code | 69.5 |