|
206 | 206 | "\n",
|
207 | 207 | "```shell\n",
|
208 | 208 | "pip install -e \".[dev]\"\n",
|
| 209 | + "pre-commit install\n", |
209 | 210 | "```\n"
|
210 | 211 | ]
|
211 | 212 | },
|
|
247 | 248 | "bash scripts/train-single-node.sh \\\n",
|
248 | 249 | " --data_path \"hkust-nlp/dart-math-hard\" \\\n",
|
249 | 250 | " --model_path \"meta-llama/Meta-Llama-3-8B\" \\\n",
|
250 |
| - " --lr \"5e-5\" \\\n", |
251 |
| - " --bs 64 \\\n", |
252 |
| - " --n_grad_acc_steps 1 \\\n", |
253 |
| - " --n_epochs 1 \\\n", |
| 251 | + " --lr \"5e-5\" --bs 64 --n_grad_acc_steps 1 --n_epochs 1 \\\n", |
254 | 252 | " --gpu_ids \"0,1,2,3,4,5,6,7\" \\\n",
|
255 | 253 | " --output_dir \"models/dart-math-llama3-8b-prop2diff\"\n",
|
256 | 254 | "```\n",
|
|
275 | 273 | "bash scripts/train-multi-node.sh \\\n",
|
276 | 274 | " --data_path \"hkust-nlp/dart-math-hard\" \\\n",
|
277 | 275 | " --model_path \"meta-llama/Meta-Llama-3-70B\" \\\n",
|
278 |
| - " --lr \"2e-5\" \\\n", |
279 |
| - " --bs 64 \\\n", |
280 |
| - " --n_grad_acc_steps 1 \\\n", |
281 |
| - " --n_epochs 1 \\\n", |
| 276 | + " --lr \"2e-5\" --bs 64 --n_grad_acc_steps 1 --n_epochs 1 \\\n", |
282 | 277 | " --n_nodes 4 \\\n",
|
283 | 278 | " --output_dir \"models/dart-math-llama3-70b-prop2diff\"\n",
|
284 | 279 | "```\n",
|
|
291 | 286 | "bash scripts/train-multi-node.sh \\\n",
|
292 | 287 | " --data_path \"hkust-nlp/dart-math-uniform\" \\\n",
|
293 | 288 | " --model_path \"meta-llama/Meta-Llama-3-70B\" \\\n",
|
294 |
| - " --lr \"2e-5\" \\\n", |
295 |
| - " --bs 64 \\\n", |
296 |
| - " --n_grad_acc_steps 1 \\\n", |
297 |
| - " --n_epochs 1 \\\n", |
| 289 | + " --lr \"2e-5\" --bs 64 --n_grad_acc_steps 1 --n_epochs 1 \\\n", |
298 | 290 | " --n_nodes 4 \\\n",
|
299 | 291 | " --output_dir \"models/dart-math-llama3-70b-prop2diff\"\n",
|
300 | 292 | "```\n",
|
|
321 | 313 | "For example, to reproduce one pass of greedy decoding with `DART-Math-Mistral-7B-Prop2Diff` on the 6 benchmarks in Table 2 on GPU 0, please run the following command:\n",
|
322 | 314 | "\n",
|
323 | 315 | "```shell\n",
|
324 |
| - "CUDA_VISIBLE_DEVICES=\"0\" RAY_DEDUP_LOGS=0 python pipeline/gen.py \\\n", |
| 316 | + "CUDA_VISIBLE_DEVICES=\"0\" python pipeline/gen.py \\\n", |
325 | 317 | " --gen_save_path \"data/res/dart-math-mistral-7b-prop2diff.jsonl\" \\\n",
|
326 | 318 | " --model_name_or_path \"hkust-nlp/dart-math-mistral-7b-prop2diff\" \\\n",
|
327 | 319 | " --datasets \"math-test\" \"gsm8k-test\" \"mwpbench/college-math-test\" \"deepmind-mathematics\" \\\n",
|
328 | 320 | " \"olympiadbench/OE_TO_maths_en_COMP\" \"theoremqa\" \\\n",
|
329 |
| - " --max_new_tokens 2048 \\\n", |
330 |
| - " --temperature 0 \\\n", |
331 |
| - " --prompt_template \"auto\" \\\n", |
332 |
| - " --n_shots -1 \\\n", |
| 321 | + " --max_new_tokens 2048 --temperature 0 --top_p 0.95 \\\n", |
| 322 | + " --prompt_template \"cot\" --n_shots -1 \\\n", |
333 | 323 | " --inf_seed -1 \\\n",
|
334 |
| - " --do_eval \\\n", |
335 | 324 | " --max_n_trials 1\n",
|
336 | 325 | "```\n",
|
337 | 326 | "\n",
|
|
358 | 347 | "For example, to reproduce synthesis of `DART-Math-Uniform`, run the following command with different GPUs, please run the following command:\n",
|
359 | 348 | "\n",
|
360 | 349 | "```shell\n",
|
361 |
| - "CUDA_VISIBLE_DEVICES=\"0\" RAY_DEDUP_LOGS=0 python pipeline/gen.py \\\n", |
| 350 | + "CUDA_VISIBLE_DEVICES=\"0\" python pipeline/gen.py \\\n", |
362 | 351 | " --gen_save_path \"data/res/dart-math-uniform.jsonl\" \\\n",
|
363 | 352 | " --model_name_or_path \"deepseek-ai/deepseek-math-7b-rl\" \\\n",
|
364 | 353 | " --datasets \"math-train\" \"gsm8k-train\" \\\n",
|
365 |
| - " --max_new_tokens 2048 \\\n", |
366 |
| - " --temperature 1.6 \\\n", |
367 |
| - " --top_p 0.95 \\\n", |
368 |
| - " --prompt_template \"auto\" \\\n", |
369 |
| - " --n_shots 0 \\\n", |
| 354 | + " --max_new_tokens 2048 --temperature 1.6 --top_p 0.95 \\\n", |
| 355 | + " --prompt_template \"cot\" --n_shots 0 \\\n", |
370 | 356 | " --inf_seed -1 \\\n",
|
371 |
| - " --do_eval \\\n", |
372 |
| - " --min_n_corrects 40 \\\n", |
373 |
| - " --max_n_trials 0 # unlimited, should be killed manually\n", |
| 357 | + " --min_n_corrects 40 --max_n_trials 0 # unlimited, should be killed manually\n", |
374 | 358 | "```\n"
|
375 | 359 | ]
|
376 | 360 | },
|
|
401 | 385 | "source": [
|
402 | 386 | "Thanks to:\n",
|
403 | 387 | "\n",
|
404 |
| - "- [`nbdev`](https://nbdev.fast.ai/) for genrating the [wonderful documentation website](https://hkust-nlp.github.io/dart-math),\n", |
| 388 | + "- [`nbdev`](https://nbdev.fast.ai/) for generating the [wonderful documentation website](https://hkust-nlp.github.io/dart-math),\n", |
405 | 389 | "- [`stanford_alpaca`](https://github.com/tatsu-lab/stanford_alpaca) for reference code about training,\n",
|
406 | 390 | "- [`functionary`](https://github.com/MeetKai/functionary/tree/main/functionary/train/packing) for reference code about [sequence packing](https://hkust-nlp.github.io/dart-math/train.html#sequence-packing).\n"
|
407 | 391 | ]
|
|
421 | 405 | "\n",
|
422 | 406 | "```latex\n",
|
423 | 407 | "@article{tong2024dartmath,\n",
|
424 |
| - " author = {Yuxuan Tong, Xiwen Zhang, Rui Wang, Ruidong Wu, Junxian He },\n", |
| 408 | + " author = {Yuxuan Tong, Xiwen Zhang, Rui Wang, Ruidong Wu, Junxian He},\n", |
425 | 409 | " title = {DART-Math: Difficulty-Aware Rejection Tuning for Mathematical Problem-Solving},\n",
|
426 | 410 | " year = {2024},\n",
|
427 | 411 | " publisher = {GitHub},\n",
|
|
0 commit comments