1 line
6.3 KiB
JSON
1 line
6.3 KiB
JSON
{"repo": "chihaya-anon-chan/pilot", "files": {"README.md": {"097fd6ccd4d29ba52604a21afad680ac8db24d6d": {"t": 1785746367.9384737, "n": 2626, "h": "d858ccfab2f771f5", "c": "# PILOT: Planning via Internalized Latent Optimization Trajectories for Large Language Models\n## ACL 2026 Main Conference\n[](https://arxiv.org/abs/2601.19917)\n\n\nOfficial code for **\"PILOT: Planning via Internalized Latent Optimization Trajectories for Large Language Models\"**.\n\nPILOT is a non-invasive reasoning adaptation framework that learns a query-conditioned latent anchor at a strategic pivot layer, improving multi-step reasoning while keeping the backbone language model frozen.\n\n\n\n\n## Installation\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n## Data Preparation\n\nDownload public benchmarks locally with:\n\n```bash\npython scripts/prepare_data.py --dataset math500,gsm8k,humaneval,mbpp --output-dir ./benchmark\n```\n\nAvailable dataset targets include:\n- `math500`\n- `gsm8k`\n- `math_train`\n- `humaneval`\n- `mbpp`\n\nTraining data should be provided as JSONL with fields:\n- `question`\n- `guidance`\n- `answer`\n\n`create_guidance.py` also supports optional OpenAI-compatible remote APIs for guidance generation. The default example in this repository uses DeepSeek:\n\n```bash\nexport DEEPSEEK_API_KEY=your-key-here\nexport DEEPSEEK_BASE_URL=https://api.deepseek.com/v1\nexport DEEPSEEK_MODEL=deepseek-v3.1-terminus\n\npython create_guidance.py \\\n --task math \\\n --sample-input-file ./benchmark/MATH/train.jsonl \\\n --sample-output-file ./datasets_cot/math_cot.jsonl\n```\n\n## Training\n\nExample training command:\n\n```bash\ntorchrun --nproc_per_node=8 train_ddp.py \\\n --model qwen2.5-1.5B-instruct \\\n --inserted_layer 20 \\\n --source_file ./datasets_cot/math_cot.jsonl \\\n --save_path ./saves/qwen2.5-1.5b-reasoning \\\n --batch_size 4 \\\n --gradient_accumulation_steps 4 \\\n --epochs1 2 \\\n --epochs2 3 \\\n --lr1 5e-5 \\\n --lr2 1e-5 \\\n --dtype bf16\n```\n\n## Evaluation\n\n```bash\npython evaluate.py \\\n --checkpoint-path ./saves/qwen2.5-1.5b-reasoning \\\n --sample-input-file ./benchmark/math500/test.jsonl \\\n --sample-output-file ./results/math500_results.jsonl \\\n --model qwen2.5-1.5B-instruct \\\n --task math \\\n --dtype bf16 \\\n --max_tokens 2048\n```\n\n## Citation\n\n```bibtex\n@article{zheng2026pilot,\n title={PILOT: Planning via Internalized Latent Optimization Trajectories for Large Language Models},\n author={Zheng, Haoyu and Zhu, Yun and Yuan, Yuqian and Yuan, Bo and Zhang, Wenqiao and Tang, Siliang and Xiao, Jun},\n journal={arXiv preprint arXiv:2601.19917},\n year={2026}\n}\n```\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n"}, "912d1728c1c5efd7cf2c9594fd0079ccbcecc00b": {"t": 1785762859.0875642, "n": 3279, "h": "e3c2f3a5ec184f98", "c": "# PILOT: Planning via Internalized Latent Optimization Trajectories for Large Language Models (ACL 2026 Main Conference)\n\n[](https://arxiv.org/abs/2601.19917)\n\n\nOfficial code for **\"PILOT: Planning via Internalized Latent Optimization Trajectories for Large Language Models\"**, accepted to **ACL 2026 Main Conference**.\n\nPILOT is a non-invasive reasoning adaptation framework that learns a query-conditioned latent anchor at a strategic pivot layer, improving multi-step reasoning while keeping the backbone language model frozen.\n\n\n\n## Highlights\n\n- A lightweight reasoning adaptation framework for compact and mid-scale LLMs.\n- Freezes the backbone model and trains only PILOT-specific modules.\n- Supports **Qwen2.5-1.5B**, **Qwen2.5-7B**, and **Llama-3.1-8B** backbones.\n- Includes training, evaluation, benchmark preparation, and optional guidance generation pipelines.\n\n## Installation\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n## Quick Start\n\nRun a lightweight end-to-end smoke test:\n\n```bash\nbash scripts/run_smoke_test.sh\n```\n\nThis script will automatically:\n- create a tiny toy training set if needed,\n- download MATH-500 if needed,\n- train a small PILOT adapter,\n- evaluate on a small subset.\n\n## Data Preparation\n\nDownload public benchmarks locally with:\n\n```bash\npython scripts/prepare_data.py --dataset math500,gsm8k,humaneval,mbpp --output-dir ./benchmark\n```\n\nAvailable dataset targets include:\n- `math500`\n- `gsm8k`\n- `math_train`\n- `humaneval`\n- `mbpp`\n\nTraining data should be provided as JSONL with fields:\n- `question`\n- `guidance`\n- `answer`\n\n`create_guidance.py` also supports optional OpenAI-compatible remote APIs for guidance generation. The default example in this repository uses DeepSeek:\n\n```bash\nexport DEEPSEEK_API_KEY=your-key-here\nexport DEEPSEEK_BASE_URL=https://api.deepseek.com/v1\nexport DEEPSEEK_MODEL=deepseek-v3.1-terminus\n\npython create_guidance.py \\\n --task math \\\n --sample-input-file ./benchmark/MATH/train.jsonl \\\n --sample-output-file ./datasets_cot/math_cot.jsonl\n```\n\n## Training\n\nExample training command:\n\n```bash\ntorchrun --nproc_per_node=8 train_ddp.py \\\n --model qwen2.5-1.5B-instruct \\\n --inserted_layer 20 \\\n --source_file ./datasets_cot/math_cot.jsonl \\\n --save_path ./saves/qwen2.5-1.5b-reasoning \\\n --batch_size 4 \\\n --gradient_accumulation_steps 4 \\\n --epochs1 2 \\\n --epochs2 3 \\\n --lr1 5e-5 \\\n --lr2 1e-5 \\\n --dtype bf16\n```\n\n## Evaluation\n\n```bash\npython evaluate.py \\\n --checkpoint-path ./saves/qwen2.5-1.5b-reasoning \\\n --sample-input-file ./benchmark/math500/test.jsonl \\\n --sample-output-file ./results/math500_results.jsonl \\\n --model qwen2.5-1.5B-instruct \\\n --task math \\\n --dtype bf16 \\\n --max_tokens 2048\n```\n\n## Citation\n\n```bibtex\n@article{zheng2026pilot,\n title={PILOT: Planning via Internalized Latent Optimization Trajectories for Large Language Models},\n author={Zheng, Haoyu and Zhu, Yun and Yuan, Yuqian and Yuan, Bo and Zhang, Wenqiao and Tang, Siliang and Xiao, Jun},\n journal={arXiv preprint arXiv:2601.19917},\n year={2026}\n}\n```\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n"}}}} |