Get in Touch

Course Outline

AI Sovereignty and Local LLM Deployment

  • Risks associated with cloud LLMs: data retention policies, potential training on user inputs, and foreign jurisdiction implications.
  • Ollama architecture overview: model server, registry functions, and OpenAI-compatible API support.
  • Comparative analysis with vLLM, llama.cpp, and Text Generation Inference.
  • Model licensing details for Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

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

Model Management

  • Fetching models from the Ollama registry (e.g., ollama pull llama3).
  • Importing GGUF models sourced from HuggingFace and TheBloke.
  • Evaluating quantization levels: tradeoffs between Q4_K_M, Q5_K_M, and Q8_0.
  • Managing model switching and understanding concurrent model loading limitations.

Custom Modelfiles

  • Syntax for writing Modelfiles: utilizing FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
  • Tuning hyperparameters such as temperature, top_p, and repeat_penalty.
  • Engineering system prompts to define role-specific behaviors.
  • Building and publishing custom models to the local registry.

API Integration

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

Performance Optimization

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

Security and Compliance

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

Requirements

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

Target Audience

  • AI engineers and developers looking to transition away from cloud LLM APIs.
  • Organizations bound by data sensitivity regulations that prohibit 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