|
@@ -1,3 +1,36 @@
|
|
|
# ToRA
|
|
|
|
|
|
-微软开源的 推理 LLM 代理工具集
|
|
|
+微软开源的 推理 LLM 代理工具集,解决数学推理问题,一个数学问题,给出答案,python代码实现。
|
|
|
+
|
|
|
+## Usage
|
|
|
+
|
|
|
+```
|
|
|
+git clone https://github.com/microsoft/ToRA.git && cd ToRA/src
|
|
|
+
|
|
|
+conda create -n tora python=3.10
|
|
|
+conda activate tora
|
|
|
+pip install torch==2.0.1 --index-url https://download.pytorch.org/whl/cu118 # CUDA 11.8 for example
|
|
|
+pip install -r requirements.txt
|
|
|
+
|
|
|
+# 训练
|
|
|
+bash scritps/train.sh codellama 7b
|
|
|
+
|
|
|
+# 评估
|
|
|
+python -m eval.evaluate \
|
|
|
+ --data_name "math" \
|
|
|
+ --prompt_type "tora" \
|
|
|
+ --file_path "outputs/llm-agents/tora-code-34b-v1.0/math/test_tora_-1_seed0_t0.0_s0_e5000.jsonl" \
|
|
|
+ --execute
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+模型下载:
|
|
|
+https://huggingface.co/llm-agents
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+## 源码分析
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+```
|