Downloads · 30 days
13
1% of all-time downloads
prhegde/aligned-merge-aanaphi-phi2-orage-3b
aligned-merge-aanaphi-phi2-orage-3b is a text generation model from prhegde. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Recent advancements in Large Language Models (LLMs) have focused on aligning these models with human preferences. Approaches like Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (D…
Downloads · 30 days
13
1% of all-time downloads
All-time downloads
2K
Public
Parameters
2.8B
11.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors11.1 GB · 100%
From the Hugging Face model README
Recent advancements in Large Language Models (LLMs) have focused on aligning these models with human preferences. Approaches like Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (DPO) achieve this alignment by optimizing for human preferences data. RLHF does this by learning an explicit reward model and uses RL to optimize policy while DPO directly optimizes policy without the need of a reward model.
An alternative method to align LLM responses involves utilizing correction mechanisms. Corrections offer more explicit feedback compared to scalar rewards. Instead of directly optimizing for human preferences, our approach aims to minimize the required amount of correction. This correction is determined by comparing the model's response with a corrected version provided by a teacher, which can be either a human or a more accurate model.
The correction mechanism can serve as a form of regularization, preventing excessive alterations to the model, whereas preference optimization algorithms have the potential to significantly alter the model's behavior based on the training samples in preference data.
This model is output of a POC experiment using above hypothesis. In this experiment, the base model is initialized from a merged model - https://huggingface.co/prhegde/merge-aanaphi-phi2-orage-3b. Mistral-7b-instruct is used as a teacher model. These models are selected with consideration for the compute resource constraints.
The proposed methodology involves the following steps:
This framework allows for the selection of \(P\), offering the flexibility to choose. If additional prior assumptions are available, they can be integrated. For instance, a prior concerning the distribution of response lengths could be included, limiting the model to produce responses of a certain length. If \(P(y)\) = \(\pi(y)\) * \(l(y)\), where \(l(y)\) is a prior specific to a target domain, the optimization function becomes \(min_{\pi} ( \log(\pi(y/x)) - \log(\pi(y’/x) ) + \log(l(y)) - \log(l(y’)) \). This indicates the aim to minimize the extra loss specific to the target domain.
The proposed approach has a direct connection to the DPO and CPL frameworks. If we set the rejected sample to the generated sample \( y \) and the accepted sample to the corrected sample \( y' \), and choose \(P\) to be \( \pi/\pi_{old} \), then the DPO objective function becomes equivalent to the proposed objective function. Same can be observed with the CPL objective.
This hypothesis requires further evaluation using larger models, which will require increased computational resources. If you are interested in collaborating on these experiments, please get in touch.
Email: [email protected]
Linkedin: https://www.linkedin.com/in/praveen-hegde-7548a12b