Build private AI applications with small language models—without depending on cloud-only APIs.
Practical Small Language Models is a hands-on guide to building real-world AI systems with Qwen, Gemma, Phi, Ollama, quantization, fine-tuning, RAG, tools, and AI agents.
Through one evolving project, PrivateDesk AI, you will learn how
Run small language models locallyChoose and benchmark the right model for your hardwareUse GGUF, quantization, LoRA, and QLoRABuild private RAG pipelines with embeddings, vector search, reranking, and citationsCreate reliable structured outputs and evaluation workflowsAdd function calling, tools, memory, and controlled agentsDeploy your system through APIs and containersImprove security, observability, performance, capacity, and recoveryThis is not a collection of disconnected demos. You build one complete private AI system from local inference to production deployment, while learning how to measure quality, control failures, reduce hallucinations, protect private data, and safely replace models as the ecosystem evolves. PRACTICAL SMALL LANGUAGE MODELS
Written for developers, AI engineers, technical students, and Python users, the book includes the practical code, commands, configurations, tests, datasets, and project files needed to follow along. PRACTICAL SMALL LANGUAGE MODELS
If you want to build local AI, private RAG systems, fine-tuned SLMs, and production-ready AI agents, this book gives you a practical path from your first local model to a complete private AI architecture.