
SmolLM2 和低于 3B 的模型:边缘和移动端微调
低于 3B 参数的模型可在手机、树莓派和浏览器标签页中运行。以下是如何为边缘部署微调 SmolLM2、Phi-3.5 Mini 和 Qwen 2.5 0.5B,在每一兆字节都至关重要的场景下。
有一类模型大多数开发者忽略了。它们太小了,不会出现在排行榜上。它们不能写论文或解微分方程。
但它们在手机上运行。在浏览器标签页中运行。在 45 美元的树莓派上运行。当你为一个特定任务微调它们时,它们可以做得足够好来部署到生产应用中。
低于 3B 的模型景观
| 模型 | 参数 | 大小 (Q4_K_M) | 关键优势 |
|---|---|---|---|
| SmolLM2 135M | 135M | 85 MB | 最小可用模型 |
| SmolLM2 1.7B | 1.7B | 1.0 GB | 最佳低于 2B 模型 |
| Qwen 2.5 0.5B | 500M | 350 MB | 小规模多语言 |
| Qwen 2.5 3B | 3B | 1.9 GB | 低于 3B 范围顶部 |
| Phi-3.5 Mini | 3.8B | 2.3 GB | 此规模最强推理 |
它们能做什么和不能做什么
能做好的: 单标签分类(88-95% 准确率)、命名实体提取、短文本生成、意图检测、二元决策。
不能做的: 多步推理、长文本生成(超过 100-150 token 质量下降)、复杂结构化输出、通用知识问答、多轮对话。
微调策略
数据质量优于数量。 目标:200-500 个高质量示例。每个示例必须无歧义、有代表性、干净。
部署目标
iOS:iPhone 12 及以上可运行 SmolLM2 1.7B,分类延迟 48ms。 Android:现代设备舒适运行所有低于 3B 模型。 浏览器:SmolLM2 135M 通过 WebLLM,不到 1 秒加载,15ms 建议。 树莓派:Pi 5 运行 SmolLM2 1.7B,8.5 token/秒。
真实用例
- 公用事业公司在技术员平板上部署 SmolLM2 360M 用于离线抄表验证(93% 捕获率)
- 零售应用使用 Qwen 2.5 0.5B 在手机上分类客户消息(91% 准确率,24ms)
- 心理健康日记应用使用 SmolLM2 1.7B 在设备上分类日记条目(数据不离开手机)
- 开发者工具公司在浏览器中运行 SmolLM2 135M 自动补全(85 MB,15ms)
Ship AI that runs on your users' devices.
Ertas early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.
Ship AI that runs on your users' devices.
Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.
Keep reading

Fine-Tuning Gemma 3: Google's Lightweight Model for On-Device Deployment
Gemma 3 is optimized for on-device inference — phones, tablets, edge hardware. Here's how to fine-tune it for mobile AI features and IoT applications that run without a server.

Pydantic AI On-Device: Fine-Tune Qwen3-4B for Type-Safe Mobile Agents
Pydantic AI brings type safety and FastAPI ergonomics to LLM agents. Combine it with a fine-tuned 4B model running on-device via llama.cpp and you get production-grade agents in mobile apps with zero API costs and validated outputs by construction.

On-Device Tool Calling 2026: Qwen3-4B vs Gemma 4 E4B vs Phi-4-Mini
We benchmarked the three best on-device tool-calling bases of 2026 — Qwen3-4B, Gemma 4 E4B, and Phi-4-Mini — across BFCL v4, real mobile latency, and post-fine-tune accuracy. Each wins a different scenario; here's how to pick.