Get in Touch

Course Outline

AI Sovereignty and Local LLM Deployment

  • Risks associated with cloud LLMs: data retention policies, training on user inputs, and foreign jurisdiction implications.
  • Ollama architecture: model server functionality, registry management, and OpenAI-compatible API integration.
  • Comparative analysis 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 systems with CUDA and ROCm support.
  • CPU-only fallback mechanisms and AVX/AVX2 optimization techniques.
  • Docker deployment strategies and persistent volume mapping.
  • Multi-GPU configurations and VRAM allocation strategies.

Model Management

  • Downloading models from the Ollama registry (e.g., ollama pull llama3).
  • Importing GGUF models sourced from HuggingFace and TheBloke.
  • Understanding quantization levels: trade-offs between Q4_K_M, Q5_K_M, and Q8_0.
  • Managing model switching and concurrent model loading limits.

Custom Modelfiles

  • Syntax for writing Modelfiles: utilizing FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
  • Tuning parameters such as temperature, top_p, and repeat_penalty.
  • Engineering system prompts to define role-specific behaviors.
  • 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 functionality.
  • Integrating with LangChain, LlamaIndex, and custom applications.
  • Managing authentication and rate limiting via reverse proxies.

Performance Optimization

  • Sizing context windows and managing KV cache efficiently.
  • Handling batch inference and parallel requests.
  • Allocating CPU threads and ensuring NUMA awareness.
  • Monitoring GPU utilization and managing memory pressure.

Security and Compliance

  • Implementing network isolation for model serving endpoints.
  • Setting up input filtering and output moderation pipelines.
  • Auditing 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 principles and transformer models.
  • Familiarity with REST APIs and JSON formatting.

Target Audience

  • AI engineers and developers looking to replace cloud-based LLM APIs.
  • Organizations handling sensitive data that prohibits 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