How orca3/llm-model-inference works
This repository is a companion collection for a book on LLM serving and optimization, not one unified runtime. Its central hands-on workflows move from a request through serving infrastructure to generated output, or from a knowledge query through planning, retrieval, and response generation. Separate chapter examples cover optimization, serving frameworks, and cloud deployment. The graph combines sampled implementation relationships with capabilities explicitly described in the README; unsampled notebook internals are not inferred.
Main entry points: llm.py LLM engine · agent.py Knowledge agent · server.py Multi-model API · manager.py Model manager
Components 32
Serving systems
- Single-model API
ch03/single_model_llm_serving/main.py - LLM engine
ch03/single_model_llm_serving/llm/llm.py - Batch workload
ch03/single_model_llm_serving/llm/workload_manager.py - Model executor
ch03/single_model_llm_serving/llm/model_executor.py - Model worker
ch03/single_model_llm_serving/llm/model_worker.py - Model loader
ch03/single_model_llm_serving/llm/model_manager.py - Multi-model API
ch03/multi_model_serving/app/server.py - Model registry
ch03/multi_model_serving/app/store.py - Model manager
ch03/multi_model_serving/app/manager.py - Model engine
ch03/multi_model_serving/app/engine.py - Inference workers
ch03/multi_model_serving/app/worker.py - Serving fundamentals
ch02/ch2_Workthrough_LLM_execution.ipynb - Streaming example
ch02/streaming.py
Knowledge agent
- Knowledge agent
ch04/KnowledgeAgent/agent.py - Action planner
ch04/KnowledgeAgent/planner.py - Action executor
ch04/KnowledgeAgent/actions.py - RAG system
ch04/KnowledgeAgent/rag_system.py - LLM manager
ch04/KnowledgeAgent/llm_manager.py
Optimization examples
- Quantization walkthrough
ch06/quantization_3way_300.ipynb - Speculative decoding
ch07/SpecDecode.ipynb - Advanced KV caching
ch07/LMCache.ipynb - Optimization plan
ch09/model_optimization_in_practice.ipynb
Serving frameworks
- SGLang
ch08/SGLang.ipynb - TensorRT-LLM
ch08/TensorRT_LLM.ipynb - llama.cpp
ch08/llamaCpp.ipynb
Cloud deployment
- AWS Bedrock
ch04/bedrock/aws_bedrock_examples.ipynb - AWS JumpStart
ch04/jumpstart/aws_jumpstart.ipynb - Deep Learning Containers
ch04/dlc/aws_dlc_serving.ipynb - DLC customization
ch04/dlc_customization/aws_dlc_serving_customization.ipynb
Other components
- Engineer
- Knowledge user
- OpenAI services
Connections 35
- Engineer → Serving fundamentals: studies
README.md - Engineer → Single-model API: submits request
README.md - Single-model API → LLM engine: routes requests
ch03/single_model_llm_serving/main.py - LLM engine → Batch workload: queues sequences
ch03/single_model_llm_serving/llm/llm.py - LLM engine → Model executor: executes batches
ch03/single_model_llm_serving/llm/llm.py - Model executor → Model worker: delegates
ch03/single_model_llm_serving/llm/model_executor.py - Model worker → Model loader: loads model
ch03/single_model_llm_serving/llm/model_worker.py - LLM engine → Engineer: streams output
README.md - Engineer → Multi-model API: requests inference
README.md - Multi-model API → Model manager: routes models
ch03/multi_model_serving/app/server.py - Multi-model API → Model registry: lists models
ch03/multi_model_serving/app/server.py - Model manager → Model registry: reads metadata
ch03/multi_model_serving/app/manager.py - Model manager → Model engine: creates workers
ch03/multi_model_serving/app/manager.py - Model engine → Inference workers: selects worker
ch03/multi_model_serving/app/engine.py - Knowledge user → Knowledge agent: asks question
- Knowledge agent → Action planner: plans actions
ch04/KnowledgeAgent/agent.py - Knowledge agent → Action executor: executes actions
ch04/KnowledgeAgent/agent.py - Knowledge agent → RAG system: builds knowledge base
ch04/KnowledgeAgent/agent.py - Action planner → LLM manager: requests planning
ch04/KnowledgeAgent/planner.py - Action executor → RAG system: retrieves context
ch04/KnowledgeAgent/actions.py - Action executor → LLM manager: generates response
ch04/KnowledgeAgent/actions.py - RAG system → OpenAI services: embeds text
ch04/KnowledgeAgent/rag_system.py - LLM manager → OpenAI services: calls chat API
ch04/KnowledgeAgent/llm_manager.py - Engineer → Streaming example: explores streaming
README.md - Engineer → Quantization walkthrough: studies trade-offs
README.md - Engineer → Speculative decoding: explores decoding
README.md - Engineer → Advanced KV caching: explores caching
README.md - Engineer → Optimization plan: follows optimization plan
README.md - Engineer → SGLang: studies framework
README.md - Engineer → TensorRT-LLM: studies framework
README.md - Engineer → llama.cpp: studies framework
README.md - Engineer → AWS Bedrock: explores deployment
README.md - Engineer → AWS JumpStart: explores deployment
README.md - Engineer → Deep Learning Containers: explores deployment
README.md - Deep Learning Containers → DLC customization: customizes example
README.md