Get in Touch

Course Outline

AI Sovereignty and Local LLM Deployment

  • Risks associated with cloud LLMs: data retention policies, input-based training, and foreign jurisdiction issues.
  • Ollama architecture overview: model server, registry, and OpenAI-compatible API.
  • Comparison with vLLM, llama.cpp, and Text Generation Inference.
  • Model licensing specifics for Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

  • Installing Ollama on Linux with CUDA and ROCm support.
  • CPU-only fallback mechanisms and AVX/AVX2 optimization techniques.
  • Docker deployment strategies and persistent volume mapping.
  • Multi-GPU configuration and VRAM allocation strategies.

Model Management

  • Retrieving models from the Ollama registry: example command ollama pull llama3.
  • Importing GGUF models from HuggingFace and TheBloke repositories.
  • Analyzing quantization levels: tradeoffs between Q4_K_M, Q5_K_M, and Q8_0.
  • Managing model switching and limits on concurrent model loading.

Custom Modelfiles

  • Syntax structure for Modelfiles: FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
  • Tuning parameters such as temperature, top_p, and repeat_penalty.
  • Engineering system prompts to drive role-specific model behavior.
  • Creating and publishing custom models to the local registry.

API Integration

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

Performance Optimization

  • Configuring context window size and managing KV cache efficiency.
  • Handling batch inference and parallel request processing.
  • Optimizing CPU thread allocation and ensuring NUMA awareness.
  • Monitoring GPU utilization metrics and memory pressure levels.

Security and Compliance

  • Establishing network isolation for model serving endpoints.
  • Implementing 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 and container administration.
  • High-level understanding of machine learning concepts and transformer models.
  • Familiarity with REST APIs and JSON data formats.

Target Audience

  • AI engineers and developers looking to migrate away from cloud LLM APIs.
  • Organizations handling sensitive data that restricts the use of cloud models.
  • Government and defense teams requiring air-gapped language model solutions.
 14 Hours

Number of participants


Price per participant

Upcoming Courses

Related Categories