Get in Touch

Course Outline

AI Sovereignty and Local LLM Deployment

  • Assessing risks associated with cloud LLMs, including data retention, input training, and foreign jurisdiction.
  • Exploring Ollama’s architecture, encompassing the model server, registry, and OpenAI-compatible API.
  • Comparing Ollama with alternatives such as vLLM, llama.cpp, and Text Generation Inference.
  • Reviewing model licensing terms for Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

  • Installing Ollama on Linux with support for CUDA and ROCm.
  • Implementing CPU-only fallbacks and AVX/AVX2 optimizations.
  • Deploying via Docker with persistent volume mapping.
  • Configuring multi-GPU setups and VRAM allocation strategies.

Model Management

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

Custom Modelfiles

  • Writing Modelfile syntax including FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
  • Tuning parameters like temperature, top_p, and repeat_penalty.
  • Engineering system prompts to define role-specific behaviors.
  • Creating and publishing custom models to a 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.
  • Optimizing batch inference and parallel request handling.
  • Allocating CPU threads with NUMA awareness.
  • Monitoring GPU utilization and memory pressure.

Security and Compliance

  • Isolating network access for model serving endpoints.
  • Establishing input filtering and output moderation pipelines.
  • Maintaining audit logs for prompts and completions.
  • Verifying model provenance and hashes.

Requirements

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

Target Audience

  • AI engineers and developers seeking to replace cloud LLM APIs.
  • Organizations where data sensitivity precludes the use of cloud-based models.
  • Government and defense teams requiring air-gapped language model capabilities.
 14 Hours

Number of participants


Price per participant

Upcoming Courses

Related Categories