Stanford CS329A Self-Improving AI Agents | Part 1 | Course Overview
Overview
Akansha and Azalia Mirhoseini introduce CS329A, focusing on self-improving AI agents. The course overview highlights the scaling laws of Large Language Models (LLMs) from 2018-2024, emphasizing emergent behaviors like few-shot learning and chain-of-thought reasoning. Key innovations discussed include instruction tuning and Reinforcement Learning from Human Feedback (RLHF), which powered models like ChatGPT. The latter half explores inference scaling and agentic workflows, showcasing how LLMs can now perform end-to-end tasks in areas like coding and research, moving beyond simple chatbots.
Key takeaways
- LLM capabilities, including few-shot learning and chain-of-thought reasoning, scale predictably with model size, data, and compute, leading to emergent behaviors.
- Innovations like instruction tuning and RLHF have been critical in aligning LLMs with human preferences, exemplified by ChatGPT's success.
- Inference scaling, through techniques like repeated sampling, allows for improved performance without modifying model parameters, unlocking more capability at test time.
- Agentic workflows represent a significant shift, enabling LLMs to plan, act, and achieve complex goals end-to-end by interacting with tools and environments.
- Combining fine-tuning with test-time scaling, particularly for generating synthetic data and improving reasoning, is a key driver for self-improving AI.
- Verification and clarifying user intent remain critical challenges for building reliable and effective AI agents in real-world applications.
Chapters
- Welcome to CS329A: Self-Improving AI Agents.
- Akansha and Azalia Mirhoseini introduce themselves and the course.
- Course website: cs239a.stanford.edu, with updated lecture materials and schedules.
- Overview of LLM scaling trends: increased parameters, data, and compute lead to improved performance and emergent behaviors.
- Scaling laws show decreasing loss with increased compute, dataset size, and parameters.
- Model sizes have grown exponentially: BERT (340M) to GPT-3 (175B) to GPT-4 (trillions of parameters).
- Larger models exhibit improved performance on benchmarks and few-shot learning capabilities.
- Few-shot learning allows models to perform tasks with only a few examples, enabling rapid prototyping.
- Zero-shot learning: model performs a task without any examples.
- Chain-of-thought (CoT) prompting enables models to show reasoning steps, significantly improving performance on complex tasks.
- CoT benefits emerge at larger model scales (e.g., 8B parameters for LaMDA/PaLM).
- ChatGPT's rapid user adoption (5 days to 1M users) driven by key innovations.
- Instruction tuning and Reinforcement Learning from Human Feedback (RLHF) were crucial.
- Pre-training predicts the next token; fine-tuning aligns models with human preferences and instructions.
- Pre-training: predicting the next token on vast text data.
- Fine-tuning on high-quality data (books, essays) improves model performance.
- Instruction tuning uses instruction-answer pairs and chain-of-thought examples to teach task following.
- RLHF uses human preferences to train a reward model, guiding LLM generation towards desired outputs.
- Inference is a frontier for making models more capable without changing parameters.
- Large Language Monkeys project: repeated sampling (parallel generation) with a verifier to select correct responses.
- Results show increased sample counts improve problem-solving coverage, sometimes exceeding single-shot GPT-4o performance.
- Inference scaling involves generating multiple outputs and selecting the best one, without modifying model weights.
- Temperature parameter controls diversity of generated responses.
- Trade-offs exist between compute cost, latency, and performance gains.
- Verifier's role is crucial, especially in domains without clear ground truth.
- Models like DeepSeek and Gemini integrate fine-tuning with test-time scaling.
- Test-time scaling generates synthetic data for fine-tuning, creating a self-improvement loop.
- This synergy is key for developing better reasoning and thinking models.
- Reasoning models like O1 and Gemini exhibit log-linear scaling with test-time compute.
- Models analyze problems, decompose tasks, use self-evolution strategies (e.g., running tests), and self-correct.
- These capabilities improve performance on math, coding, and data analysis tasks.
- Transition from chatbots to agents that can achieve goals end-to-end.
- Agents plan steps, interact with environments, receive feedback, and correct actions.
- Examples: Cloud Code for software engineering, Deep Research for complex analysis.
- Key components: LLM calls, verifiers, critics, tool calls (web search, APIs), and orchestrators.
Transcript excerpt
0:05 Welcome, everyone, to fall quarter and welcome to CS329A. I hope you made it to the right class. This class is on self-improving AI agents. Anyone made it to the right class here? Yes. Yes? OK. How many of you are here and doing masters at Stanford? OK. PhD? OK. Few of you. And then undergrad? OK. So masters is the big crowd here. There's a good balance. It's a really good balance. So we'll introduce ourselves. So I'm Akansha. I have been working in large language models for a while, and I'm an adjunct professor at Stanford. And I'm also in research at a startup called Reflection AI. Hi, I'm Azalia Mirhoseini I'm.
0:56 An assistant professor in the CS Department. And Akanksha and I met each other when we were at Google Brain. Google Brain. Yeah, back in the day. And then Google DeepMind. And I also worked on Claude and Anthropic and Gemini at Google DeepMind. And we are so excited to teach this course again. This is the second time we're teaching. Of course, we have made some updates, both to the lectures and also the way we are conducting everything for the course. And we were just so amazed by the amount of interest for people to join this course. So we are excited to have you here. The course website is at cs239a.stanford.edu.
1:45 We have updated the website in terms of all the lecture materials and the papers that you'll be reading, as well as what's the homework schedule to expect the project proposal and project structures as well. So in today's lecture, we'll start with an overview of large language models, just how the scaling trends have evolved over the last five years. And then we'll focus more on what we will cover in this class.
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Stanford Online.