Get in Touch
 Duration 14 hours

Course Outline

AI Sovereignty and Local LLM Deployment

  • Analysis of cloud LLM risks, including data retention, input usage for training, and foreign jurisdictional issues.
  • Overview of Ollama’s architecture, covering its model server, registry, and OpenAI-compatible API.
  • Comparative analysis of Ollama against vLLM, llama.cpp, and Text Generation Inference.
  • Discussion on model licensing terms for Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

  • Steps for installing Ollama on Linux with support for CUDA and ROCm.
  • Configuring CPU-only fallbacks and optimizing for AVX/AVX2 instructions.
  • Deploying via Docker and mapping persistent volumes.
  • Strategies for multi-GPU setups and VRAM allocation.

Model Management

  • Retrieving models from the Ollama registry, such as using `ollama pull llama3`.
  • Importing GGUF models from HuggingFace and TheBloke.
  • Evaluating quantization levels like Q4_K_M, Q5_K_M, and Q8_0, including their tradeoffs.
  • Managing model switching and understanding limits on concurrent model loading.

Creating Custom Modelfiles

  • Syntax for writing Modelfiles, including FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
  • Tuning parameters such as temperature, top_p, and repeat_penalty.
  • Engineering system prompts to achieve role-specific behaviors.
  • Building and publishing custom models to a 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.
  • Implementing authentication and rate limiting using reverse proxies.

Performance Optimization

  • Managing context window sizing and KV cache efficiency.
  • Handling batch inference and parallel request processing.
  • Optimizing CPU thread allocation with NUMA awareness.
  • Monitoring GPU utilization and memory pressure.

Security and Compliance

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

Requirements

  • Intermediate proficiency in Linux systems and container administration.
  • A high-level understanding of machine learning principles and transformer architectures.
  • Working knowledge of REST APIs and JSON data formats.

Target Audience

  • AI engineers and developers looking to migrate away from cloud LLM APIs.
  • Organizations with strict data sensitivity policies that preclude the use of cloud-based models.
  • Government and defense units requiring air-gapped language model solutions.

Number of participants


Price per participant

Upcoming Courses

Related Categories