Get in Touch
 Duration 14 hours

Course Outline

AI Sovereignty and Local LLM Deployment

  • Risks associated with cloud LLMs, including data retention, training on user inputs, and foreign jurisdiction issues.
  • Ollama architecture covering the model server, registry, and OpenAI-compatible API.
  • Comparison of Ollama with alternatives such as vLLM, llama.cpp, and Text Generation Inference.
  • Licensing terms for models including Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

  • Installing Ollama on Linux with support for CUDA and ROCm.
  • CPU-only fallback options and AVX/AVX2 optimizations.
  • Docker deployment strategies and persistent volume mapping.
  • Configuring multi-GPU environments and managing VRAM allocation.

Model Management

  • Retrieving models from the Ollama registry, e.g., ollama pull llama3.
  • Importing GGUF models from HuggingFace and TheBloke.
  • Tradeoffs associated with quantization levels: Q4_K_M, Q5_K_M, and Q8_0.
  • Model switching mechanisms and limits on concurrent model loading.

Custom Modelfiles

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

API Integration

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

Performance Optimization

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

Security and Compliance

  • Network isolation techniques for model serving endpoints.
  • Implementing input filtering and output moderation pipelines.
  • Maintaining audit logs of prompts and completions.
  • Verifying model provenance and hashes.

Requirements

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

Target Audience

  • AI engineers and developers looking to substitute cloud LLM APIs.
  • Organizations with data sensitivity constraints that preclude the use of cloud models.
  • Government and defense teams requiring air-gapped language model capabilities.

Number of participants


Price per participant

Upcoming Courses

Related Categories