Skip to content

Instantly share code, notes, and snippets.

View mrdbourke's full-sized avatar
🚀

Daniel Bourke mrdbourke

🚀
View GitHub Profile
@JoaoLages
JoaoLages / RLHF.md
Last active April 3, 2025 13:14
Reinforcement Learning from Human Feedback (RLHF) - a simplified explanation

Maybe you've heard about this technique but you haven't completely understood it, especially the PPO part. This explanation might help.

We will focus on text-to-text language models 📝, such as GPT-3, BLOOM, and T5. Models like BERT, which are encoder-only, are not addressed.

Reinforcement Learning from Human Feedback (RLHF) has been successfully applied in ChatGPT, hence its major increase in popularity. 📈

RLHF is especially useful in two scenarios 🌟:

  • You can’t create a good loss function
    • Example: how do you calculate a metric to measure if the model’s output was funny?
  • You want to train with production data, but you can’t easily label your production data
@mrdbourke
mrdbourke / fashion-mnist-classnames.py
Created November 3, 2021 01:21
Class names of FashionMNIST in Python list form (same order as original FashionMNIST)
# List of FashionMNIST labels, source: https://github.com/zalandoresearch/fashion-mnist
class_names = ["T-shirt/top",
"Trouser",
"Pullover",
"Dress",
"Coat",
"Sandal",
"Shirt",
"Sneaker",
"Bag",
@hungneox
hungneox / WIN10.MD
Last active May 27, 2025 09:50
How Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal

Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.

Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).

But what if you don't have a second PC for setting up that USB storage drive in the first place?

In this tutorial we'll show you how you can set this up from a Mac.

Step 1: Download the Windows 10 ISO file

You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.

@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active February 17, 2025 18:17
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@raphey
raphey / news_site_data_scraping.ipynb
Last active March 15, 2023 18:44
Scraping articles from a news site using BeautifulSoup
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.