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
- Challenges associated with cloud LLMs, including data retention, training on user inputs, and foreign jurisdiction issues.
- Ollama architecture components: the model server, registry, and OpenAI-compatible API.
- Comparative analysis with vLLM, llama.cpp, and Text Generation Inference.
- Licensing considerations for models such as Llama, Mistral, Qwen, and Gemma.
Installation and Hardware Configuration
- Installing Ollama on Linux with support for CUDA and ROCm environments.
- CPU-only fallback mechanisms and optimization using AVX/AVX2 instructions.
- Deploying via Docker and mapping persistent volumes.
- Configuring multi-GPU setups and strategies for VRAM allocation.
Model Management
- Retrieving models from the Ollama registry, for example: ollama pull llama3.
- Importing GGUF models from sources like HuggingFace and TheBloke.
- Evaluating tradeoffs across quantization levels such as Q4_K_M, Q5_K_M, and Q8_0.
- Managing model switching and limits on concurrent model loading.
Custom Modelfiles
- Syntax for writing Modelfiles, 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.
- Implementing streaming responses and JSON output modes.
- Integrating with frameworks such as LangChain, LlamaIndex, and custom applications.
- Managing authentication and rate limiting using a reverse proxy.
Performance Optimization
- Sizing context windows and managing KV cache resources.
- Optimizing batch inference and handling parallel requests.
- Allocating CPU threads with NUMA awareness.
- Monitoring GPU utilization and memory pressure.
Security and Compliance
- Implementing network isolation for model serving endpoints.
- Establishing pipelines for input filtering and output moderation.
- Maintaining audit logs for prompts and generated completions.
- Verifying model provenance and integrity through hash checks.
Requirements
- Intermediate proficiency in Linux administration and container management.
- A high-level understanding of machine learning concepts and transformer architectures.
- Familiarity with REST APIs and JSON data formats.
Target Audience
- AI engineers and developers seeking to replace cloud-based LLM APIs.
- Organizations where data sensitivity precludes the use of cloud-hosted models.
- Government and defense teams requiring air-gapped language model capabilities.