Get in Touch

Course Outline

AI Sovereignty and Local LLM Deployment

  • Risks associated with cloud LLMs: data retention policies, training on input data, and foreign jurisdiction issues.
  • Ollama architecture: understanding the model server, registry, and OpenAI-compatible API.
  • Comparison with alternatives such as 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 options and AVX/AVX2 optimization techniques.
  • Docker deployment strategies and persistent volume mapping.
  • Multi-GPU setups and VRAM allocation best practices.

Model Management

  • Pulling models from the Ollama registry (e.g., ollama pull llama3).
  • Importing GGUF models from HuggingFace and TheBloke repositories.
  • Evaluating quantization levels: balancing Q4_K_M, Q5_K_M, and Q8_0 tradeoffs.
  • Managing model switching and limits on concurrent model loading.

Custom Modelfiles

  • Syntax for writing Modelfiles: using FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
  • Tuning temperature, top_p, and repeat_penalty parameters.
  • 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 output modes.
  • Integrating with LangChain, LlamaIndex, and custom applications.
  • Configuring authentication and rate limiting via reverse proxy.

Performance Optimization

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

Security and Compliance

  • Implementing network isolation for model serving endpoints.
  • Establishing input filtering and output moderation pipelines.
  • Audit logging of prompts and completions.
  • Verifying model provenance and hash integrity.

Requirements

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

Audience

  • AI engineers and developers looking to replace cloud 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

Provisional Upcoming Courses (Require 5+ participants)

Related Categories