Skip to content

Instantly share code, notes, and snippets.

View dongkwan-kim's full-sized avatar
🎯
Focusing

Dongkwan Kim dongkwan-kim

🎯
Focusing
View GitHub Profile

Reinforcement Learning for Language Models

Yoav Goldberg, April 2023.

Why RL?

With the release of the ChatGPT model and followup large language models (LLMs), there was a lot of discussion of the importance of "RLHF training", that is, "reinforcement learning from human feedback". I was puzzled for a while as to why RL (Reinforcement Learning) is better than learning from demonstrations (a.k.a supervised learning) for training language models. Shouldn't learning from demonstrations (or, in language model terminology "instruction fine tuning", learning to immitate human written answers) be sufficient? I came up with a theoretical argument that was somewhat convincing. But I came to realize there is an additional argumment which not only supports the case of RL training, but also requires it, in particular for models like ChatGPT. This additional argument is spelled out in (the first half of) a talk by John Schulman from OpenAI. This post pretty much

@yoavg
yoavg / LLMs.md
Last active October 30, 2024 08:38

Some remarks on Large Language Models

Yoav Goldberg, January 2023

Audience: I assume you heard of chatGPT, maybe played with it a little, and was imressed by it (or tried very hard not to be). And that you also heard that it is "a large language model". And maybe that it "solved natural language understanding". Here is a short personal perspective of my thoughts of this (and similar) models, and where we stand with respect to language understanding.

Intro

Around 2014-2017, right within the rise of neural-network based methods for NLP, I was giving a semi-academic-semi-popsci lecture, revolving around the story that achieving perfect language modeling is equivalent to being as intelligent as a human. Somewhere around the same time I was also asked in an academic panel "what would you do if you were given infinite compute and no need to worry about labour costs" to which I cockily responded "I would train a really huge language model, just to show that it doesn't solve everything!". We

%%%%% NEW MATH DEFINITIONS %%%%%
\usepackage{amsmath,amsfonts,bm}
% Mark sections of captions for referring to divisions of figures
\newcommand{\figleft}{{\em (Left)}}
\newcommand{\figcenter}{{\em (Center)}}
\newcommand{\figright}{{\em (Right)}}
\newcommand{\figtop}{{\em (Top)}}
\newcommand{\figbottom}{{\em (Bottom)}}
@dongkwan-kim
dongkwan-kim / nvidia_docker_setup.sh
Last active August 7, 2024 03:40
nvidia docker setup in remote server accessible by ssh
# In the server, (images what I mostly used)
docker pull nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04
# cuda 10.0 multiple ports volume binding
docker run -ti --runtime=nvidia --name dongkwan -p 8082:22 -p 8083:6006 --ipc=host -v /mnt/nas2:/mnt/nas2 -d nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04 /bin/bash
# Unknown runtime specified nvidia
docker run -ti --gpus '"device=0,1,2,3"' --name dongkwan -p 8070:22 --ipc=host -d nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04 /bin/bash
# For volume
docker volume create volume_name
@brycemcd
brycemcd / openzoom.zsh
Created December 14, 2016 15:34
Opens a zoom meeting in a browser from the command line
#!/bin/zsh
# Opens a zoom meeting with the name you've given it.
# Drop this script in /usr/local/bin/openzoom
# Invoke with `openzoom meeting_name`
typeset -A meeting
# NOTE: set this hashmap with meeting_name and ids of that meeting
meeting[meeting_name]=123456789
hashtag = (function () {
// Twitter's official hashtag verifier.
// Ported from https://github.com/twitter/twitter-text-rb/blob/master/lib/twitter-text/regex.rb
// Creates a Unicode Regular Expression range
function regexRange (from, to) {
to = to || 0;
from = from.toString(16);
fromLen = (from.length > 4) ? from.length : 4;
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active December 20, 2024 19:57
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k