### Installing Dependencies for Mistral/Llama (Bash) Source: https://github.com/thudm/rest-mcts/blob/main/README.md This command installs the necessary Python packages for running models such as Mistral or Llama. It reads the required dependencies from the `requirements_mistral.txt` file, ensuring compatibility with specific `transformers` library versions. ```bash pip install -r requirements_mistral.txt ``` -------------------------------- ### Installing Dependencies for SciGLM (Bash) Source: https://github.com/thudm/rest-mcts/blob/main/README.md This command installs the necessary Python packages specifically for running the SciGLM model. It sources the required dependencies from the `requirements_sciglm.txt` file, addressing specific `transformers` library version requirements for GLM series models. ```bash pip install -r requirements_sciglm.txt ``` -------------------------------- ### Evaluating MCTS* on Benchmarks using Bash Source: https://github.com/thudm/rest-mcts/blob/main/README.md This bash command provides an example for evaluating MCTS* on benchmarks using the 'evaluate.py' script. It specifies various parameters such as the task name ('scibench'), file subset ('thermo'), proposal method ('gpt'), value method ('local'), mode ('mcts'), evaluation target, iteration limit, reflection usage, and branching factor. ```bash python evaluate.py \ --task_name "scibench" \ --file "thermo" \ --propose_method "gpt" \ --value_method "local" \ --mode "mcts" \ --evaluate "scibench" \ --iteration_limit 50 \ --use_reflection "simple" \ --branch 3 ``` -------------------------------- ### Running Single Question MCTS* Search with Python Source: https://github.com/thudm/rest-mcts/blob/main/README.md This Python script demonstrates how to perform an MCTS* search for a single question. It initializes an MCTS_Task with the question, policy model ('llama'), value model ('local'), and language ('en'), then executes the task and prints the obtained solution. ```python from MCTS.task import * question = "Calculate the sum of the first 10 prime numbers." task = MCTS_Task(question, 'llama', 'local', lang='en') output = task.run() print(output['solution']) ``` -------------------------------- ### Citing ReST-MCTS Paper (BibTeX) Source: https://github.com/thudm/rest-mcts/blob/main/README.md This snippet provides the BibTeX entry for citing the 'ReST-MCTS*: LLM Self-Training via Process Reward Guided Tree Search' paper. It includes essential bibliographic details such as authors, title, journal, and year, which is crucial for academic referencing and acknowledging the work. ```BibTeX @article{zhang2024rest, title={ReST-MCTS*: LLM Self-Training via Process Reward Guided Tree Search}, author={Zhang, Dan and Zhoubian, Sining and Hu, Ziniu and Yue, Yisong and Dong, Yuxiao and Tang, Jie}, journal={arXiv preprint arXiv:2406.03816}, year={2024} } ``` -------------------------------- ### Installing Python Dependencies via pip Source: https://github.com/thudm/rest-mcts/blob/main/requirements_sciglm.txt This snippet specifies the Python packages and their exact versions required for the project. It also includes a custom index URL for `pip` to fetch packages from Tsinghua University's PyPI mirror, which can improve download speeds in certain regions. These dependencies are crucial for the project's functionality, covering areas like machine learning (transformers, torch), UI (gradio, streamlit), and text processing (sentencepiece, jieba). ```Python --index-url https://pypi.tuna.tsinghua.edu.cn/simple protobuf==3.20.0 transformers==4.30.2 cpm_kernels torch==2.1.0 gradio==3.48.0 mdtex2html==1.2.0 sentencepiece==0.1.99 accelerate==0.23.0 sse-starlette==1.6.5 streamlit>=1.24.0 rouge_chinese jieba==0.42.1 datasets==2.13.0 ltk==3.8.1 deepspeed==0.11.1 wandb sympy==1.12 ``` -------------------------------- ### Defining JSON Data Format for Questions Source: https://github.com/thudm/rest-mcts/blob/main/README.md This snippet illustrates the required JSON format for question datasets. It specifies that the 'content' field is mandatory for the question, while the 'answer' field is optional and used for evaluation purposes. ```json { "content": "Calculate the sum of the first 10 prime numbers.", "answer": "129" } ``` -------------------------------- ### Python Project Dependency List with Custom Index Source: https://github.com/thudm/rest-mcts/blob/main/requirements_mistral.txt This snippet lists all direct and transitive Python package dependencies with their pinned versions, essential for recreating the project's development or production environment. It also specifies a custom PyPI index URL for package resolution. ```Python --index-url https://pypi.tuna.tsinghua.edu.cn/simple absl-py==2.1.0 accelerate==0.30.1 addict==2.4.0 adjustText==1.2.0 aiohttp==3.8.6 aiosignal==1.3.1 annotated-types==0.7.0 anyio==4.6.0 astunparse==1.6.3 async-timeout==4.0.3 attrs==23.1.0 backoff==2.2.1 branca==0.7.2 certifi==2023.7.22 cffi==1.16.0 charset-normalizer==3.3.0 click==8.1.7 cloudpickle==3.0.0 colorama==0.4.6 colourmap==1.1.17 contourpy==1.1.1 crcmod==1.7 cryptography==42.0.5 cycler==0.12.1 datasets==2.14.7 dill==0.3.7 diskcache==5.6.3 distro==1.9.0 docopt==0.6.2 docstring_parser==0.16 docutils==0.21.2 einops==0.7.0 et-xmlfile==1.1.0 evaluate==0.4.2 filelock==3.12.4 fire==0.6.0 flatbuffers==24.3.25 folium==0.17.0 fonttools==4.43.1 frozenlist==1.4.0 fsspec==2023.9.2 gast==0.5.4 geopy==2.4.1 gguf==0.10.0 graphviz==0.20.1 grpcio==1.66.1 gym==0.26.2 gym-notices==0.0.8 h11==0.14.0 h5py==3.11.0 httpcore==1.0.6 httptools==0.6.1 httpx==0.27.2 huggingface-hub==0.17.3 idna==3.4 importlib_metadata==7.1.0 interegular==0.3.3 Jinja2==3.1.2 jiter==0.6.0 jmespath==0.10.0 joblib==1.3.2 jsonschema==4.23.0 jsonschema-specifications==2023.12.1 keras==3.5.0 lark==1.2.2 libclang==18.1.1 llvmlite==0.43.0 lm-format-enforcer==0.10.6 lxml==5.2.2 Markdown==3.7 markdown-it-py==3.0.0 MarkupSafe==2.1.3 matplotlib==3.6.3 mcts==1.0.4 mdurl==0.1.2 mistral_common==1.4.4 ml-dtypes==0.4.0 modelscope==1.13.3 mpmath==1.3.0 msgpack==1.1.0 msgspec==0.18.6 multidict==6.0.4 multiprocess==0.70.15 namex==0.0.8 nest-asyncio==1.6.0 networkx==3.1 numba==0.60.0 numpy==1.26.1 nvidia-ml-py==12.560.30 openai==1.51.1 opencv-python==4.8.1.78 openpyxl==3.1.2 opt-einsum==3.3.0 optree==0.12.1 oss2==2.18.4 outlines==0.0.46 packaging==23.2 pandas==2.1.3 partial-json-parser==0.2.1.1.post4 patsy==0.5.6 peft==0.11.1 pillow==10.4.0 platformdirs==4.2.0 portalocker==2.10.1 protobuf==4.25.4 psutil==5.9.8 py-cpuinfo==9.0.0 pyairports==2.1.1 pyarrow==15.0.2 pyarrow-hotfix==0.6 pybboxes==0.1.6 pycountry==24.6.1 pycparser==2.22 pycryptodome==3.20.0 pydantic==2.9.2 pydantic_core==2.23.4 Pygments==2.18.0 pylatexenc==2.10 pyparsing==3.1.1 python-dateutil==2.8.2 python-dotenv==1.0.1 pytz==2023.3.post1 PyYAML==6.0.1 pyzmq==26.2.0 qt5-applications==5.15.2.2.3 qt5-tools==5.15.2.1.3 rapidfuzz==3.9.7 ray==2.37.0 referencing==0.35.1 regex==2023.10.3 requests==2.31.0 rich==13.7.1 rpds-py==0.20.0 sacrebleu==2.4.2 sacremoses==0.1.1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.