Speaker Notes

Local models

Small, quantized and on-device models: Gemma, Llama, phones and laptops.

5talks
47answers
4mainly about it
5new
DecJanFebMarAprMayJunJulAugSepOctNov

What your library answers 47

How can developers evaluate large numbers of model releases without relying on leaderboards?

Developers can create a custom task, such as generating an SVG of a pelican on a bicycle, to test text models' code-output capabilities. This practical benchmark avoids untrusted leaderboards and tests models on an intentionally difficult and absurd task.

Thumbnail: 2025 in LLMs so far, illustrated by Pelicans on Bicycles — Simon Willison ▶ 1:12 2025 in LLMs so far, illustrated by Pelicans on Bicycles — Simon Willison

What does an inference engine do?

An inference engine takes static model weights and turns them into a system that can serve requests reliably and at scale. It manages GPU resources, schedules incoming requests, and decides how to process work together. Examples of inference engines include vLLM, Ollama, and Llama CPP.

Thumbnail: What Is LLM Inference? How AI Models Generate Responses ▶ 1:16 What Is LLM Inference? How AI Models Generate Responses

Why do massive AI models like DeepSeek fail to see images?

Giant models often lack native perception capabilities because they rely on text-only architectures. Without integrated sensory components, they cannot process raw visual inputs directly.

Thumbnail: DeepMind Just Changed How AI Sees The World ▶ 0:06 DeepMind Just Changed How AI Sees The World

How do small language models compare to frontier models in cost and capability?

Small language models are significantly more cost-effective, running datasets at a fraction of the cost of frontier models. While frontier models handle complex tasks easily, small models can solve a substantial percentage of common tasks when properly guided.

Thumbnail: Agentic coding workflows with small models ▶ 1:28 Agentic coding workflows with small models

What is a language model fundamentally doing under the hood?

A language model is essentially a function that predicts the next likely word or token in a sentence based on its training. By predicting successive words, it constructs coherent continuations or fills in missing parts of text. During this process, it evaluates probabilities for various candidate words to determine the most fitting output.

Thumbnail: A Hackers' Guide to Language Models ▶ 1:33 A Hackers' Guide to Language Models

Why do inference engines use OpenAI compatible endpoints?

Most inference engines expose standard OpenAI compatible endpoints so developers can use the same request format regardless of the underlying model. This makes it easy to swap one model for another in an application without rewriting any code.

Thumbnail: What Is LLM Inference? How AI Models Generate Responses ▶ 1:45 What Is LLM Inference? How AI Models Generate Responses

What is Gemma 4 and how does it differ in size?

Gemma 4 is an open and free model created by DeepMind that runs locally on laptops. Compared to massive trillion-parameter systems, it is a tiny fraction of the size yet capable of native perception.

Thumbnail: DeepMind Just Changed How AI Sees The World ▶ 0:50 DeepMind Just Changed How AI Sees The World

What are the primary reasons to choose a local small model over a cloud API?

Developers choose local models for data privacy, zero latency without round trips to servers, zero marginal cost during error loops, and offline access. These benefits make local execution ideal for sensitive code and disconnected environments.

Thumbnail: Agentic coding workflows with small models ▶ 6:18 Agentic coding workflows with small models

How do language models process text instead of whole words?

Language models tokenize text into sub-word units, whole words, punctuation, or numbers using specific tokenizers like tick token. These tokens are mapped to numeric IDs that act as lookups into the model's vocabulary. For instance, prefixes like spaces are often encoded directly into the token representation.

Thumbnail: A Hackers' Guide to Language Models ▶ 4:45 A Hackers' Guide to Language Models

How does tokenization impact prompt costs?

Tokenization breaks text into tokens and maps each one to an arbitrary token ID that the model processes. This step dictates your prompt cost because you are billed per token. While larger vocabularies represent text more efficiently with fewer tokens, they introduce computational overhead during training.

Thumbnail: What Is LLM Inference? How AI Models Generate Responses ▶ 2:15 What Is LLM Inference? How AI Models Generate Responses

How do conventional AI models handle multi-modal tasks like vision and audio?

Conventional setups connect multiple separate neural networks together. They require a dedicated visual model for images and a specialized audio encoder for sound.

Thumbnail: DeepMind Just Changed How AI Sees The World ▶ 1:48 DeepMind Just Changed How AI Sees The World

How does quantization reduce memory requirements for running models locally?

Quantization shrinks the precision of model weights, such as compressing a 16-bit floating-point model down to a 4-bit integer format. This dramatically reduces video RAM requirements so the model can fit on standard consumer hardware.

Thumbnail: Agentic coding workflows with small models ▶ 7:31 Agentic coding workflows with small models

How does pre-training compress world knowledge into a neural network?

Pre-training forces a deep neural network to guess the next word across vast corpuses like Wikipedia, utilizing stochastic gradient descent to optimize its weights. To succeed at this task, the model must implicitly learn complex real-world concepts, entities, and relationships. This capability essentially acts as a form of information compression.

