Note: Our models are tuned based on Codellama, thus, licenses applicable to Codellama, such as Llama license, also hold on these models
Training Data
The model is trained on GSM8k data with Python SDP CoT format, which can be found here
Training Procedure
Check out our paper and repo for complete details.
ReFT model
ReFT model is warm-up via Supervised Fine-tuning using GSM8k Python SDP training data for 2 epochs then it is REinforced Fine-tuned for 300 epochs using questions in GSM8k training set.
Rerank model
Rerank model is trained to classify if the output CoT is correct or not using sampling data of ReFT model after 2 epochs warm-up.
Evaluation Results
See evaluations results of the models at table 4 of the research paper.
You can use the models through Huggingface's Transformers library or follow scripts in our repo.
Prompt format:
python
1Question:2Weng earns $12 an hour for babysitting. Yesterday, she
3just did 50 minutes of babysitting. How much did she earn?
4Answer reasoning:
Expected response:
python
1defsolution():2"""Weng earns $12 an hour for babysitting. Yesterday, she just did
3 50 minutes of babysitting. How much did she earn?"""4 hourly_rate =125 minutes_worked =506 hours_worked = minutes_worked /607 earnings = hourly_rate * hours_worked
8 result = earnings
9return result
Citation
Please cite the paper if you use our data, model or code.
@misc{luong2024reft,
title={ReFT: Reasoning with Reinforced Fine-Tuning},
author={Trung Quoc Luong and Xinbo Zhang and Zhanming Jie and Peng Sun and Xiaoran Jin and Hang Li},
year={2024},
eprint={2401.08967},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
Intended Use
Intended Use Cases Code Llama and its variants is intended for commercial and research use in English and relevant programming languages. The base model Code Llama can be adapted for a variety of code synthesis and understanding tasks, Code Llama - Python is designed specifically to handle the Python programming language, and Code Llama - Instruct is intended to be safer to use for code assistant and generation applications.
Out-of-Scope Uses Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Code Llama and its variants.
Ethical Considerations and Limitations
Code Llama and its variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Code Llama’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of Code Llama, developers should perform safety testing and tuning tailored to their specific applications of the model.