We’re on a journey to advance and democratize artificial intelligence through open source and open science.
huggingface.co
StackLLaMA: A hands-on guide to train LLaMA with RLHF
Published April 5, 2023
Edward Beeching
Kashif Rasul
Younes Belkada
Lewis Tunstall
Leandro von Werra
Nazneen Rajani
Nathan Lambert
Models such as ChatGPT, GPT-4, and Claude are powerful language models that have been fine-tuned using a method called Reinforcement Learning from Human Feedback (RLHF) to be better aligned with how we expect them to behave and would like to use them.
In this blog post, we show all the steps involved in training a LlaMa model to answer questions on Stack Exchange with RLHF through a combination of:
Supervised Fine-tuning (SFT)
Reward / preference modeling (RM)
Reinforcement Learning from Human Feedback (RLHF)
From InstructGPT paper: Ouyang, Long, et al. "Training language models to follow instructions with human feedback." arXiv preprint arXiv:2203.02155 (2022).
By combining these approaches, we are releasing the StackLLaMA model. This model is available on the
Hub (see Meta's LLaMA release for the original LLaMA model) and the entire training pipeline is available as part of the Hugging Face TRL library. To give you a taste of what the model can do, try out the demo below!
StackLLaMa is a 7 billion parameter language model based on Meta’s LLaMA model that has been trained on pairs of questions and answers from Stack Exchange using Reinforcement Learning from Human Feedback (RLHF) with the TRL library. For more details, check out our blog post.
Type in the box below and click the button to generate answers to your most pressing questions!
Intended Use: this app and its supporting model are provided as educational tools to explain RLHF with the TRL library; not to serve as replacement for human expertise. For more details on the model’s limitations in terms of factuality and biases, see the model card.
Data Collection: by default, we are collecting the prompts entered in this app to further improve and evaluate the model. Do not share any personal or sensitive information while using the app! You can opt out of this data collection by removing the checkbox below:
{continue reading post on site..}