Skip to content

Instantly share code, notes, and snippets.

View FeiSun's full-sized avatar
🎯
Focusing

Ofey FeiSun

🎯
Focusing
  • Institute of Computing Technology, Chinese Academy of Sciences
  • Beijing
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 February 17, 2024 18:39

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

@lmcinnes
lmcinnes / doc_embeddings_with_vectorizers.ipynb
Last active November 9, 2023 04:31
Document Embeddings with the Vectorizers Library
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JKirchartz
JKirchartz / demo.tex
Created September 11, 2020 14:10
A Latex class to emulate Kik-messenger UI - found here: https://tex.stackexchange.com/a/239511/139326
\documentclass{kik-android}
\setPartnerName{Dave Johnson}
\setPartnerPic{Man.jpg}
\setHours{12}
\setMinutes{11}
\begin{document}
\you{Knock knock}
\me{Who's there?}
@jaflo
jaflo / description.md
Created May 6, 2020 03:51
Export Instapaper to HTML & PDF

Use this to automatically scrape all of your saved Instapaper articles locally as HTML and PDF files. I originally wrote this to read my saved documents on my reMarkable tablet. Instapaper does not have an option to export all my stuff as PDF as far as I could tell (the built-in options only export a subset).

You will need to have the following packages installed:

Configure your username and password, then run the script. It will go through all articles shown on your home page and download the copy Instapaper has stored into a folder called output as HTML file and convert it into a PDF. You can customize the look by updating the included styles.css file. Any errors will be reported and logged to failed.txt. Errors might be due to parsing errors on Instapaper's side or due to PDF conversion issues.

@chfritz
chfritz / squeezing.tex
Created December 5, 2013 23:15
A tex file full of tricks for squeezing a latex document. Clearly you should avoid using these tricks. But when the deadline is near and you see no other way, you can use it to quickly change the formatting slightly to get more space. Just comment in some of the length changes or add other for the described sizes.
%% /** ---------------------------------------------------------
%% a file full of squeezing options
%% -- which you should try to avoid
%% -------------------------------------------------------------
%%
%% from:
%% http://www.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html
%% ---------------------------------------------------------- */
%% * Page Layout
%% o \columnsep: gap between columns
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 5, 2024 13:30
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname