Upload ms-swift/examples/sampler/mcts/mcts.sh with huggingface_hub
Browse files
ms-swift/examples/sampler/mcts/mcts.sh
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export CUDA_VISIBLE_DEVICES=0
|
| 2 |
+
export USE_OPENCOMPASS_EVALUATOR=True
|
| 3 |
+
|
| 4 |
+
swift sample \
|
| 5 |
+
--model ./output/Qwen2.5-Math-7B-Instruct/v40-20250126-161112/checkpoint-20 \
|
| 6 |
+
--orm_model math \
|
| 7 |
+
--sampler_type mcts \
|
| 8 |
+
--sampler_engine vllm \
|
| 9 |
+
--output_dir ./output/sampler/mcts \
|
| 10 |
+
--system ./examples/sampler/system_prompt.txt \
|
| 11 |
+
--stop_words ки \
|
| 12 |
+
--dataset ./datasets/competition_math/small_test.jsonl \
|
| 13 |
+
--num_return_sequences 2 \
|
| 14 |
+
--process_reward_rate 0 \
|
| 15 |
+
--max_new_tokens 2048
|
| 16 |
+
|
| 17 |
+
## Train
|
| 18 |
+
# nproc_per_node=8
|
| 19 |
+
# NPROC_PER_NODE=$nproc_per_node \
|
| 20 |
+
# swift sft \
|
| 21 |
+
# --model Qwen/Qwen2.5-Math-7B-Instruct \
|
| 22 |
+
# --train_type full \
|
| 23 |
+
# --torch_dtype bfloat16 \
|
| 24 |
+
# --dataset 'datasets/gen_V5.jsonl' \
|
| 25 |
+
# --num_train_epochs 1 \
|
| 26 |
+
# --per_device_train_batch_size 1 \
|
| 27 |
+
# --learning_rate 1e-5 \
|
| 28 |
+
# --gradient_accumulation_steps $(expr 128 / $nproc_per_node) \
|
| 29 |
+
# --eval_steps 1000 \
|
| 30 |
+
# --save_steps 10 \
|
| 31 |
+
# --save_total_limit 100 \
|
| 32 |
+
# --max_length 10000 \
|
| 33 |
+
# --logging_steps 5 \
|
| 34 |
+
# --gradient_checkpointing_kwargs '{"use_reentrant": false}' \
|
| 35 |
+
# --deepspeed zero3
|