Get in Touch
 Duration 14 hours

Course Outline

AI Sovereignty and Local LLM Deployment

  • Cloud LLM risks: data retention, input training, and foreign jurisdiction issues.
  • Ollama architecture: model server, registry, and OpenAI-compatible API.
  • Comparison with vLLM, llama.cpp, and Text Generation Inference.
  • Model licensing terms for Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

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

Model Management

  • Retrieving models from the Ollama registry: e.g., ollama pull llama3.
  • Importing GGUF models from HuggingFace and TheBloke.
  • Quantization levels: tradeoffs between Q4_K_M, Q5_K_M, and Q8_0.
  • Model switching and limits on concurrent model loading.

Custom Modelfiles

  • Writing Modelfile syntax: FROM, PARAMETER, SYSTEM, and TEMPLATE.
  • Tuning temperature, top_p, and repeat_penalty parameters.
  • System prompt engineering for role-specific behaviors.
  • Creating and publishing custom models to a local registry.

API Integration

  • Using the OpenAI-compatible /v1/chat/completions endpoint.
  • Managing streaming responses and JSON mode.
  • Integration with LangChain, LlamaIndex, and custom applications.
  • Authentication and rate limiting via reverse proxy.

Performance Optimization

  • Context window sizing and KV cache management.
  • Batch inference and parallel request handling.
  • CPU thread allocation and NUMA awareness.
  • Monitoring GPU utilization and memory pressure.

Security and Compliance

  • Network isolation for model serving endpoints.
  • Input filtering and output moderation pipelines.
  • Audit logging for prompts and completions.
  • Model provenance verification and hashing.

Requirements

  • Intermediate proficiency in Linux and container administration.
  • High-level understanding of machine learning and transformer models.
  • Familiarity with REST APIs and JSON data structures.

Target Audience

  • AI engineers and developers looking to replace cloud LLM APIs.
  • Organizations with data sensitivity restrictions that preclude cloud model usage.
  • Government and defense teams requiring air-gapped language models.

Related Categories