Get in Touch

Course Outline

AI Sovereignty and Local Deployment of LLMs

  • Risks associated with cloud LLMs: data retention, input training, and foreign jurisdiction issues.
  • Ollama architecture overview: model server, registry, and OpenAI-compatible API.
  • Comparisons 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 with CUDA and ROCm support.
  • CPU-only fallback options and AVX/AVX2 optimisation techniques.
  • Docker deployment methods and persistent volume mapping.
  • Multi-GPU configuration and VRAM allocation strategies.

Model Management

  • Downloading models from the Ollama registry: using commands like 'ollama pull llama3'.
  • Importing GGUF models from HuggingFace and TheBloke repositories.
  • Understanding quantization levels (Q4_K_M, Q5_K_M, Q8_0) and their trade-offs.
  • Managing model switching and limits on concurrent model loading.

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 behaviours.
  • Creating and publishing custom models to the local registry.

API Integration

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

Performance Optimisation

  • Configuring context window size and managing KV cache.
  • Conducting batch inference and handling parallel requests.
  • Allocating CPU threads and ensuring NUMA awareness.
  • Monitoring GPU utilization and managing memory pressure.

Security and Compliance

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

Requirements

  • Intermediate proficiency in Linux administration and container management.
  • A high-level understanding of machine learning concepts and transformer models.
  • Familiarity with REST APIs and JSON structures.

Audience

  • AI engineers and developers seeking alternatives to cloud LLM APIs.
  • Organisations bound by data sensitivity protocols that prohibit the use of cloud models.
  • Government and defence teams requiring air-gapped language models for security.
 14 Hours

Number of participants


Price per participant

Upcoming Courses

Related Categories