HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
bclarkson-code
Tricycle
Python2024–2024
bclarkson-code / Tricycle

Tricycle

Autograd to GPT-2 completely from scratch

2Distinct people
6Mentions
1Explicit recommenders
128GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Autograd to GPT-2 completely from scratch

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

As a chronic premature optimizer my first reaction was, "Is this even possible in vanilla python???" Obviously it's possible, but can you train an LLM before the heat death of…

asgraham used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week6 dated mentions

Observed mentions: 2024-02-15 21:01:25 UTC to 2024-07-17 12:15:06 UTC. Weeks start Monday, UTC.

01232024-02-12 00:00:00 UTC to 2024-02-19 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsFeb 122024-02-19 00:00:00 UTC to 2024-02-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-02-26 00:00:00 UTC to 2024-03-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-04 00:00:00 UTC to 2024-03-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-11 00:00:00 UTC to 2024-03-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-18 00:00:00 UTC to 2024-03-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-25 00:00:00 UTC to 2024-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-01 00:00:00 UTC to 2024-04-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-08 00:00:00 UTC to 2024-04-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-15 00:00:00 UTC to 2024-04-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-22 00:00:00 UTC to 2024-04-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-29 00:00:00 UTC to 2024-05-06 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 292024-05-06 00:00:00 UTC to 2024-05-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-13 00:00:00 UTC to 2024-05-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-20 00:00:00 UTC to 2024-05-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-27 00:00:00 UTC to 2024-06-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-03 00:00:00 UTC to 2024-06-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-10 00:00:00 UTC to 2024-06-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-17 00:00:00 UTC to 2024-06-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-24 00:00:00 UTC to 2024-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-01 00:00:00 UTC to 2024-07-08 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-07-08 00:00:00 UTC to 2024-07-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-15 00:00:00 UTC to 2024-07-22 00:00:00 UTC (exclusive): 3 mentions; 3 submissions, 0 commentsJul 15

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Feb 122024-02-12 00:00:00 UTC2024-02-19 00:00:00 UTC101
Feb 192024-02-19 00:00:00 UTC2024-02-26 00:00:00 UTC000
Feb 262024-02-26 00:00:00 UTC2024-03-04 00:00:00 UTC000
Mar 42024-03-04 00:00:00 UTC2024-03-11 00:00:00 UTC000
Mar 112024-03-11 00:00:00 UTC2024-03-18 00:00:00 UTC000
Mar 182024-03-18 00:00:00 UTC2024-03-25 00:00:00 UTC000
Mar 252024-03-25 00:00:00 UTC2024-04-01 00:00:00 UTC000
Apr 12024-04-01 00:00:00 UTC2024-04-08 00:00:00 UTC000
Apr 82024-04-08 00:00:00 UTC2024-04-15 00:00:00 UTC000
Apr 152024-04-15 00:00:00 UTC2024-04-22 00:00:00 UTC000
Apr 222024-04-22 00:00:00 UTC2024-04-29 00:00:00 UTC000
Apr 292024-04-29 00:00:00 UTC2024-05-06 00:00:00 UTC101
May 62024-05-06 00:00:00 UTC2024-05-13 00:00:00 UTC000
May 132024-05-13 00:00:00 UTC2024-05-20 00:00:00 UTC000
May 202024-05-20 00:00:00 UTC2024-05-27 00:00:00 UTC000
May 272024-05-27 00:00:00 UTC2024-06-03 00:00:00 UTC000
Jun 32024-06-03 00:00:00 UTC2024-06-10 00:00:00 UTC000
Jun 102024-06-10 00:00:00 UTC2024-06-17 00:00:00 UTC000
Jun 172024-06-17 00:00:00 UTC2024-06-24 00:00:00 UTC000
Jun 242024-06-24 00:00:00 UTC2024-07-01 00:00:00 UTC000
Jul 12024-07-01 00:00:00 UTC2024-07-08 00:00:00 UTC101
Jul 82024-07-08 00:00:00 UTC2024-07-15 00:00:00 UTC000
Jul 152024-07-15 00:00:00 UTC2024-07-22 00:00:00 UTC330

What Hacker News says

6 sources
netwrt·Jul 17, 2024Submission

Show HN: Deep learning framework from scratch, trains GPT-2 in 3 days

I wanted to share Tricycle (https://github.com/bclarkson-code/Tricycle), a deep learning framework I built completely from scratch from Autograd to a GPT. I wanted a library that is fast and feature rich enough to train actual models while being simple enough that anyone with a bit of python experience can understand what is going on. The biggest milestone so far is training GPT-2 (124M) on 2.3B tokens in just under 3 days on my GPU (RTX 3090). So far, I've added the following to Tricycle: - An automatic differentiation engine - General matrix operations with einsum - Standard network layers (Dense, ReLU, GeLU etc) - Transformer blocks (MultiHeadSelfAttention and MLP blocks) - Optimisers (SGD, AdamW) - GPT-2 - etc The project is still under active development, I'm in the process of adding mixed precision and multi-gpu support with the goa
Read the rest
l of scaling up to larger models. To see it in action, the best place to start is train_smol_gpt.py which will train GPT-2 from scratch. Let me know what you think!
2 points · Open discussion
Location: London Remote: Happy to work fully in person although hybrid is preferred. Willing to relocate: For the right role Technologies: Machine Learning (Language modelling, Computer Vision etc), Data Science, Python, Kubernetes Resume: https://raw.githubusercontent.com/bclarkson-code/bclarkson-c... Linkedin: https://www.linkedin.com/in/benedict-clarkson-779b43154/ Email: bclarkson-code@proton.me I'm a Senior Machine Learning Engineer looking for my next challenge. I have a strong background in Deep Learning: I built a state of the art CV model for cancer detection and I'm the author of the Tricycle (https://github.com/bclarkson-code/Tricycle) deep learning framework. I built it from scratch (nothing but python, numpy and a bit of cuda) and recently used it to successfully train a GPT-2 small model from scratch. I'm looking for an AI E
Read the rest
ngineer role in london, preferably an AI research engineer role.
In Ask HN: Who wants to be hired? (July 2024)
Location: London Remote: Happy to work fully in person although hybrid is preferred. Willing to relocate: For the right role Technologies: Machine Learning (Computer Vision, NLP etc), Data Science, Python, Kubernetes Resume: https://raw.githubusercontent.com/bclarkson-code/bclarkson-c... Linkedin: https://www.linkedin.com/in/benedict-clarkson-779b43154/ Email: bclarkson-code@proton.me I'm a Senior Machine Learning Engineer looking for my next challenge. I have a strong background in Deep Learning: I built a state of the art CV model for cancer detection and I'm the author of the Tricycle (https://github.com/bclarkson-code/Tricycle) deep learning framework. I built it from scratch (nothing but python, numpy and a bit of cuda) and recently used it to successfully build and train a small language model. I'm looking for an AI Engineer role in
Read the rest
london
In Ask HN: Who wants to be hired? (May 2024)
asgraham·Feb 15, 2024Recommendation phrase
As a chronic premature optimizer my first reaction was, "Is this even possible in vanilla python???" Obviously it's possible, but can you train an LLM before the heat death of the universe? A perceptron, sure, of course. A deep learning model, plausible if it's not too deep. But a large language model? I.e. the kind of LLM necessary for "from vanilla python to functional coding assistant." But obviously the author already thought of that. The source repo has a great motto: "It don't go fast but it do be goin'" [1] I love the idea of the project and I'm curious to see what the endgame runtime will be. [1] https://github.com/bclarkson-code/Tricycle
In Building an LLM from Scratch: Automatic Differentiation (2023)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.