Get in Touch
 Duration 14 hours

Course Outline

AI Sovereignty and Local LLM Deployment

  • Risks associated with cloud LLMs, including data retention, input training, and foreign jurisdiction.
  • Ollama architecture: encompassing the model server, registry, and OpenAI-compatible API.
  • Comparative analysis with vLLM, llama.cpp, and Text Generation Inference.
  • Licensing considerations for models such as Llama, Mistral, Qwen, and Gemma.

Installation and Hardware Configuration

  • Installing Ollama on Linux with support for CUDA and ROCm.
  • CPU-only fallback mechanisms and AVX/AVX2 optimization strategies.
  • Docker deployment procedures and persistent volume mapping.
  • Multi-GPU configuration and VRAM allocation techniques.

Model Management

  • Fetching models from the Ollama registry: e.g., ollama pull llama3.
  • Importing GGUF models from HuggingFace and TheBloke.
  • Quantization levels: evaluating tradeoffs between Q4_K_M, Q5_K_M, and Q8_0.
  • Model switching mechanics and concurrent model loading constraints.

Custom Modelfiles

  • Modelfile syntax structure: FROM, PARAMETER, SYSTEM, and TEMPLATE directives.
  • Adjusting temperature, top_p, and repeat_penalty parameters.
  • System prompt engineering 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 enabling JSON mode.
  • Integration with LangChain, LlamaIndex, and proprietary applications.
  • Implementing authentication and rate limiting via reverse proxies.

Performance Optimization

  • Context window sizing and KV cache management techniques.
  • Batch inference strategies and parallel request processing.
  • CPU thread allocation and NUMA awareness for efficiency.
  • Monitoring GPU utilization and memory pressure.

Security and Compliance

  • Network isolation protocols for model serving endpoints.
  • Implementing input filtering and output moderation pipelines.
  • Audit logging of all prompts and generated completions.
  • Ensuring model provenance and verifying hashes.

Requirements

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

Target Audience

  • AI engineers and developers seeking to migrate from cloud LLM APIs.
  • Organizations with data sensitivity restrictions 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