Hasan Toor Profile picture
Mar 12 β€’ 8 tweets β€’ 3 min read β€’ Read on X
🚨BREAKING: This github has entire blueprint for building ChatGPT from scratch and put it on GitHub for free.

It's called LLMs-from-scratch and it walks you through building a GPT model in PyTorch line by line.

No black boxes. No hand-waving. Every single piece of the architecture explained and coded.

Here's why this changes everything for AI builders: ↓Image
Most people using ChatGPT every day have zero idea how it actually works under the hood.

Attention mechanisms. Tokenization. Pretraining. Finetuning. RLHF.

They're all magic words until you build one yourself.

This repo fixes that.
What you'll build, chapter by chapter:

β†’ Ch 2: Working with text data + BPE tokenizer from scratch
β†’ Ch 3: Coding multi-head attention from zero
β†’ Ch 4: Full GPT model implementation in PyTorch
β†’ Ch 5: Pretraining on unlabeled data
β†’ Ch 6: Finetuning for text classification
β†’ Ch 7: Instruction finetuning (how ChatGPT-style behavior actually works)Image
The bonus material alone is worth it:

β†’ Llama 3.2 from scratch
β†’ Qwen3 (Dense + MoE) from scratch
β†’ Gemma 3 from scratch
β†’ KV Cache implementation
β†’ Grouped-Query Attention
β†’ Mixture-of-Experts (MoE)
β†’ Direct Preference Optimization (DPO) from scratch
β†’ RLHF with GRPO from scratch

This isn't a beginner tutorial. It's a full AI engineering curriculum.
Prerequisites are minimal:

