After co-inventing ChatGPT, I kept asking myself: why have superhuman chat models not led to AGI?
I’ve spent the last 2 years in stealth building a new way to train models (RLCD), and a new type of frontier AI model that we are releasing today: Jev
• 20-200x faster
• 40-400x cheaper (w/ output tokens free)
• Frontier composable intelligence optimized for decisions
AFAICT the shortest path to AI-based economic revolution
Train your own LLM from scratch!
A step-by-step repo that walks you through building and training a transformer model from scratch using PyTorch. From downloading training data all the way to generating text.
The architecture is built from the ground up following the original "Attention is All You Need" paper. MLP, single head attention, multi-head attention, transformer blocks, and the full transformer model - all coded and explained with detailed diagrams at each step.
Training data comes from The Pile - a diverse 825GB open-source dataset covering books, articles, code, websites, and more. The repo includes scripts to download it, preprocess and tokenize it using tiktoken, store it in HDF5 format, and feed it into training batches.
You can train a 13M parameter model on a single Colab T4 GPU. At 13M parameters the model starts generating proper grammar and coherent short sentences. For billion-parameter training you need at least an A100 or RTX 4090. The repo includes a full GPU compatibility table so you know exactly what's possible on your hardware.
Includes a complete SFT and RLHF guide as a separate notebook for taking your trained model further.
Key capabilities:
• End-to-end pipeline: data download → preprocessing → training → text generation
• Full transformer implementation from scratch with PyTorch
• Trains models from 13M to 2B+ parameters on a single GPU
• Training data from The Pile (825GB, 22 diverse datasets)
• Tokenization via tiktoken (r50k_base)
• SFT and RLHF guide included
100% open source.
I've shared the link in the replies!
An absolutely brilliant textbook "Foundations of Large Language Models" by Tong Xiao and Jingbo Zhu (2025) is now in @ChapterPal's collection.
This book is a comprehensive, technically grounded treatment of modern generative language models for artificial intelligence researchers, engineers, and advanced students in natural language processing.
Assuming a foundational background in deep learning, probability, and standard neural sequence modeling, the book explains the entire lifecycle of foundation models—from raw data pre-training and architectural design to alignment, inference acceleration, and system-level scaling.
It's a great in-depth read specifically on Large LMs after my The Hundred-Page Language Models Book that covers neural network and deep learning basics, count-based LMs, RNNs, and transformers.
Read the book with an AI tutor: chapterpal.com/ebook/14fa0543…
(All books on ChapterPal are free to read with a free account.)
The book has 76 beautiful illustrations across 277 pages.
Table of contents:
Preface
Notation
1. Pre-training
- 1.1. Pre-training NLP Models
* 1.1.1 Unsupervised, Supervised and Self-supervised Pre-training
* 1.1.2 Adapting Pre-trained Models
- 1.2. Self-supervised Pre-training Tasks
* 1.2.1 Decoder-only Pre-training
* 1.2.2 Encoder-only Pre-training
* 1.2.3 Encoder-Decoder Pre-training
* 1.2.4 Comparison of Pre-training Tasks
- 1.3. Example: BERT
* 1.3.1 The Standard Model
* 1.3.2 More Training and Larger Models
* 1.3.3 More Efficient Models
* 1.3.4 Multi-lingual Models
- 1.4. Applying BERT Models
- 1.5. Summary
- References
2. Generative Models
- 2.1. A Brief Introduction to LLMs
* 2.1.1 Decoder-only Transformers
* 2.1.2 Training LLMs
* 2.1.3 Fine-tuning LLMs
* 2.1.4 Aligning LLMs with the World
* 2.1.5 Prompting LLMs
- 2.2. Training at Scale
* 2.2.1 Data Preparation
* 2.2.2 Model Modifications
* 2.2.3 Distributed Training
* 2.2.4 Scaling Laws
- 2.3. Long Sequence Modeling
* 2.3.1 Optimization from HPC Perspectives
* 2.3.2 Efficient Architectures
* 2.3.3 Cache and Memory
* 2.3.4 Sharing across Heads and Layers
* 2.3.5 Position Extrapolation and Interpolation
* 2.3.6 Remarks
- 2.4. Summary
- References
3. Prompting
- 3.1. General Prompt Design
* 3.1.1 Basics
* 3.1.2 In-context Learning
* 3.1.3 Prompt Engineering Strategies
* 3.1.4 More Examples
- 3.2. Advanced Prompting Methods
* 3.2.1 Chain of Thought
* 3.2.2 Problem Decomposition
* 3.2.3 Self-refinement
* 3.2.4 Ensembling
* 3.2.5 RAG and Tool Use
- 3.3. Learning to Prompt
* 3.3.1 Prompt Optimization
* 3.3.2 Soft Prompts
* 3.3.3 Prompt Length Reduction
- 3.4. Summary
- References
4. Alignment
- 4.1. An Overview of LLM Alignment
- 4.2. Instruction Alignment
* 4.2.1 Supervised Fine-tuning
* 4.2.2 Fine-tuning Data Acquisition
* 4.2.3 Fine-tuning with Less Data
* 4.2.4 Instruction Generalization
* 4.2.5 Using Weak Models to Improve Strong Models
- 4.3. Human Preference Alignment: RLHF
* 4.3.1 Basics of Reinforcement Learning
* 4.3.2 Training Reward Models
* 4.3.3 Training LLMs
- 4.4. Improved Human Preference Alignment
* 4.4.1 Better Reward Modeling
* 4.4.2 Direct Preference Optimization
* 4.4.3 Automatic Preference Data Generation
* 4.4.4 Step-by-step Alignment
* 4.4.5 Inference-time Alignment
- 4.5. Summary
- References
5. Inference
- 5.1. Prefilling and Decoding
* 5.1.1 Preliminaries
* 5.1.2 A Two-phase Framework
* 5.1.3 Decoding Algorithms
* 5.1.4 Evaluation Metrics for LLM Inference
- 5.2. Efficient Inference Techniques
* 5.2.1 More Caching
* 5.2.2 Batching
* 5.2.3 Parallelization
* 5.2.4 Remarks
- 5.3. Inference-time Scaling
* 5.3.1 Context Scaling
* 5.3.2 Search Scaling
* 5.3.3 Output Ensembling
* 5.3.4 Generating and Verifying Thinking Paths
- 5.4. Summary
- Appendix
- References
A Stanford professor took two average stocks, rebalanced them daily, and turned $100,000 into $7 million without predicting a single price.
Bookmark & watch today, no matter what.
AI/ML Series (Lesson 6/100):
RAG projects that actually land interviews.
-- Foundation Level --
Document Analysis with LLMs
→ Process PDFs instantly
→ Extract key insights
→ lnkd.in/dvPehYtB
First RAG System
→ Build from scratch
→ No frameworks needed
→ lnkd.in/dRq4NnCm
IBM RAG Guided
→ Step by step
→ Production patterns included
→ lnkd.in/dgTz_Av6
-- Advanced Techniques --
GraphRAG Pipeline
→ Knowledge graph retrieval
→ Smarter context understanding
→ lnkd.in/dNmynkGZ
Multi Document RAG
→ Query across sources
→ Unified retrieval logic
→ lnkd.in/dEj8478y
Agentic RAG Pipeline
→ Autonomous decision making
→ Tool calling integrated
→ lnkd.in/gXWsJYXT
Real Time Assistant
→ LangChain powered system
→ Live data retrieval
→ lnkd.in/gbHjG7Df
AI Research Agent
→ Automate paper analysis
→ Smart summarization built-in
→ lnkd.in/dec__v4e
Multimodal RAG System
→ Text and images
→ IBM guided tutorial
→ lnkd.in/d6UwUX3z
LangChain RAG Agent
→ Production ready architecture
→ Memory and tools
→ lnkd.in/drdmzwg6
Master these 10 projects.
You're building intelligent systems
not just writing code.
Save for later.
Repost ♻️ for AI builders.
AI/ML Series (Lesson 5/100):
AI Agent Project Structure 🤖
Building an AI agent is not just about connecting an LLM to a prompt.
As the project grows, you need a clean structure so you can add tools, memory, APIs, models, and tests without turning the codebase into a mess.
this is pure f*cking treasure
how to build your first ai agent (full walkthrough)
a year ago this would have saved me two weeks. my first agent would've shipped the same afternoon
in the right hands it changes what one person can ship alone:
Computer scientists discover the power of *closed loop* and *error correction*! I have advocated for many years by now that all intelligent systems would be closed-loop, not open end-to-end. This has been the very basic lesson from Cybernetics (control theory and systems theory), originated more than 80 years ago. This view has been prominently featured in our open-sourced new book about the principles of intelligence: ma-lab-berkeley.github.io/deep-represent…
this paper is f*cking insane
it analyzed 56,000 trading strategies and found something brutal:
over 40% looked strong in-sample
out-of-sample, the average Sharpe collapsed to basically zero
the framework is ruthless:
test on unseen data
add real costs
check regime robustness
assume high Sharpe can come from luck
the crazy part is that testing 10,000 random strategies can produce a Sharpe above 2.0 purely by chance
and after frictions, the median Sharpe in the sample fell from 1.23 to 0.08
most traders search for the strategy with the highest backtest
real quants search for the one that still exists after reality touches it
bookmark before this thread gets buried
Inference roadmap I gotta follow:
1) Watch this course fully : youtube.com/playlist?list=…
(Covers everything related to LLM Inference+ Training but on high level)
2) Gonna read this resource: jax-ml.github.io/scaling-book/ ( for deep dive on topics)
3) Read PMPP(CUDA & GPU specific chapters)
4) Blogs and codebase of vLLM , SGlang, llama.cpp
5) Inference Engg by philip book for brush up on the concepts
6) Also these notes which i found randomly on X for brushup: x.com/gauri__gupta/s…
Along with it : contributions to the above mentioned repo for understanding depth + talking with folks building in inference here
71K Followers 78K FollowingThis is the official twitter account for web site called Domesticated Brain. We are sharing various kinds of #computer #tutorials and latest #technology news.
11K Followers 8K Followingவாழ்க்கையில் பல துன்பம் இருந்தாலும் அதை ஒர் ஓரம் வைத்து, ஓடிக்கொண்டிருக்கும் ஒரு பிறவி மகிழ்ச்சி புன்னகை, பிறரை சிரிக்க வைக்கும் குணம் இருக்கு பாத்துக்கலாம் 💪
123 Followers 483 Followingonly private elite here!! I will mainly talk abou crypt market $ICP, price action analysis etc.
ONLY FOR A FEW PEOPLE MAIN ACCOUNT @Dayyib19
70 Followers 615 Followingonly private elite here!! I will mainly talk abou crypt market $ICP, price action analysis etc.
ONLY FOR A FEW PEOPLE MAIN ACCOUNT @MontanaMMXM
344 Followers 6K FollowingAllah plans are better than our desires.
I am Professional Forex Trader account Manager We are providing good signals everyday.
3K Followers 939 FollowingMarket Analysis | Trader
Crypto & Forex | PA | ICT | SMC
Sharing Market Value.
This is educational information only. Trading involves significant risk of loss
207 Followers 2K Followingonly private elite here, I will mainly talk about crypto market, price action analysis etc. only for a few people main account @Bradgohtrades
2K Followers 46 Following🙋♂️Hi I'm bad 👇
Stay away from the good ones
There's no point in being polite
From today I'm rude
If you like me, like and follow
and send me a message 🫣👈
142K Followers 94 FollowingSane + 🌶️ takes in an insane AI world... AI capabilities researcher: co-created RLHF/ChatGPT @ @openai now trying to right the wrong 🤭 (ceo @typesafeai)
17K Followers 60 Following📧 [email protected] 📧 AI Growth Specialist | Helping AI tools, websites & founders grow on X | 400+ AI tools reviewed | DM for Ads,Promos and collabs🛑
199K Followers 531 FollowingYour daily source of hottest celebraties pics/vids | daily uploads | I don't own any of pics and videos | DM for content removal |
6K Followers 2K FollowingML-DL | 22 |
Solving memory 4 agents |
Applied AI eng (US) |
Prev: @ filmple (EU) | AI eng @ miracleai | ML Lead @ datraai | 6x :🏆| Professional Music Producer
4K Followers 661 Following@NVIDIA Sr. Research Scientist | UIUC PhD
All opinions and tweets are personal.
Tweets about AI Inference, CUDA and GPU systems.
315K Followers 7K FollowingFounder and CEO of @acquiredotcom. https://t.co/wRMIssDmhl has helped 1000s of startups get acquired and facilitated $500m+ in closed deals.
39K Followers 574 FollowingI design through code. Building https://t.co/6ceZFejl4s (@screenstudio). Support → please reach out at [email protected] instead of DMs.
210K Followers 18K FollowingBuilding https://t.co/od97B0ItgS and https://t.co/6pSdm6nybd in Public. Raising all the boats with kindness.
🎙️ https://t.co/6w69DZmPYf · ✍️ https://t.co/lpnor5s0Ju