Get in Touch
 Duration 14 hours

Course Outline

AI Sovereignty and Local LLM Deployment

  • Assessing cloud LLM risks: data retention policies, input usage for training, and jurisdictional concerns.
  • Examining Ollama’s architecture: model server components, registry functionality, and OpenAI-compatible API features.
  • Comparative analysis with vLLM, llama.cpp, and Text Generation Inference.
  • Navigating model licensing terms for Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

  • Setting up Ollama on Linux environments with CUDA and ROCm support.
  • Configuring CPU-only fallbacks and optimizing for AVX/AVX2 instruction sets.
  • Implementing Docker deployments with persistent volume mappings.
  • Establishing multi-GPU configurations and managing VRAM allocation strategies.

Model Management

  • Acquiring models from the Ollama registry using commands like ollama pull llama3.
  • Importing GGUF format models from HuggingFace and TheBloke repositories.
  • Evaluating quantization levels such as Q4_K_M, Q5_K_M, and Q8_0 for performance tradeoffs.
  • Managing model switching and understanding concurrent loading limitations.

Custom Modelfiles

  • Mastering Modelfile syntax: defining FROM, PARAMETER, SYSTEM, and TEMPLATE elements.
  • Adjusting generation parameters including temperature, top_p, and repeat_penalty.
  • Crafting system prompts to enforce role-specific behaviors.
  • Building and distributing custom models to a local registry.

API Integration

  • Utilizing the OpenAI-compatible /v1/chat/completions endpoint.
  • Handling streaming responses and enforcing JSON output modes.
  • Integrating local models with LangChain, LlamaIndex, and bespoke applications.
  • Implementing authentication and rate limiting via reverse proxies.

Performance Optimization

  • Sizing context windows and managing KV cache resources.
  • Optimizing batch inference and parallel request processing.
  • Allocating CPU threads with NUMA topology awareness.
  • Monitoring GPU utilization and tracking memory pressure.

Security and Compliance

  • Isolating network traffic for model serving endpoints.
  • Implementing input filtering and output moderation workflows.
  • Maintaining comprehensive audit logs of prompts and completions.
  • Verifying model provenance through hash validation.

Requirements

  • Proficiency in intermediate Linux administration and container management.
  • A foundational grasp of machine learning principles and transformer architectures.
  • Working knowledge of RESTful APIs and JSON data formats.

Target Audience

  • AI engineers and developers seeking to migrate away from cloud LLM APIs.
  • Organizations with stringent data privacy requirements that restrict cloud model usage.
  • Government and defense entities necessitating air-gapped language model capabilities.

Number of participants


Price per participant

Upcoming Courses

Related Categories