trl
lm-human-preferences
trl | lm-human-preferences | |
---|---|---|
13 | 8 | |
8,176 | 1,113 | |
4.9% | 2.8% | |
9.7 | 2.7 | |
1 day ago | 10 months ago | |
Python | Python | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
trl
- FLaNK Stack 29 Jan 2024
-
OOM Error while using TRL for RLHF Fine-tuning
I am using TRL for RLHF fine-tuning the Llama-2-7B model and getting an OOM error (even with batch_size=1). If anyone used TRL for RLHF can please tell me what I am doing wrong? Code details can be found in the GitHub issue.
-
[D] Tokenizers Truncation during Fine-tuning with Large Texts
SFTtrainer from huggingface
-
New Open-source LLMs! 🤯 The Falcon has landed! 7B and 40B
For lora - PEFT seems to work. I don't have patience to wait 5 hours, but modifying this example seems to work. You don't even need to modify that much, as their model just as neo-x uses query_key_value name for self-attention.
-
[D] Using RLHF beyond preference tuning
They have examples of making GPT output more positive (code) by using a sentiment model as reward. There are other examples about reducing toxicity, summarization here: https://github.com/lvwerra/trl/tree/main/examples . Should be fairly simple to modify the sentiment example and try the calculator reward you mentioned above.
-
[R] 🤖🌟 Unlock the Power of Personal AI: Introducing ChatLLaMA, Your Custom Personal Assistant! 🚀💬
You can use this -> https://github.com/lvwerra/trl/blob/main/examples/sentiment/scripts/gpt-neox-20b_peft/merge_peft_adapter.py
-
[R] Stanford-Alpaca 7B model (an instruction tuned version of LLaMA) performs as well as text-davinci-003
Just the hh directly. From the results it seems like it might possibly be enough but I might also try instruction tuning then running the whole process from that base. I will also be running the reinforcement learning by using a Lora using this as an example https://github.com/lvwerra/trl/tree/main/examples/sentiment/scripts/gpt-neox-20b_peft
-
[R] A simple explanation of Reinforcement Learning from Human Feedback (RLHF)
This package is pretty simple to use! https://github.com/lvwerra/trl
- Transformer Reinforcement Learning
- trl: Train transformer language models with reinforcement learning
lm-human-preferences
- Ask HN: Open-source GPT-3 alternatives
- El éxito continuo de OpenAI: Y como llegaron a crear la IA más avanzada del 2023. ChatGPT.
-
Sam Altman on the best and worst case scenario for AI - "...the good case is just so unbelievably good that you sound like a really crazy person to start talking about it."
Lest you think that that sounds like a too galaxy-brained possibility, it has already happened at OpenAI (scroll down to "Bugs can optimize for bad behavior"), just with a model that was very far from being capable enough to be dangerous.
-
Value head in GPT2
Found relevant code at https://github.com/openai/lm-human-preferences + all code implementations here
-
Should we stick to the devil we know?
That's why, when they're serious, they use RL for finetuning from human preferences (would be hilarious if this attempt to solve the terrible bias you take to be evidence of AGI threat ends up creating a Woke Singleton itself, btw); it's a powerful general approach, and I see no sign of it being applied here.
-
Dall-E 2
The kind of measures they are taking, like simply deleting wholesale anything problematic, don't really have a '-1'.
But amusingly, exactly that did happen in one of their GPT experiments! https://openai.com/blog/fine-tuning-gpt-2/
- Discussion Thread
-
[D] Applications for using reinforcement learning to fine-tune GPT-2
Code for https://arxiv.org/abs/1909.08593 found: https://github.com/openai/lm-human-preferences
What are some alternatives?
alpaca-lora - Instruct-tune LLaMA on consumer hardware
GLM-130B - GLM-130B: An Open Bilingual Pre-Trained Model (ICLR 2023)
trlx - A repo for distributed training of language models with Reinforcement Learning via Human Feedback (RLHF)
dalle-mini - DALL·E Mini - Generate images from a text prompt
LLaMA-8bit-LoRA - Repository for Chat LLaMA - training a LoRA for the LLaMA (1 or 2) models on HuggingFace with 8-bit or 4-bit quantization. Research only.
tensorrtx - Implementation of popular deep learning networks with TensorRT network definition API
sparsegpt-for-LLaMA - Code for the paper "SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot" with LLaMA implementation.
glide-text2im - GLIDE: a diffusion-based text-conditional image synthesis model
llama-recipes - Scripts for fine-tuning Meta Llama3 with composable FSDP & PEFT methods to cover single/multi-node GPUs. Supports default & custom datasets for applications such as summarization and Q&A. Supporting a number of candid inference solutions such as HF TGI, VLLM for local or cloud deployment. Demo apps to showcase Meta Llama3 for WhatsApp & Messenger.
gpt-2 - Code for the paper "Language Models are Unsupervised Multitask Learners"
Deep_Object_Pose - Deep Object Pose Estimation (DOPE) – ROS inference (CoRL 2018)
dalle-2-preview