Thumbnail: A Hackers' Guide to Language Models ▶ 7:40 A Hackers' Guide to Language Models

How does continuous batching optimize GPU usage?

Processing individual requests one by one wastes enormous amounts of GPU resources and tanks system throughput. Continuous batching groups requests together and immediately slots a new request in as soon as a previous one finishes. This mechanism keeps GPUs running near full utilization at all times.

Thumbnail: What Is LLM Inference? How AI Models Generate Responses ▶ 3:49 What Is LLM Inference? How AI Models Generate Responses

How does direct patch projection eliminate the need for separate encoders?

Instead of using dedicated encoders, the model cuts pictures into small patches and projects those pixels directly into its internal representation. Audio is similarly sliced into chunks and poured straight into the main transformer.

Thumbnail: DeepMind Just Changed How AI Sees The World ▶ 2:29 DeepMind Just Changed How AI Sees The World

What is speculative decoding and how does it speed up generation?

Speculative decoding uses a smaller drafter model to predict a few upcoming tokens ahead of time, which are then validated by the larger model. Because they share the same context cache, this technique achieves significant speedups without degrading output quality.

Thumbnail: Agentic coding workflows with small models ▶ 8:58 Agentic coding workflows with small models

Why are fine-tuning and instruction tuning necessary after pre-training?

While pre-training instills broad world knowledge, raw models are not inherently optimized for answering questions or solving tasks. Instruction tuning feeds the model targeted datasets of questions and responses to shape its behavior for problem-solving. Additional steps like reinforcement learning from human feedback further refine the outputs by aligning them with human preference.

Thumbnail: A Hackers' Guide to Language Models ▶ 15:40 A Hackers' Guide to Language Models

What happens during the prefill phase?

During the prefill phase, the model reads the entire prompt at once to build an understanding of it and lays down a key value cache. This step requires huge bursts of parallel math, making it compute-bound and limited by raw hardware computation capacity.

Thumbnail: What Is LLM Inference? How AI Models Generate Responses ▶ 4:40 What Is LLM Inference? How AI Models Generate Responses

Why is pouring raw patches directly into the main transformer beneficial?

This approach forces the system to learn perception and reasoning simultaneously while removing hundreds of millions of specialist parameters. It blurs the boundary between thinking and perceiving, making the AI punch above its weight.

Thumbnail: DeepMind Just Changed How AI Sees The World ▶ 3:08 DeepMind Just Changed How AI Sees The World

Why is expanding the context window important for small model performance?

Small models can fail tasks if important files or logs are pushed out of memory by agent compaction. Increasing the context window ensures the model retains critical file information and significantly improves its success rate.

Thumbnail: Agentic coding workflows with small models ▶ 10:43 Agentic coding workflows with small models

How can developers prime language models to provide higher-quality answers?

Developers can improve model outputs by supplying custom instructions that act as prepended text guiding the model's persona and reasoning quality. Explicitly instructing the model to think through background context helps combat its tendency to generate overly confident hallucinations. Additionally, because generation happens sequentially token by token, prompting the model to reason longer increases its computational thoroughness.

Thumbnail: A Hackers' Guide to Language Models ▶ 22:21 A Hackers' Guide to Language Models

How can developers build automated evaluation pipelines for model comparison?

Developers can use command-line screenshot tools and LLMs to automatically judge the outputs of hundreds of model matchups. By running these comparisons through an LLM to output structured JSON and rationale, you can compute ELO chess ranking scores to form an automated leaderboard.

Thumbnail: 2025 in LLMs so far, illustrated by Pelicans on Bicycles — Simon Willison ▶ 12:50 2025 in LLMs so far, illustrated by Pelicans on Bicycles — Simon Willison

Why is the KV cache necessary for long conversations?

The KV cache acts as a running memory of everything the model has read so far in the conversation. Without it, the model would have to reprocess your entire conversation over again for every single token it wants to output.

Thumbnail: What Is LLM Inference? How AI Models Generate Responses ▶ 4:40 What Is LLM Inference? How AI Models Generate Responses

What kinds of inputs can Gemma 4 handle efficiently?

The architecture allows the model to handle both images and audio inputs natively. It can successfully identify objects in videos while engaging in complex conversational tasks.

Thumbnail: DeepMind Just Changed How AI Sees The World ▶ 1:29 DeepMind Just Changed How AI Sees The World

How can developers evaluate whether a model configuration is ready for their tasks?

Developers can use a readiness framework that scores tasks based on reliability, latency thresholds, and RAM usage alongside the model and hardware configuration. Green scores indicate the setup is ready, while other colors suggest adjustments are needed.

Thumbnail: Agentic coding workflows with small models ▶ 12:10 Agentic coding workflows with small models

How do I handle multi-turn state with the OpenAI API?

The OpenAI API is stateless, meaning nothing is stored on the server between requests. To maintain a conversation, you must pass the entire history of messages back in every new API call.

Thumbnail: A Hackers' Guide to Language Models ▶ 43:33 A Hackers' Guide to Language Models