Skip to content
All categories

ai

1264 posts

Tell Workflows from Agents, Then Learn to Think While Acting | Stanford CS329Z Lecture 6

Lecture 06 compares workflows with agents: five composable workflow patterns, reasoning-and-acting patterns such as ReAct, Reflexion, CodeAct and ReWOO, and context-management techniques such as event logs, compaction, observation masking and context isolation, with the Pi harness as a case study. The assigned ReAct paper and Anthropic's Building Effective Agents each supply half the picture.

Make Agents Remember What Matters: MemGPT, Letta, Mem0, and Generative Agents | Stanford CS329Z Lecture 7

Lecture 07 sorts agent memory into working, episodic, semantic and procedural types, compares skill libraries, MemGPT-style tiers, reflective consolidation and memory maintenance, and covers memory benchmarks plus forgetting, privacy and over-personalization. The readings run from MemGPT's virtual memory to Letta, Mem0 and Generative Agents.

Go Solo or Call a Meeting: Division of Labor, Communication, and Failure in Multi-Agent Systems | Stanford CS329Z Lecture 8

Lecture 08 first asks whether a single agent is enough, then compares orchestrator, swarm and hybrid patterns, communication through handoffs, message boards and A2A, and coordination infrastructure such as task ledgers, shared memory and worktree isolation, before tracing why multi-agent systems fail. The readings run from AutoGen to MAST, the single-agent counterargument and DyLAN.

Change the Prompt, the Weights, or Think Longer: Three Axes of Agent Optimization | Stanford CS329Z Lecture 9

Lecture 09 asks when optimization pays off, then compares context optimization (bootstrapped few-shot, MIPROv2, OPRO, TextGrad, GEPA), weight optimization (SFT, PPO, GRPO, on-policy distillation), and agents as optimizers. The readings cover test-time compute, GEPA, BetterTogether and MIPRO, ending with three things to do before HW1 is due.

After the Agent Says Done, Verify It: The Terminal-Bench Guest Lecture | Stanford CS329Z Lecture 10

Lecture 10 is a guest lecture by Terminal-Bench co-creators Ryan Marten and Alex Shaw on evaluating agents in terminal environments: how to write tasks, how verifiers check the final state, and how task versions and the Harbor harness are managed. The assigned Terminal-Bench paper adds the benchmark's design and results.

What Data Do Agents Need? Traces, Demonstrations, Feedback, and the Data Flywheel | Stanford CS329Z Lecture 11

Lecture 11 lays out the forms and sources of agent data: traces, demonstrations and feedback, data for optimization versus evaluation, data flywheels, synthetic data and data from human-agent interaction, with a warning that data can teach models unintended shortcuts. The readings are Shankar's data flywheel essay and a survey of LLMs for data annotation and synthesis.

More Data Is Not Always Better: Selection, Validation, and Quality | Stanford CS329Z Lecture 12

Per the schedule, Lecture 12 covers finding maximally informative data, filtering and selection, tiny-but-targeted benchmarks, annotation practice, quality assessment and building datasets from agent traces. SWE-smith shows how to scale software-engineering task data, Who Validates the Validators covers aligning LLM grading with humans, and LIMA shows what a small high-quality dataset can do.

Don't Let the Score Fool You: Write the Full Evaluation as a 4-Tuple | Stanford CS329Z Lecture 13

Per the schedule, Lecture 13 covers why evals are hard, the request / environment / stopping criteria / scorer 4-tuple, properties of good benchmarks, realistic scaffolding and reliability. The readings are the agentic benchmark best-practice checklist, Press's benchmark guide and tinyBenchmarks.

Let a Model Judge: Grader Choice, Judge Bias, and Calibration | Stanford CS329Z Lecture 14

Per the schedule, Lecture 14 covers the three grader types, judge prompt design, known biases, pairwise versus pointwise evaluation, non-determinism metrics such as pass@k and pass^k, harness design and Anthropic's eight-step roadmap. The readings run from Demystifying Evals and MT-Bench to AutoMetrics and AutoLibra.

Put Guardrails on the Agent: Privacy, Prompt Injection, Sandboxes, and Permissions | Stanford CS329Z Lecture 15

Per the schedule, Lecture 15 covers privacy risks from tool access, prompt injection including indirect injection, red-teaming, sandboxing and permission models, output guardrails, liability, responsible deployment and human-in-the-loop patterns. The readings run from PrivacyLens's leakage in action to simulated privacy-risk search, deanonymization, contextualized privacy defense, prompt injection and the Responsible Scaling Policy.

