<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Inference on Le Site de François</title><link>https://lesitedefrancois.be/en/tags/inference/</link><description>Recent content in Inference on Le Site de François</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 François</copyright><atom:link href="https://lesitedefrancois.be/en/tags/inference/index.xml" rel="self" type="application/rss+xml"/><item><title>Context window</title><link>https://lesitedefrancois.be/en/ai/context-window/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/context-window/</guid><description>&lt;p&gt;The &lt;strong&gt;context window&lt;/strong&gt; is the maximum span of tokens—input prompt plus model-generated output—that an &lt;strong&gt;LLM&lt;/strong&gt; can process in a single forward pass chain without truncating or sliding attention. It is set by &lt;strong&gt;model architecture&lt;/strong&gt; (positional encoding limit, e.g. 8K, 128K, 1M+ in newer models) and by practical &lt;strong&gt;VRAM&lt;/strong&gt; on the serving &lt;strong&gt;GPU&lt;/strong&gt;, because the &lt;strong&gt;KV cache&lt;/strong&gt; scales with total sequence length. Its objective is to bound memory and compute: longer windows enable whole documents, multi-turn chat history, and large &lt;strong&gt;RAG&lt;/strong&gt; payloads in one shot, but cost more on every &lt;strong&gt;prefill&lt;/strong&gt; and &lt;strong&gt;decode&lt;/strong&gt; step. APIs expose this as &lt;code&gt;max_tokens&lt;/code&gt;, context limits, or model cards; exceeding it yields errors or silent truncation.&lt;/p&gt;</description></item><item><title>cuDNN (CUDA Deep Neural Network library)</title><link>https://lesitedefrancois.be/en/ai/cudnn/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/cudnn/</guid><description>&lt;p&gt;&lt;strong&gt;cuDNN (CUDA Deep Neural Network library)&lt;/strong&gt; is NVIDIA’s library of highly optimized &lt;strong&gt;GPU kernels&lt;/strong&gt; for operations that dominate deep learning: convolutions, matrix multiplies used in attention, pooling, normalization (batch/layer), activations, and recurrent cells. Its objective is to deliver near-peak performance on &lt;strong&gt;CUDA&lt;/strong&gt;-capable GPUs without every framework author hand-writing assembly-tuned kernels. &lt;strong&gt;PyTorch&lt;/strong&gt;, TensorFlow, and many &lt;strong&gt;inference&lt;/strong&gt; engines call cuDNN (directly or via cuBLAS) under the hood for training and serving. cuDNN sits between raw &lt;strong&gt;CUDA&lt;/strong&gt; and application code; version alignment with the CUDA toolkit and driver is mandatory for supported deployments.&lt;/p&gt;</description></item><item><title>Decode</title><link>https://lesitedefrancois.be/en/ai/decode/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/decode/</guid><description>&lt;p&gt;&lt;strong&gt;Decode&lt;/strong&gt; is the second stage of &lt;strong&gt;LLM inference&lt;/strong&gt;: after &lt;strong&gt;prefill&lt;/strong&gt; has stored keys and values for the prompt, the model generates &lt;strong&gt;one new token per forward pass&lt;/strong&gt;, appends it to the sequence, extends the &lt;strong&gt;KV cache&lt;/strong&gt;, and repeats until a stop condition (EOS token, max length, or API limit). Its objective is fluent continuation—answer text, code, or tool-call JSON—at acceptable &lt;strong&gt;inter-token latency&lt;/strong&gt; and cluster &lt;strong&gt;throughput&lt;/strong&gt; (tokens per second across many concurrent sessions). Decode drives the “typing” experience in chat UIs; prefill drives how long users wait before the first character appears.&lt;/p&gt;</description></item><item><title>Guardrails</title><link>https://lesitedefrancois.be/en/ai/guardrails/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/guardrails/</guid><description>&lt;p&gt;&lt;strong&gt;Guardrails&lt;/strong&gt; are controls wrapped around &lt;strong&gt;LLM inference&lt;/strong&gt; to reduce harmful, non-compliant, or off-policy behavior without replacing the base model. Their objective is &lt;strong&gt;AI safety and governance&lt;/strong&gt; in production: block or rewrite prompts that attempt &lt;strong&gt;prompt injection&lt;/strong&gt; or jailbreaks, filter toxic or leaked &lt;strong&gt;PII&lt;/strong&gt; in outputs, enforce topic allowlists, validate structured tool calls, and log decisions for audit. Guardrails sit on the &lt;strong&gt;request path&lt;/strong&gt; (before tokens reach the model or after the model proposes a draft response), combining rule engines, classifiers, regex, and sometimes smaller models. They complement—not replace—application auth, network policy, and human review; enterprises treat them as mandatory for customer-facing and internal copilots.&lt;/p&gt;</description></item><item><title>Inference</title><link>https://lesitedefrancois.be/en/ai/inference/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/inference/</guid><description>&lt;p&gt;&lt;strong&gt;Inference&lt;/strong&gt; is the operational phase of machine learning where a &lt;strong&gt;trained model&lt;/strong&gt; is applied to new inputs to produce outputs: next tokens in an LLM, bounding boxes in vision, embeddings for search, or scores in tabular models. Its objective is reliable &lt;strong&gt;serving&lt;/strong&gt; at scale—honoring latency targets (time to first token, p99 completion time), throughput (requests or tokens per second), availability, and cost per query—rather than improving weights. In generative AI, inference splits into &lt;strong&gt;prefill&lt;/strong&gt; (processing the prompt in one or few forward passes) and &lt;strong&gt;decode&lt;/strong&gt; (autoregressive generation of each output token), each with different bottlenecks. Production inference adds API gateways, auth, rate limiting, observability, model versioning, A/B tests, and guardrails; the model file is read-mostly while &lt;strong&gt;KV cache&lt;/strong&gt; and batch state are ephemeral per session.&lt;/p&gt;</description></item><item><title>KV cache (Key-Value Cache)</title><link>https://lesitedefrancois.be/en/ai/kv-cache/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/kv-cache/</guid><description>&lt;p&gt;The &lt;strong&gt;KV cache (key-value cache)&lt;/strong&gt; is the stored result of the &lt;strong&gt;attention&lt;/strong&gt; layers for tokens already processed in a sequence. During &lt;strong&gt;autoregressive decode&lt;/strong&gt;, each new token only needs a forward pass that depends on prior context; recomputing keys and values for all earlier tokens every step would be wasteful. The cache therefore holds, per layer and per sequence, the &lt;strong&gt;K&lt;/strong&gt; and &lt;strong&gt;V&lt;/strong&gt; tensors produced when those tokens were first seen (during &lt;strong&gt;prefill&lt;/strong&gt; for the prompt, then extended one token at a time during decode). The objective is lower &lt;strong&gt;time per output token&lt;/strong&gt; and lower FLOPs; the cost is &lt;strong&gt;GPU memory&lt;/strong&gt;: cache size grows with batch × layers × heads × sequence_length × head_dim, and is often the limit on concurrent sessions or context length before model weights fill VRAM.&lt;/p&gt;</description></item><item><title>LLM (Large Language Model)</title><link>https://lesitedefrancois.be/en/ai/llm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/llm/</guid><description>&lt;p&gt;An &lt;strong&gt;LLM (large language model)&lt;/strong&gt; is a deep neural network—almost always a &lt;strong&gt;Transformer&lt;/strong&gt;—trained on large amounts of text (and sometimes multimodal data) to model the probability of the next token given prior context. Its objective at &lt;strong&gt;training&lt;/strong&gt; time is to minimize prediction error over billions of tokens, producing weights that encode grammar, facts (with limitations), reasoning patterns, and task-following behavior after alignment or instruction tuning. At &lt;strong&gt;inference&lt;/strong&gt; time the same model &lt;strong&gt;generates&lt;/strong&gt; completions, answers questions, summarizes documents, or drives agents; production systems expose it through APIs (often OpenAI-compatible) backed by engines such as &lt;strong&gt;vLLM&lt;/strong&gt; or &lt;strong&gt;NIM&lt;/strong&gt;. LLMs power chatbots, code assistants, RAG pipelines, and enterprise copilots.&lt;/p&gt;</description></item><item><title>llm-d</title><link>https://lesitedefrancois.be/en/ai/llm-d/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/llm-d/</guid><description>&lt;p&gt;&lt;strong&gt;llm-d&lt;/strong&gt; is an open-source &lt;strong&gt;distributed inference serving stack&lt;/strong&gt; for production LLM workloads on &lt;strong&gt;Kubernetes&lt;/strong&gt;. Its objective is not to replace model servers such as &lt;strong&gt;vLLM&lt;/strong&gt; or SGLang but to sit above them and fix cluster-scale problems: which replica should receive the next request, how to split &lt;strong&gt;prefill&lt;/strong&gt; (compute-heavy) from &lt;strong&gt;decode&lt;/strong&gt; (memory-bandwidth-heavy), how to share or tier &lt;strong&gt;KV cache&lt;/strong&gt; state, and how to scale MoE models with wide expert parallelism. llm-d publishes “well-lit path” guides—benchmarked Helm recipes and architectures—so teams reach strong time-to-first-token and throughput without hand-rolling schedulers. The project is a &lt;strong&gt;CNCF sandbox&lt;/strong&gt; effort with contributors including &lt;strong&gt;Red Hat&lt;/strong&gt;, IBM, Google, and cloud partners.&lt;/p&gt;</description></item><item><title>MIG (Multi-Instance GPU)</title><link>https://lesitedefrancois.be/en/ai/mig/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/mig/</guid><description>&lt;p&gt;&lt;strong&gt;MIG (Multi-Instance GPU)&lt;/strong&gt; is an NVIDIA &lt;strong&gt;GPU&lt;/strong&gt; partitioning mode on datacenter accelerators (e.g. &lt;strong&gt;A100&lt;/strong&gt;, &lt;strong&gt;H100&lt;/strong&gt;) that splits one physical card into up to seven &lt;strong&gt;GPU instances (GIs)&lt;/strong&gt;, each with isolated &lt;strong&gt;streaming multiprocessors&lt;/strong&gt;, memory bandwidth, and &lt;strong&gt;HBM&lt;/strong&gt; capacity. The objective is &lt;strong&gt;higher utilization&lt;/strong&gt; in multi-tenant environments: several smaller models or dev/test workloads share one expensive GPU without time-slicing contention as severe as full-card sharing. Each MIG instance appears to the OS and &lt;strong&gt;CUDA&lt;/strong&gt; as a separate GPU with fixed resources; workloads cannot oversubscribe another instance’s memory. MIG suits &lt;strong&gt;inference&lt;/strong&gt; and modest training more often than massive single-job training that needs the entire GPU and &lt;strong&gt;NVLink&lt;/strong&gt; domain.&lt;/p&gt;</description></item><item><title>NIM (NVIDIA Inference Microservices)</title><link>https://lesitedefrancois.be/en/ai/nim/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/nim/</guid><description>&lt;p&gt;&lt;strong&gt;NIM (NVIDIA Inference Microservices)&lt;/strong&gt; are &lt;strong&gt;container images&lt;/strong&gt; and Helm charts that deliver ready-to-run &lt;strong&gt;inference endpoints&lt;/strong&gt; for specific models (LLMs, vision, embedding, reranking, and more). The objective is to shrink time-to-production: instead of assembling CUDA drivers, frameworks, model weights, and an OpenAI-compatible server yourself, operators pull a NIM that bundles a performance-tuned engine (often &lt;strong&gt;TensorRT-LLM&lt;/strong&gt; or Triton-backed paths), default model artifacts or download hooks, health checks, and a stable HTTP/gRPC API. NIMs are sized for &lt;strong&gt;GPU&lt;/strong&gt; deployment and target enterprise MLOps teams that want versioned, scannable containers with predictable resource requests rather than bespoke notebooks turned into scripts.&lt;/p&gt;</description></item><item><title>Prefill</title><link>https://lesitedefrancois.be/en/ai/prefill/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/prefill/</guid><description>&lt;p&gt;&lt;strong&gt;Prefill&lt;/strong&gt; is the first stage of &lt;strong&gt;LLM inference&lt;/strong&gt; after a user (or &lt;strong&gt;RAG&lt;/strong&gt; pipeline) submits a prompt: the model runs a forward pass over &lt;strong&gt;all input tokens at once&lt;/strong&gt; (or in chunked blocks for very long contexts) to compute hidden states and populate the &lt;strong&gt;KV cache&lt;/strong&gt; for every layer. Its objective is to prepare context the model will attend to during generation; the user-visible metric is often &lt;strong&gt;time to first token (TTFT)&lt;/strong&gt;, which is dominated by prefill for long prompts. Prefill is &lt;strong&gt;compute-intensive&lt;/strong&gt; (large matrix multiplies across the full sequence) compared with &lt;strong&gt;decode&lt;/strong&gt;, which adds one token at a time. In chat, each new user message typically triggers a new prefill over the accumulated conversation (unless caching optimizations apply).&lt;/p&gt;</description></item><item><title>Quantization</title><link>https://lesitedefrancois.be/en/ai/quantization/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/quantization/</guid><description>&lt;p&gt;&lt;strong&gt;Quantization&lt;/strong&gt; is the process of representing a model’s &lt;strong&gt;weights&lt;/strong&gt; and/or &lt;strong&gt;activations&lt;/strong&gt; with fewer bits than full &lt;strong&gt;FP32&lt;/strong&gt; training precision—commonly &lt;strong&gt;FP16&lt;/strong&gt;, &lt;strong&gt;BF16&lt;/strong&gt;, &lt;strong&gt;FP8&lt;/strong&gt;, &lt;strong&gt;INT8&lt;/strong&gt;, or &lt;strong&gt;INT4&lt;/strong&gt; (GPTQ, AWQ, GGUF-style formats). The objective is lower &lt;strong&gt;GPU memory&lt;/strong&gt; (larger models or more concurrent sessions per card), higher &lt;strong&gt;throughput&lt;/strong&gt;, and sometimes faster kernels on hardware with native low-precision units, at the cost of possible quality degradation if pushed too aggressively. Quantization can be applied &lt;strong&gt;post-training&lt;/strong&gt; (calibration on a sample dataset) or during &lt;strong&gt;training&lt;/strong&gt; (quantization-aware training). For &lt;strong&gt;inference&lt;/strong&gt;, serving engines &lt;strong&gt;vLLM&lt;/strong&gt; and &lt;strong&gt;NIM&lt;/strong&gt; load quantized checkpoints and dispatch to vendor libraries (TensorRT-LLM, CUTLASS, etc.) that implement fused low-precision matmuls.&lt;/p&gt;</description></item><item><title>RAG (Retrieval-Augmented Generation)</title><link>https://lesitedefrancois.be/en/ai/rag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/rag/</guid><description>&lt;p&gt;&lt;strong&gt;RAG (retrieval-augmented generation)&lt;/strong&gt; is an architecture pattern, not a single product: before the &lt;strong&gt;LLM&lt;/strong&gt; generates an answer, a &lt;strong&gt;retriever&lt;/strong&gt; finds relevant chunks from a knowledge base (wikis, tickets, PDFs, databases) and injects them into the prompt as context. The objective is &lt;strong&gt;grounded&lt;/strong&gt; responses—fewer hallucinations on company facts, answers that reflect documents updated yesterday, and traceability to sources—without running full &lt;strong&gt;fine-tuning&lt;/strong&gt; every time content changes. A typical pipeline embeds queries and documents with an &lt;strong&gt;embedding model&lt;/strong&gt;, stores vectors in a search index, retrieves top-k passages, optionally &lt;strong&gt;reranks&lt;/strong&gt; them, then calls the LLM with a system prompt plus retrieved text. RAG is the dominant enterprise pattern for private AI assistants and support bots.&lt;/p&gt;</description></item><item><title>ROCm (Radeon Open Compute)</title><link>https://lesitedefrancois.be/en/ai/rocm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/rocm/</guid><description>&lt;p&gt;&lt;strong&gt;ROCm (Radeon Open Compute)&lt;/strong&gt; is AMD’s software stack for &lt;strong&gt;GPU compute&lt;/strong&gt; on datacenter &lt;strong&gt;Instinct&lt;/strong&gt; accelerators (and select consumer GPUs in community setups). Its objective mirrors &lt;strong&gt;CUDA&lt;/strong&gt; for NVIDIA: provide kernel compilers (&lt;strong&gt;HIP&lt;/strong&gt;), math libraries (rocBLAS, rocFFT), collective communication (&lt;strong&gt;RCCL&lt;/strong&gt;, analogous to &lt;strong&gt;NCCL&lt;/strong&gt;), and framework integrations so &lt;strong&gt;PyTorch&lt;/strong&gt; and inference runtimes can execute training and &lt;strong&gt;inference&lt;/strong&gt; on AMD hardware. ROCm is positioned as an open platform (Linux-first) for customers who want accelerator choice or who standardize on AMD in HPC and AI clusters.&lt;/p&gt;</description></item><item><title>TensorRT</title><link>https://lesitedefrancois.be/en/ai/tensorrt/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/tensorrt/</guid><description>&lt;p&gt;&lt;strong&gt;TensorRT&lt;/strong&gt; is NVIDIA’s SDK for &lt;strong&gt;optimizing and deploying&lt;/strong&gt; trained neural networks for &lt;strong&gt;inference&lt;/strong&gt; on NVIDIA &lt;strong&gt;GPUs&lt;/strong&gt;. Its objective is minimum latency and maximum throughput: it ingests a model (ONNX, TensorFlow, PyTorch export, or framework-specific parsers), applies graph optimizations (layer fusion, constant folding, kernel autotuning), selects precisions (&lt;strong&gt;FP32&lt;/strong&gt;, &lt;strong&gt;FP16&lt;/strong&gt;, &lt;strong&gt;INT8&lt;/strong&gt;, &lt;strong&gt;FP8&lt;/strong&gt;), and produces a &lt;strong&gt;serialized engine&lt;/strong&gt; executed by a lightweight runtime. For LLMs, &lt;strong&gt;TensorRT-LLM&lt;/strong&gt; extends this with attention-specific fusions, inflight batching, and multi-GPU serving patterns; many &lt;strong&gt;NIM&lt;/strong&gt; microservices bundle TensorRT-LLM–optimized engines rather than raw PyTorch loops.&lt;/p&gt;</description></item><item><title>vLLM</title><link>https://lesitedefrancois.be/en/ai/vllm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/vllm/</guid><description>&lt;p&gt;&lt;strong&gt;vLLM&lt;/strong&gt; is an open-source library and serving stack for &lt;strong&gt;large language model (LLM) inference&lt;/strong&gt;. Its objective is to turn a trained model into a production service that sustains many concurrent users with low latency and high &lt;strong&gt;tokens per second&lt;/strong&gt; per GPU. vLLM targets the inference phase (prefill + decode), not training: it loads weights onto accelerators, batches incoming prompts, schedules decode steps, and streams completions back to clients over HTTP/gRPC (often via an OpenAI-compatible API). It has become a de facto engine behind many private and cloud AI gateways because it ships integrations for Hugging Face models, LoRA adapters, tensor parallelism, pipeline parallelism, speculative decoding, and quantization (GPTQ, AWQ, FP8).&lt;/p&gt;</description></item></channel></rss>