This model consists of the final step of a modified pipeline the to the traditional training process of Chat-GPT models, which is comprised of a three-step procedure of supervised fine tuning, reward model and reinforcement learning from human feedback models; actor, actor EMA and critic models.
This project's main goal was to make proper use of existing frameworks that revolve around the minimisation of training costs and thus the eventual improvements towards both the feasibility and usability of ChatGPT-like models. The framework selected here is DeepSpeed which has been instrumental in the development of this model and through this framework it was possible to train the ChatGPT-like model on much larger data-sets with a reasonable number of GPUs and consequently achieve significantly better performance.
This model follows the blog of ChatGPT and the paper of InstructGPT and especially the Microsoft DeepSpeed Chat Blog.
The training process simply involves a single python run of DeepSpeed-Chat which initiates the whole 3-step pipeline, saving all models in the process:
python train.py --actor-model facebook/opt-1.3b --reward-model facebook/opt-350m --deployment-type single_node
This pipeline can be broken up into three key steps:
Supervised fine-tuning (SFT): See here.
Reward Model (RM) fine-tuning: See here.
Reinforcement-learning from Human feedback (RLHF) fine-tuning: At the completion of the prior two steps, the final RLHF fine-tuning can be initiated. This involves the collection of both the fine-tuned model from step 1 and the reward model from step 2 and train them on the data-set with comparisons. This generates both an actor and critic. I also generate an actor model with an exponential moving average (EMA) which is known to improve conversational response quality.
To view the details behind each step head into their respective links and view the model card there.
|Max Position Embedding||2048|
|Train Batch size||32|
|Train micro batch size||4|
If using through the HuggingFace transformers library:
from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AdamG012/chat-opt-1.3b-rlhf-actor-deepspeed") model = AutoModelForCausalLM.from_pretrained("AdamG012/chat-opt-1.3b-rlhf-actor-deepspeed")
If you would like to clone from source:
# Make sure you have git-lfs installed (https://git-lfs.github.com) git lfs install git clone https://huggingface.co/AdamG012/chat-opt-1.3b-rlhf-actor-deepspeed # if you want to clone without large files – just their pointers # prepend your git clone with the following env var: GIT_LFS_SKIP_SMUDGE=1
We thank the following papers and open-source repositories. We especially thank DeepSpeed for their frameworks as well.
- Downloads last month