For a Coding Agent, Build a Good IDE First | Stanford CS329Z Lecture 17

Per the schedule, Lecture 17 covers how coding agents work end to end: the SWE-agent, Claude Code and OpenHands architectures, scaffolds as design decisions, SWE-bench and the 4-tuple framework in practice, and the future of software development. The readings cover SWE-agent's ACI, OpenHands's event-stream sandbox, Claude Code practice, long-running harnesses and SWE-bench.

From Waiting for Instructions to Acting First: Proactive Agents and General User Models | Stanford CS329Z Lecture 18

Per the schedule, Lecture 18 covers the move from reactive to proactive agents: General User Models, Next Action Prediction, open-source proactive personal agents, privacy and trust, and when agents should initiate versus wait. The readings are GUM, Next Action Predictors and OpenClaw.

(Finale) Open Problems and Demo Day: Computer Use, Web Agents, and Pre-Launch Checks | Stanford CS329Z Lecture 19

Per the schedule, Lecture 19 closes the course with multimodal agents, web and computer-use agents, science agents, long-running architectures, production and observability (tracing, monitoring, cost management), and open problems in reliability, scalability and interpretability. The additional readings are OSWorld and WebShop; the final Demo Day falls in exam week, Dec 7–11.

Compound AI Systems: How Models, Data, and Tools Work Together | Stanford CS329Z Lecture 1

Start with the opening slides on the agent loop, components, and engineering challenges, then examine BAIR's compound systems, Ng's work patterns, and Si's execution-feedback experiments. Distinguish the lecture, required reading, and additional readings.

Training Small LLMs From Scratch in the Chinese Community: Corpus, Tokenizers, and Three Open-Source Projects

A close look at three open-source projects training LLMs from scratch in the Chinese community — baby-llama2-chinese (218M, 63.4B tokens), ChatLM-mini-Chinese (0.2B T5, 10.23M dialogues), and Steel-LLM (1.12B, 1T tokens, 8 months) — comparing corpus strategy, tokenizer decisions, and community ecosystem. Honest evaluation included: baby-llama2 scored a bottom-ranking 21 in MiniMind's side-by-side test; ChatLM has the strongest knowledge (62) but weak coding.

Learning from Mature Coding Agents (39): Two Rules for Flicker-Free Tool Result Display in TUIs

Four coding agent TUIs all follow the same two rules: tools maintain constant height (one-line summary, never jumping from 0 to N lines) and never auto-collapse (only user-initiated expand/collapse). looplane violates both.

How to Spend Every Parameter: OpenELM's Layer-wise Scaling and MiniCPM's Three-stage Unfreezing

OpenELM uses layer-wise scaling to shift parameters toward layers near the output; with 1.08B parameters and 1.5T tokens it beats OLMo 1.2B (+2.36% on the LLM360 average) despite OLMo training on 3T tokens. MiniCPM trains multimodal small models from scratch with a three-stage unfreezing recipe (Resampler first, vision encoder next, everything unfrozen last); MiniCPM-V 4.5 reaches sub-30B SOTA on VideoMME with only 8B parameters, and 4-bit quantization squeezes fp16's 16–17GB memory footprint down to about 5GB for phones.

Karpathy's nano lineage: nanoGPT, llm.c, and nanochat

A tour of Karpathy's three teaching repos: nanoGPT (2022, ~300 lines each to reproduce GPT-2 124M), llm.c (pure C/CUDA training), and nanochat (2025-10, one speedrun.sh from tokenizer to WebUI). $100 and 4 hours on 8×H100 buys a chatty model; GPT-2-grade capability is now down to about 2 hours and $48.

The framework for training from scratch: LitGPT's no-abstraction rewrites, pretrain flow, and the TinyLlama track record

LitGPT (Lightning AI, ~13,600 stars, Apache 2.0) rewrites 20+ mainstream LLMs — Llama 3, Qwen2.5, Phi 4 — from scratch as single-file, no-abstraction implementations, with a full pretrain / finetune / evaluate / serve CLI. TinyLlama (1.1B parameters, 3T tokens) was trained on this codebase. This post breaks down how it differs from MiniMind, how to actually use it, and where it stops.

MiniMind: Train an LLM From Scratch for $0.40

MiniMind is an open-source project for training LLMs from scratch: a 64M Dense model and a 198M-A64M MoE model that run the entire chain — Pretrain → SFT → LoRA → DPO → PPO/GRPO/CISPO → Agentic RL — in ~2 hours on a single RTX 3090 at roughly 3 RMB (~$0.40). Every core algorithm is implemented natively in PyTorch with no high-level wrappers.