Frontier results, on device - RL Nabors, Arize
By AI Engineer
Key Concepts
- SLMs (Smaller Language Models): Models with millions to billions of parameters, designed for efficiency and on-device execution.
- Frontier Models: Large-scale foundation models (e.g., GPT-4, Claude) that are powerful but expensive and cloud-dependent.
- Quantization: A technique (8-bit, 4-bit) to reduce model size and memory requirements, making them suitable for mobile/web deployment.
- Golden Dataset: A curated, human-labeled set of input-output pairs used as ground truth for benchmarking.
- SAGE Model: "Small and Good Enough" model; the smallest model that meets the required performance threshold for a specific task.
- Capability Eval: Testing to determine what an agent can do by comparing small model performance against a large baseline.
- Regression Eval: Continuous testing (similar to CI/CD) to ensure model updates or prompt changes do not degrade performance.
1. The Case for Local Models
Rachel Lee Neighbors argues that relying solely on "one-size-fits-all" frontier models is unsustainable due to:
- Security: Cloud-based inference risks sensitive data exposure and retention.
- Latency: Research indicates a 4-second threshold for user believability; remote calls often exceed this.
- Cost: API costs compound with agentic workflows.
- Reliability: Remote models fail without internet connectivity.
- Environmental Impact: SLMs consume significantly less energy (approx. 25% of an LLM) and task-specific models consume even less.
2. Framework: "Prototype Big, Deploy Small"
Neighbors outlines a four-step methodology for transitioning from expensive cloud models to efficient local ones:
- Prove It: Use a large foundation model (e.g., Gemini, Claude) to confirm the task is achievable.
- Define Success: Create a "Golden Dataset" of input-output pairs. Define metrics such as JSON structural validity, factual consistency, length compliance, and latency (P50/P95).
- Test Small to Large: Evaluate a range of SLMs (e.g., Qwen 2.5, Llama 3.2, Gemma 4) against the baseline.
- Select the SAGE Model: Choose the smallest model that meets the "good enough" criteria.
3. Optimization and Prompt Engineering
When a smaller model falls short of the baseline, Neighbors suggests iterative prompt engineering rather than immediate model replacement:
- Few-Shot Prompting: Providing examples significantly improves SLM performance compared to complex rule-based instructions.
- Chain of Thought: Forcing the model to "think" before outputting can improve grounding, though it may increase latency.
- Post-Processing: Use code-based logic to handle formatting (e.g., truncating length or validating JSON) rather than relying on the model to be perfect.
- Avoid Negative Constraints: Small models often struggle with "don't do X" instructions; they perform better with positive, literal commands.
4. Notable Findings and Case Study
- The Mima Case Study: Neighbors built a social media summarization feature. Initially, it cost ~$1/day using Claude. By switching to Llama 3.2 (3B parameters) and using few-shot prompting, she achieved performance indistinguishable from the baseline while reducing inference costs to zero (on-device).
- The "Judge" Bias: When using a large model to evaluate a small one, the large model may be overly critical. It is essential to "crack open" the evals to see if the small model is actually failing or if the judge is simply biased toward its own style.
- Latency: Llama 3.2 achieved a P50 latency of ~1 second, well within the 4-second user experience limit.
5. Tools Mentioned
- Phoenix (by Arize): An open-source observability platform used for running capability and regression evaluations.
- Goose: An open-agent harness for interacting with local models.
- Chrome Prompt API: Accesses Gemini Nano natively, allowing developers to leverage on-device AI without shipping large model files.
Synthesis
The transition to local models is not just a cost-saving measure; it is a strategic shift toward privacy, reliability, and efficiency. By treating AI implementation like traditional software engineering—using CI/CD-style regression testing and rigorous benchmarking—developers can replace expensive, opaque cloud calls with lightweight, on-device models that provide a superior, faster user experience. The ultimate goal is to identify the "SAGE" model that balances accuracy with the constraints of the user's hardware.
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.
Related Videos

Gemma 4 and the AI Edge Gallery: On-Device AI Gets an Upgrade
Google for Developers

Sovereign Escape Velocity: Ownership w Open Models — Gus Martins, & Ian Ballantyne, Google DeepMind
AI Engineer

Evals Are Broken, Use Them Anyway — Ara Khan, Cline
AI Engineer

Build new features using built-in AI in Chrome
Chrome for Developers

Bring the power of on-device AI to life with Google AI Edge and Gemma
Google for Developers

Gemini Nano on device — Florina Muntenescu & Oli Gaymond, Google DeepMind
AI Engineer

From 46% to 90%: Fine-Tuning Tiny LLMs for On-Device Agents — Cormac Brick, Google
AI Engineer