Get in Touch
 Duration 14 hours

Course Outline

AI Sovereignty and Local LLM Deployment

  • Challenges associated with cloud LLMs: data retention, input usage for training, and cross-border jurisdiction issues.
  • Ollama architecture: encompassing the model server, registry, and OpenAI-compatible API.
  • Technical comparison with vLLM, llama.cpp, and Text Generation Inference.
  • Review of model licensing terms for Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

  • Setting up Ollama on Linux with support for CUDA and ROCm.
  • Implementing CPU-only fallbacks and AVX/AVX2 optimizations.
  • Deploying via Docker and configuring persistent volume mappings.
  • Configuring multi-GPU environments and managing VRAM allocation strategies.

Model Management

  • Fetching models from the Ollama registry using commands like 'ollama pull llama3'.
  • Importing GGUF models from HuggingFace and TheBloke.
  • Evaluating quantization levels such as Q4_K_M, Q5_K_M, and Q8_0 for optimal tradeoffs.
  • Managing model switching and understanding concurrent model loading limits.

Custom Modelfiles

  • Mastering Modelfile syntax: utilizing FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
  • Tuning parameters including temperature, top_p, and repeat_penalty.
  • Engineering system prompts to define role-specific behavior.
  • Creating custom models and publishing them to a local registry.

API Integration

  • Utilizing the OpenAI-compatible /v1/chat/completions endpoint.
  • Handling streaming responses and JSON mode operations.
  • Integrating with LangChain, LlamaIndex, and custom application stacks.
  • Implementing authentication and rate limiting via reverse proxies.

Performance Optimization

  • Managing context window sizing and KV cache efficiency.
  • Optimizing batch inference and parallel request handling.
  • Allocating CPU threads and ensuring NUMA awareness.
  • Monitoring GPU utilization and memory pressure metrics.

Security and Compliance

  • Implementing network isolation for model serving endpoints.
  • Establishing input filtering and output moderation pipelines.
  • Maintaining audit logs for prompts and completions.
  • Verifying model provenance and hash integrity.

Requirements

  • Intermediate proficiency in Linux and container administration.
  • High-level understanding of machine learning and transformer architectures.
  • Working knowledge of REST APIs and JSON data formats.

Target Audience

  • AI engineers and developers looking to migrate away from cloud LLM APIs.
  • Organizations with strict data sensitivity requirements that preclude cloud model usage.
  • Government and defense teams needing air-gapped language model solutions.

Number of participants


Price per participant

Upcoming Courses

Related Categories