β†’ Solid Python skills
β†’ Basic PyTorch familiarity (Appendix A covers this if you're new)
β†’ Runs on a regular laptop, no GPU required

A 17-hour companion video course also exists where the author codes through every single chapter live.
Why this matters more than ever:

Every AI engineer talks about transformers, attention, and pretraining.

Maybe 1% have actually built any of it.

The engineers who understand what's happening inside the model are the ones building the next generation of AI products.

Everyone else is just using wrappers.
85.2K stars. 12.9K forks.

One of the most saved AI repos on GitHub.

100% Opensource.

github.com/rasbt/LLMs-fro…
As always, Thank you for reading this.

If you enjoyed this post:

1. Follow me @hasantoxr for more of these
2. RT the tweet below to share this thread with your audience

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Hasan Toor

Hasan Toor Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @hasantoxr

Mar 8
🚨BREAKING: GOODBYE POWERPOINT forever.

Claude just collapsed 10 hours of presentation building into 100 seconds completely free.

Here are 12 prompts to go from completely unprepared to completely untouchable in every meeting: (Save this): Image
1. Complete Presentation Blueprint

Act like a professional presentation consultant who has built decks for Fortune 500 boardrooms and billion-dollar pitch meetings. Create a complete presentation blueprint for [topic]. Define the objective, target audience, key message, emotional arc, and exact slide flow. Make every section earn its place and eliminate anything that doesn't move the audience toward one clear decision.
2. Hook Slide That Stops Scrolling

You are a TED Talk opening specialist. Write the first slide and opening 30 seconds of spoken script for a presentation on [topic]. The hook must create immediate tension, make the audience feel something is at stake, and promise a payoff they can't ignore. No welcome slides. No agenda. Start mid-story.
Read 15 tweets
Feb 27
Holy shit... Someone just built the ultimate prompt collection for AI image creators.

It's called MeiGen, it scrapes the hottest prompt posts from X every week and curates them in one place.

No more bookmarking 50 tweets. No more losing that prompt you saw 3 days ago.

100% free. 100% Open Source.Image
Here's the problem MeiGen solves:

The best AI image prompts live on X.

But they're buried in your bookmarks, your likes, your "I'll come back to this" pile that you never come back to.

MeiGen pulls the hottest ones weekly curated, organized, searchable.
What you get:

β†’ Weekly curated prompts trending on X (real engagement, not random)
β†’ Filter by model like NanoBanana Pro, GPT Image, Midjourney
β†’ One-click generate + save to your collection
β†’ Real view/like counts so you know what actually performs

The top prompt right now? 159K views on X.
Read 6 tweets
Feb 24
Holy shit... Someone finally benchmarked AI code reviewers on REAL pull requests.

Not demos. Not vibes. Actual F1 scores across 8 tools.

The gap between #1 and #8?

34 percentage points.

Your eng team is probably using the wrong one right now: ↓
@entelligence benchmarked 8 tools on real pull requests.

Every "which code review tool should we use" convo ends the same way:

β†’ Someone shares a demo
β†’ Someone shares a vibe
β†’ Nobody has real numbers
β†’ Team picks based on brand recognition

That era is over.
The full F1 score breakdown across 8 tools:

πŸ₯‡ Entelligence β€” 47.2%
πŸ₯ˆ Codex β€” 45.4%
πŸ₯‰ Claude β€” 42.8%
4. Bugbot β€” 39.4%
5. Greptile β€” 36.9%
6. CodeRabbit β€” 33.0%
7. Copilot β€” 22.6%
8. Graphite β€” 13.4%

Copilot at 22.6%. Graphite at 13.4%.

These tools are being sold to your eng team RIGHT NOW.Image
Read 7 tweets
Feb 24
I just ran 6 AI tools in one workflow.

No API keys. No dashboard switching. No glue code.

Just typed what I wanted and Claudcode + SkillBoss executed the entire thing.

Here's the breakdown: πŸ‘‡
Most AI setups look like this:

β†’ ChatGPT tab for writing
β†’ Midjourney for images
β†’ Runway for video
β†’ Zapier to connect them
β†’ 4 API keys you'll inevitably break
β†’ 2 hours wasted before you even start

That's not a workflow. That's a second job.
SkillBoss changes this completely.

100+ AI models & skills in one workspace.

Chat. Image. Video. Audio. Email. Scraper. PPT. Storage.

Claudcode orchestrates all of it you just give the instruction.

One prompt. Full execution.
Read 7 tweets
Feb 21
RIP to every dev team charging $50K to build an internal dashboard.

UI Bakery just made every internal tool your dev team ever built look like a waste of time.

It's called UI Bakery, it builds and deploys a fully functional internal app in 2 minutes.

No sprint. No Jira ticket. No engineer bottleneck.

Here's how: ↓
Here's what it actually does:

β†’ Connect to 45+ databases (Postgres, MySQL, MongoDB, Snowflake, Redis, OpenAI...)
β†’ Describe the app you want in plain language
β†’ AI Agent generates and deploys a fully functional app
β†’ 2 minutes. Production-ready. SOC 2 compliant.

Not a prototype. A real app on live data.
The features that actually matter:

- 80+ pre-built React components use anything, no restrictions
- One-click deploy with auto-scaling, SSL, CDN included
- Built-in RBAC, audit logs, MFA enterprise security out of the box
- Self-host option for air-gapped environments
- React code export zero vendor lock-in. Ever.Image
Read 7 tweets
Feb 19
🚨BREAKING: The open-source Alexa killer just dropped.

It's called OpenHome, a smart speaker dev kit you can run AI agents on.

No Amazon. No Google. No vendor lock-in. Your data stays local.

100% Opensource.
OpenHome @OpenHome runs on Raspberry Pi 4 (8GB RAM) with:

β†’ Far-field AEC mic array (hears you across the room)
β†’ Full-range speaker with deep bass
β†’ Local LLMs + local STT/TTS (fully offline capable)
β†’ Smart home control via Matter/Thread & MQTT

Your agent finally has ears, a voice, and a home.
Every AI agent today is stuck in a chat window.
OpenHome gives it a physical body.

Vibe code voice abilities in 10 minutes with the Ability Editor.

Clone your voice in 60 seconds.

OpenClaw agents already run on it out of the box.

This is the missing layer for AI agents.
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(