Seyed Masoud Hosseini · Overview · Study log · Weekly summaries · Ideas · Search · Transcript · RSS feed
LLM Agents · Lecture 10 of 12 · 52:50
Open Source and Science with Foundation Models
Study guide
What this lecture covers
Percy Liang argues that as foundation models have gotten more capable, access to them has shrunk from full weights, code and data down to just an API — and that this loss of access changes what kind of research is even possible. The talk walks through three levels of access (API, open weights, open source) and shows concrete research projects enabled at each level.
Situated as a guest lecture in the LLM Agents course, the talk connects agent-building directly to the access question: it shows what kinds of agents you can build with only API access, then argues why deeper access is needed to truly understand and improve these systems. After watching, you should be able to describe the difference between API, open-weight and open-source access, explain the memory-retrieve-reflect-plan architecture used across several agent projects, and describe why open weights enabled research such as neuron interpretability and model-provenance testing.
Key ideas
- Access shapes research: Liang argues that historically, what data or compute researchers can access (internet text, crowdsourced datasets, GPUs) has determined which research areas become possible, and today's shift to API-only access is similarly constraining.
- Three levels of access: API access (behavior only, like a cognitive scientist), open weights (internals inspectable, like a neuroscientist), and open source (full control over architecture, training and data, like a systems builder).
- Agent architecture: agents perceive observations into a memory stream, retrieve relevant memories (by recency, importance, relevance), and then act, reflect, or plan — this same pattern is reused across the agent examples in the talk.
- Problem-solving agents: MLAgentBench (writing and iterating on machine learning code) and a cybersecurity capture-the-flag agent both use the same reflect-plan-act loop; both showed large gaps between current model performance and human experts.
- Simulation agents: Smallville-style generative agents model behavior for a population of LLM-driven characters using memory, retrieval and reflection, and a follow-up study seeded agents with two-hour interviews of 1,000 real people to see how closely agent responses matched the real individuals' survey answers.
- What open weights enable: neuron-level interpretability (e.g. diagnosing why a model claims 9.11 is bigger than 9.8), model pruning/distillation to smaller sizes, and adversarial prompt attacks that sometimes transfer from open to closed models.
- Model independence testing: a statistical method Liang's group built to test, using only model weights, whether two published models were trained independently or one is a fine-tune of the other — verified on real cases like the Miqu leak and Llama 3.2's smaller models.
- Open source requires more than weights: the Open Source Initiative's definition requires available code (including training and data-processing code) and data information, not just downloadable parameters; compute remains the main practical bottleneck.
Walkthrough
Why access matters and the three-tier framework (0:00)
Liang opens by noting that as model capability has risen, openness has fallen almost symmetrically, leaving mostly API access. He argues from history — internet-scale text enabling NLP, crowdsourced datasets like ImageNet and SQuAD, and GPUs enabling deep learning — that access determines what research becomes possible, then introduces the three levels he'll cover: API access, open weights, and open source.
Building agents with only API access (4:04)
Treating an API model as a general-purpose function, Liang describes a common agent architecture: observations go into a memory stream, relevant memories are retrieved, and the agent acts, reflects, or plans. He presents MLAgentBench, where an agent iteratively writes and revises machine learning code based on execution logs, and a cybersecurity capture-the-flag agent that reads server code, finds vulnerabilities, and executes exploits via a bash shell. In both, Claude 3(.5) performed best among tested models, but a large gap remained versus expert humans, especially on harder tasks.
Simulation agents and modeling real people (14:09)
Liang describes the "Smallville" generative-agents project, where 25 LLM-driven characters use memory, retrieval (by recency, importance, relevance) and reflection to behave believably and even spread information like a party invitation between each other. A newer project seeded 1,000 real people's two-hour interview transcripts as agent memories, then compared agents' answers to survey and experiment questions against the actual humans' answers, finding agents captured a large share of individual variation, though less than the humans' own test-retest consistency.
What open-weight access adds (25:25)
Moving down a level, Liang defines open-weight models (like Llama) as widely but not unconditionally available, and highlights reproducibility as a key benefit once an API model is deprecated. He shows interpretability work that traced a wrong answer ("9.11 is bigger than 9.8") to a neuron associated with dates, a pruning example producing smaller models from a larger one with little performance loss, and an adversarial attack optimized against Llama's gradients that also transferred to jailbreak GPT-4.
Testing whether models are independently trained (31:29)
Liang presents his group's method for testing, from weights alone, whether two published models were trained independently. The approach compares an observed similarity statistic against a distribution generated by permuting the hidden units of a model (a stand-in for retraining from a different random initialization), producing a formal statistical test. Applied to real models, it confirmed that the Miqu leak was a Mistral fine-tune of Llama 2, that Striped Hyena was derived from Mistral, and that Llama 3.2's 3B model reused specific layers from the 8B model.
Open source: definitions and the compute bottleneck (40:33)
Liang traces open source's roots to open-source software and academic open science, then presents the Open Source Initiative's "four freedoms" (use, study, modify, share) applied to AI, which require not just weights but training/data-processing code and data information. He describes three of his own projects that needed full training access: an automated data-mixture optimization method, a second-order optimizer giving a 2x speedup over Adam, and the Backpack language model, an interpretable alternative architecture supporting precise editing. He closes by proposing three ways to address the compute bottleneck limiting open-source research: using scaling laws to work meaningfully at small scale, pooling idle decentralized compute despite slower interconnects, and advocating for public compute funding comparable to projects like the Human Genome Project.
Before you watch
- General familiarity with what an LLM agent is (perception, memory, action) is useful background from earlier lectures in this course.
- No specific prior lecture is required, though awareness of basic transformer/foundation-model terminology helps.
Check your understanding
- Why does Percy Liang claim that "access shapes research," and what historical examples does he give?
- Describe the memory stream, retrieval and reflection components shared across the MLAgentBench, cybersecurity, and Smallville agent examples.
- How does the model independence test work, and what real-world cases did it help verify?
- What does the Open Source Initiative's definition require beyond publishing model weights, and why does data information matter even when raw data cannot be shared?
- What three strategies does Liang suggest for making progress on open-source foundation model research despite limited compute?
Vocabulary
- foundation model (noun)
- A large, general-purpose model trained on broad data before being adapted to specific tasks.
Access to foundation models has shrunk to just an API for most researchers. - open weights (noun)
- A model release where the trained parameters are downloadable, though not full training code.
Open weights let researchers inspect a model's internal neurons. - open source (adjective)
- Describing software or a model whose full code, training process and data information are shared.
Open source access lets researchers rebuild the whole system. - internals (noun)
- The hidden inner workings of a system.
Open weights let researchers inspect the model's internals. - interpretability (noun)
- The study of understanding why a model produces a particular output.
Interpretability research traced a wrong answer to one specific neuron. - prune (verb)
- To remove unneeded parts of a model to make it smaller.
Researchers pruned the large model into a smaller, faster one. - adversarial attack (noun)
- An input specifically crafted to trick a model into a wrong or harmful output.
An adversarial attack on one model transferred to another. - provenance (noun)
- The origin or history of where something came from.
The test checked the provenance of one model's weights. - fine-tune (verb)
- To further train an existing model on new data for a specific purpose.
The leaked model turned out to be a fine-tune of an earlier one. - permute (verb)
- To rearrange the order or arrangement of something.
The test permutes hidden units to build a comparison distribution. - memory stream (noun)
- A running record of everything an agent has observed over time.
The agent stores every observation in its memory stream. - retrieve (verb)
- To find and bring back stored information when needed.
The agent retrieves the most relevant past memories. - reflect (verb)
- To think back over past experience to draw a lesson from it.
The agent reflects on its actions before planning the next step. - vulnerability (noun)
- A weakness in a system that could be exploited by an attacker.
The agent searched the server code for a vulnerability. - reproducibility (noun)
- The ability to get the same result again by repeating an experiment.
Open weights improve reproducibility once an API model disappears. - deprecate (verb)
- To stop supporting or offering something that used to be available.
Reproducibility matters once an API model is deprecated. - statistical test (noun)
- A formal method used to decide whether an observed result is likely due to chance.
A statistical test confirmed two models were related. - seed (verb)
- To start something off by giving it initial data or content.
Agents were seeded with real people's interview transcripts. - symmetrically (adverb)
- In a balanced way, where one thing changes at the same rate as another.
Openness has fallen almost symmetrically as capability has risen. - crowdsourced dataset (noun)
- A dataset built by combining contributions from many different people.
ImageNet is a famous crowdsourced dataset.
← Project GR00T: NVIDIA's Blueprint for Embodied AI · Safe AI Agents and Evidence-based AI Policy →
