Get in Touch
 Duration 14 hours

Course Outline

AI Sovereignty and Local LLM Deployment

  • Risks associated with cloud LLMs: data retention, training on user inputs, and foreign jurisdiction.
  • Ollama architecture: model server, registry, and OpenAI-compatible API.
  • Comparative analysis with 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 support for CUDA and ROCm.
  • CPU-only fallback options and AVX/AVX2 optimization.
  • Docker deployment strategies and persistent volume mapping.
  • Multi-GPU setup and VRAM allocation strategies.

Model Management

  • Pulling models from the Ollama registry using the ollama pull llama3 command.
  • Importing GGUF models from HuggingFace and TheBloke.
  • Tradeoffs regarding quantization levels: Q4_K_M, Q5_K_M, and Q8_0.
  • Model switching mechanisms and limits on concurrent model loading.

Custom Modelfiles

  • Writing Modelfile syntax: FROM, PARAMETER, SYSTEM, and TEMPLATE.
  • Tuning parameters such as temperature, top_p, and repeat_penalty.
  • System prompt engineering to define role-specific behavior.
  • Creating and publishing custom models to a local registry.

API Integration

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

Performance Optimization

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

Security and Compliance

  • Network isolation for model serving endpoints.
  • Input filtering and output moderation pipelines.
  • Audit logging of prompts and completions.
  • Model provenance tracking and hash verification.

Requirements

  • Intermediate proficiency in Linux and container administration.
  • A high-level understanding of machine learning and transformer models.
  • Working knowledge of REST APIs and JSON.

Audience

  • AI engineers and developers seeking to replace cloud LLM APIs.
  • Organizations with data sensitivity constraints that preclude cloud model usage.
  • Government and defense teams requiring air-gapped language model solutions.

Number of participants


Price per participant

Upcoming Courses

Related Categories