Andrej Karpathy spent 8 years at OpenAI and Tesla
Last week, he compressed everything he knows into one free 2-hour lecture
Prompts → Harness → Loops → Graphs → Self-Improving Systems
People pay $15K for bootcamps that teach half of this
This lecture beats almost every paid AI engineering course on the market
This is not about tweaking text in a chat box
This is about understanding the core machinery and wiring the execution loop around it
You probably don't have 2 hours right now
Don't let this get lost in your feed
Watch it first
Then read the step-by-step guide below and build your first loop
MapReduce meets LLMs: Divide-and-conquer approach lets regular LLMs process 100x longer documents than their context limit
Using MapReduce principles, small-context LLMs now handle million-token documents efficiently.
Original Problem 🔍:
LLMs struggle to process extremely long texts exceeding their context window, limiting their application in tasks requiring comprehensive document understanding.
-----
Solution in this Paper 🛠️:
• LLM × MapReduce: A training-free framework for long-sequence processing
• Structured information protocol: Addresses inter-chunk dependency
• In-context confidence calibration: Resolves inter-chunk conflicts
• Three-stage process: Map, collapse, and reduce stages for efficient processing
-----
Key Insights from this Paper 💡:
• Divide-and-conquer approach enables short-context LLMs to handle long texts
• Structured information and confidence calibration improve cross-chunk processing
• Framework is compatible with different LLMs, demonstrating generalization capability
• Efficient design outperforms standard decoding in speed
-----
Results 📊:
• Outperforms closed-source and open-source LLMs on InfiniteBench
• Average score: 68.66 (vs. 57.34 for GPT-4)
• Enables Llama3-70B-Instruct (8K context) to process 1280K tokens
• Faster inference: 2 GPUs for 128K tokens (vs. 4 GPUs for standard decoding)
This is a really good summary of how the breakthroughs in Neural Network (AlexNet), Big Data (ImageNet) and GPUs led to the birth of modern AI and computer vision. Thank you @Kseniase_ and your @TheTuringPost !
CS388: Natural Language Processing
Great list of byte-sized lectures on NLP and LLMs.
It provides nice summaries of modern NLP topics and recent ones like RLHF, instruction-tuning, few-shot prompting, chain-of-thought, and more.
A great resource to catch up on the space.
Lectures: https://t.co/dpSsFPS0zq
I've delivered my Advanced Prompting for LLMs training to almost 400 people over the last year.
Here are some of the main themes people learn about:
- applying advanced prompting techniques like chain-of-thought
- best practices to improve the reliability, robustness, and performance of LLMs
- structuring prompts and outputs
- tool usage with LLMs, including function calling
- building agentic workflows
- best practices for building RAG systems
- fine-tuning or customizing models
- model selection and considerations
- building eval, training, and even synthetic datasets for domain-specific use cases
- how to properly evaluate LLM systems
- reliable tools for observability and measuring performance
Due to all the developments, the topics in the course now range from best practices for prompting to design patterns for building complex workflows with LLMs.
It's an exciting time to build with LLMs as there is a lot of creative ways to use them. If you don't believe it, my goal with this training is to change your mind.
We have had participants from everywhere, ranging from hot AI startups to big companies like Apple and Google.
People who complete our training have gone on to get new AI jobs, build awesome products, and even innovate around AI tools and resources in the space.
Due to other obligations, I don't do these trainings as often as I would love to. But there is a lot of demand so I just opened a new cohort for June.
Please note that this is not a course for everyone. There are tons of great free starter courses out there. This is a course for devs and people building out real-world use cases with LLMs.
The great news is that you can take advantage of the ongoing limited discount offer of 25% (use promo code BUILDWITHAI at checkout).
Enroll here: https://t.co/H9w2yq9w1L
ScrapeGraphAI: You Only Scrape Once
Neat little web scraping tool powered by LLMs.
LLMs are powerful information extractors so it's not surprising to see the popularity of this Python library and many others.
It works with ollama and other LLM providers.
An Open LLM and How to Train It with a $100K Budget
This paper introduces a new open LLM called FLM-101B.
Claims that "the LLM with 101B parameters and 0.31TB tokens can be trained on a $100K budget."
If true, this is amazing! Performance is okay on some of the tasks but I like the overall vision of significantly reducing LLM training cost. This can make model training more accessible and promote LLM research.
They analyze different growth strategies, growing the number of parameters from smaller sizes to large ones. They ultimately employ an aggressive strategy that reduces costs by >50%. In other words, three models are trained sequentially with each model inheriting knowledge from its smaller predecessor (16B -> 51B -> 101B) while achieving competitive performance.
Model checkpoints were made available as well.
Check out the paper for full analysis and insights.
Exciting times!
https://t.co/Dn0kOxvcgi
A Survey on LLM-based Autonomous Agents
Great repository containing a collection of papers on LLM-based autonomous agents.
The survey paper for this came out a few days ago as well.
repo: https://t.co/M0tFQlMOS7
paper: https://t.co/21eU6JikFJ
Anti-hype LLM Reading List
This is actually a really good list of papers and reading materials on LLMs. Love the curation by @vboykis.
https://t.co/XYQP1FcQnC
🎓Stanford XCS224U: Natural Language Understanding (2023)
It's great to see a new iteration of one of my favorite courses on natural language understanding.
Covers topics such as contextual word representations, information retrieval, in-context learning, behavioral evaluation of NLU models, NLP methods and metrics, and much more.
Christopher Potts is a brilliant educator and has a special talent for explaining complex ML and NLP concepts to general audiences. I have learned a lot from his research and lectures. Highly recommend checking out his new course.
(link in the replies)
This is one of the most comprehensive survey papers on LLMs!
They recently updated it.
It includes over 600 references, LLM collection, useful prompting tips, evaluation of capabilities, a GitHub repo, and more.
paper: https://t.co/Tq2hBKUtNt
repo: https://t.co/XlhHE0QFy3
📣 if you’re attending @DeepIndaba and you work on #TrustML, submit an extended abstract at our workshop (co-organized w/ @AishaAlaagib@lamechthinkbig@smhall97, Tejumade & Nathi 🤩 Are you working on audit techniques ⚖️? Robust ML🤖? Privacy 🔐? ➡️ https://t.co/S06oNIqTzD
Just In! DeepMind presents AlphaDev, a deep reinforcement learning agent which discovers faster sorting algorithms from scratch.
The algorithms outperform previously known human benchmarks and have been integrated into the LLVM C++ library.
https://t.co/P4WROV4SQR
It's a great question. I roughly think of finetuning as analogous to expertise in people:
- Describe a task in words ~= zero-shot prompting
- Give examples of solving task ~= few-shot prompting
- Allow person to practice task ~= finetuning
With this analogy in mind, it's awesome that we have models that can reach high levels of accuracy across many tasks with prompting alone, but I also expect that reaching top tier performance will include finetuning, especially in applications with concrete well-defined tasks where it is possible to collect a lot of data and "practice" on it.
Rough picture to have in mind maybe. Small models are incapable of in-context learning and will benefit very little from prompt engineering, but depending on the difficulty of the task it may be possible to still finetune them into decent experts.
Big caveat all of this is still very new.