<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Llm on Le Site de François</title><link>https://lesitedefrancois.be/en/tags/llm/</link><description>Recent content in Llm 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/llm/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>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>Fine-tuning / LoRA</title><link>https://lesitedefrancois.be/en/ai/fine-tuning-lora/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/fine-tuning-lora/</guid><description>&lt;p&gt;&lt;strong&gt;Fine-tuning&lt;/strong&gt; is &lt;strong&gt;training&lt;/strong&gt; continued from a pretrained &lt;strong&gt;LLM&lt;/strong&gt; (or other model) on a smaller, task-specific dataset so behavior matches a domain—support tone, internal jargon, classification format, or tool-use style—without pretraining from scratch. &lt;strong&gt;LoRA (Low-Rank Adaptation)&lt;/strong&gt; is a &lt;strong&gt;parameter-efficient&lt;/strong&gt; fine-tuning method: instead of updating all billions of weights, small low-rank matrices are inserted into attention (and sometimes MLP) layers and only those adapters are trained, drastically cutting VRAM and checkpoint size. The objective is better task accuracy or alignment at lower cost than full fine-tuning; adapters can be swapped per tenant while a frozen base model stays shared. Fine-tuning differs from &lt;strong&gt;RAG&lt;/strong&gt;, which injects external facts at inference time without changing weights.&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>MCP (Model Context Protocol)</title><link>https://lesitedefrancois.be/en/ai/mcp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lesitedefrancois.be/en/ai/mcp/</guid><description>&lt;p&gt;&lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt; is an open standard for how &lt;strong&gt;LLM applications&lt;/strong&gt; discover and invoke &lt;strong&gt;tools&lt;/strong&gt;, read structured &lt;strong&gt;resources&lt;/strong&gt;, and exchange &lt;strong&gt;prompts&lt;/strong&gt; with external systems through MCP &lt;strong&gt;servers&lt;/strong&gt; and &lt;strong&gt;clients&lt;/strong&gt;. The objective is interchangeable integrations: instead of every chat product implementing bespoke plugins for Git, databases, or ticketing, a tool provider ships an MCP server and any compatible client (IDE, assistant, agent runtime) can use it with consistent auth and capability negotiation. MCP complements HTTP &lt;strong&gt;inference&lt;/strong&gt; APIs—it sits at the orchestration layer where the model decides which tool to call, not inside &lt;strong&gt;vLLM&lt;/strong&gt;’s token loop. It is widely associated with &lt;strong&gt;agentic&lt;/strong&gt; workflows (multi-step plans, code execution, retrieval).&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>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>