Aligning LLM with Direct Preference Optimization and LoRA to improve the mathematical reasoning capabilities
Arithmo-Mistral-7B was trained to reason and answer mathematical problems. The model was trained with Arithmo-data.
In this work, we further align the model using preference dataset and direct preference optimization method (DPO).
The preference dataset is derived from the stack exchange dataset which contains questions and answers from the Stack Overflow Data Dump. This contains questions and answers for various topics. For this work, we used only question and answers from math.stackexchange.com sub-folder.
The questions are grouped with answers that are assigned a score corresponding to the Anthropic paper:
score = log2 (1 + upvotes) rounded to the nearest integer, plus 1 if the answer was accepted by the questioner (we assign a score of −1 if the number of upvotes is negative).
We performed following processing to derive the final dataset.
The model is evaluated on gsm8k test set. Evaluation is performed in exactly the same way as in base arithmo model
Results for all models except dpo-arithmo-mistral-7B are taken from arithmo-mistral-7b repository.
@online{h4stackexchange,
author = {Lambert, Nathan and Tunstall, Lewis and Rajani, Nazneen and Thrush, Tristan},
title = {HuggingFace H4 Stack Exchange Preference Dataset},
year = 2023,
url = {https://huggingface.co/datasets/HuggingFaceH4/stack-exchange-preferences},
}
7 commits
Python
100.0%
Aligning LLM with Direct Preference Optimization and LoRA to improve the mathematical reasoning capabilities
Arithmo-Mistral-7B was trained to reason and answer mathematical problems. The model was trained with Arithmo-data.
In this work, we further align the model using preference dataset and direct preference optimization method (DPO).
The preference dataset is derived from the stack exchange dataset which contains questions and answers from the Stack Overflow Data Dump. This contains questions and answers for various topics. For this work, we used only question and answers from math.stackexchange.com sub-folder.
The questions are grouped with answers that are assigned a score corresponding to the Anthropic paper:
score = log2 (1 + upvotes) rounded to the nearest integer, plus 1 if the answer was accepted by the questioner (we assign a score of −1 if the number of upvotes is negative).
We performed following processing to derive the final dataset.
The model is evaluated on gsm8k test set. Evaluation is performed in exactly the same way as in base arithmo model
Results for all models except dpo-arithmo-mistral-7B are taken from arithmo-mistral-7b repository.
@online{h4stackexchange,
author = {Lambert, Nathan and Tunstall, Lewis and Rajani, Nazneen and Thrush, Tristan},
title = {HuggingFace H4 Stack Exchange Preference Dataset},
year = 2023,
url = {https://huggingface.co/datasets/HuggingFaceH4/stack-exchange-preferences},
}
7 commits
Python
100.0%