aie-book
[WIP] Resources for AI engineers. Also contains supporting materials for the book AI Engineering (Chip Huyen, 2025)
Master production AI inference latency optimization. Reduce time to first token (TTFT) with quantized prefilling and optimize time per output token (TPOT) using dynamic batching and KV-cache.
How to Select the Right Foundation Model for Your Use Case: A 3-Stage Engineering ApproachSelect the right foundation model for your use case with a 3-stage engineering approach. Define evaluation axes, gather candidates, and benchmark for latency, cost, and accuracy trade-offs.
How to Solve Memory Bottlenecks in Training Foundation Models: 6 Proven StrategiesSolve memory bottlenecks in foundation model training with 6 expert strategies. Learn PEFT, gradient checkpointing, quantization, and more to optimize your training.
How to Build Feedback Loops for AI Applications: Architecture, Implementation, and Best PracticesLearn how to build feedback loops for AI applications. Connect user interfaces, observability, storage, and model updates for continuous improvement and better AI.
How to Implement Structured Outputs from LLMs Reliably: A Multi-Layered ArchitectureLearn to implement reliable structured outputs from LLMs with a multi-layered architecture including prompt guardrails, server-side validation, and grammar constraints for consistent JSON.
AI Engineering vs Traditional ML Engineering: 5 Key Differences ExplainedDiscover the 5 key differences between AI engineering and traditional ML engineering. Understand the shift to foundation models, prompt engineering, and feedback loops.
How Test Time Compute Improves LLM Performance: 6 Architectural MethodsDiscover how test time compute boosts LLM performance with 6 architectural methods like beam search and retrieval augmentation. Enhance output and inject knowledge without retraining.
Prompt Injection Defense: 6 Proven Strategies for Securing LLM ApplicationsDiscover 6 proven prompt injection defense strategies to secure LLM applications. Learn to implement layered protection against jailbreak attacks for robust AI security.
How to Design an AI Engineering Architecture with Guardrails: A Layered ApproachDesign an AI engineering architecture with guardrails using a layered approach. Implement safety checks at the model gateway, inference service, and standalone policy service for robust AI systems.
How to Reduce Inference Cost with Quantization: A Complete Technical GuideReduce inference cost with quantization. Learn how INT8 and 4-bit models cut memory by 75% and boost throughput 2-4x. Optimize models without code changes.
Quantization Methods for Reducing LLM Model Size: 5 Techniques ExplainedDiscover 5 quantization methods to reduce LLM model size by up to 75%. Learn how converting 32-bit weights to lower-precision formats like INT8 or FP16 maintains model capability.
When to Use LoRA for Fine-Tuning: 6 Scenarios for Parameter-Efficient LLM TrainingDiscover when to use LoRA for fine-tuning LLMs efficiently. Train models with limited GPU memory and enable rapid prototyping and modular deployment.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →