Thank you for sending your enquiry! One of our team members will contact you shortly.
Thank you for sending your booking! One of our team members will contact you shortly.
Duration 14 hours
Course Outline
AI Sovereignty and Local LLM Deployment
- Assessing the risks associated with cloud LLMs, including data retention, training on user inputs, and jurisdictional concerns.
- Examining Ollama’s architecture, comprising its model server, registry, and OpenAI-compatible API.
- Comparing Ollama with alternative solutions such as vLLM, llama.cpp, and Text Generation Inference.
- Reviewing licensing terms for Llama, Mistral, Qwen, and Gemma.
Installation and Hardware Configuration
- Installing Ollama on Linux with support for CUDA and ROCm.
- Implementing CPU-only fallbacks and optimizing for AVX/AVX2 instructions.
- Deploying via Docker and configuring persistent volume mappings.
- Setting up multi-GPU environments and managing VRAM allocation strategies.
Model Management
- Retrieving models from the Ollama registry, e.g., ollama pull llama3.
- Importing GGUF models from HuggingFace and TheBloke.
- Evaluating quantization levels such as Q4_K_M, Q5_K_M, and Q8_0 to balance performance and size.
- Managing model switching and understanding concurrent model loading limits.
Custom Modelfiles
- Mastering Modelfile syntax, including FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
- Tuning parameters like temperature, top_p, and repeat_penalty.
- Engineering system prompts to define role-specific behaviors.
- Creating and publishing custom models to a local registry.
API Integration
- Utilizing the OpenAI-compatible /v1/chat/completions endpoint.
- Handling streaming responses and enforcing JSON output modes.
- Integrating with frameworks like LangChain, LlamaIndex, and custom applications.
- Implementing authentication and rate limiting using a reverse proxy.
Performance Optimization
- Managing context window sizing and KV cache efficiency.
- Optimizing batch inference and parallel request handling.
- Allocating CPU threads and considering NUMA topology.
- Monitoring GPU utilization and memory pressure to maintain stability.
Security and Compliance
- Isolating network access for model serving endpoints.
- Establishing input filtering and output moderation pipelines.
- Maintaining audit logs for prompts and generated completions.
- Verifying model provenance through hash checks.
Requirements
- Intermediate proficiency in Linux administration and containerization.
- High-level understanding of machine learning and transformer architectures.
- Comfort with REST APIs and JSON data structures.
Target Audience
- AI engineers and developers looking to replace cloud-based LLM APIs.
- Organizations with strict data sensitivity policies that preclude cloud model usage.
- Government and defense teams requiring air-gapped language model capabilities.