<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>AI Tools</title>
    <link>https://ait.bsc.es/</link>
    <description>Recent content on AI Tools</description>
    <generator>Hugo</generator>
    <language>en</language>
    <atom:link href="https://ait.bsc.es/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Choosing the right model</title>
      <link>https://ait.bsc.es/handbook/planning-your-deployment/choosing-the-right-model/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/planning-your-deployment/choosing-the-right-model/</guid>
      <description>&lt;p&gt;The largest model that fits is rarely the right choice. Model selection sets the floor&#xA;for your serving cost and the ceiling for your output quality at the same time, and the&#xA;two pull in opposite directions.&lt;/p&gt;&#xA;&lt;p&gt;This page frames the decision as an evaluation problem tied to your own task, not a&#xA;leaderboard comparison.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which model properties actually affect serving cost.&lt;/li&gt;&#xA;&lt;li&gt;How to evaluate candidates against your own task rather than a public benchmark.&lt;/li&gt;&#xA;&lt;li&gt;How licensing and provenance constrain deployment options.&lt;/li&gt;&#xA;&lt;li&gt;When a smaller specialised model beats a larger general one.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Conversational Support Agent</title>
      <link>https://ait.bsc.es/blueprints/conversational-support-agent/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/blueprints/conversational-support-agent/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;A tool-using support agent that answers questions against your own documentation and escalates when it cannot.&lt;/p&gt;&#xA;&lt;p&gt;This page shows the structure a blueprint detail page uses. The problem statement and component list below are real design context; the deployment and usage sections are placeholders.&lt;/p&gt;&#xA;&lt;h2 id=&#34;problem-addressed&#34;&gt;Problem addressed&lt;/h2&gt;&#xA;&lt;p&gt;Support teams answer the same documented questions repeatedly, while the genuinely novel cases — the ones that need a human — wait behind them in the same queue.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introduction</title>
      <link>https://ait.bsc.es/handbook/introduction/introduction/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/introduction/introduction/</guid>
      <description>&lt;p&gt;Serving a large language model in production is a different discipline from training&#xA;one. The model is fixed, the traffic is not, and the work shifts to latency budgets,&#xA;memory limits, batching behaviour and the operational question of keeping expensive&#xA;accelerators busy without breaking service-level objectives.&lt;/p&gt;&#xA;&lt;p&gt;This handbook collects what the AI Tools team has learned doing that work. It is&#xA;organised as a path: foundations first, then planning a deployment, preparing a model,&#xA;interacting with it, optimizing throughput and latency, and finally the infrastructure&#xA;and operations that keep a service running.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kernel optimization for LLM inference</title>
      <link>https://ait.bsc.es/handbook/kernel-optimization/kernel-optimization-for-llm-inference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/kernel-optimization/kernel-optimization-for-llm-inference/</guid>
      <description>&lt;p&gt;Kernel optimization is the lowest layer at which inference performance can be improved,&#xA;and the one with the worst effort-to-reward ratio if applied before the layers above it&#xA;have been addressed.&lt;/p&gt;&#xA;&lt;p&gt;This page frames when to descend to this level, and what the work actually consists of.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What a kernel is and why kernel efficiency bounds performance.&lt;/li&gt;&#xA;&lt;li&gt;How to establish that kernels, rather than scheduling or batching, are the bottleneck.&lt;/li&gt;&#xA;&lt;li&gt;Which inference operations are most often worth optimizing.&lt;/li&gt;&#xA;&lt;li&gt;When to write a kernel versus adopting an existing one.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LLM fine-tuning</title>
      <link>https://ait.bsc.es/handbook/model-preparation/llm-fine-tuning/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-preparation/llm-fine-tuning/</guid>
      <description>&lt;p&gt;Fine-tuning adapts a pretrained model to a narrower task or style. It is frequently&#xA;reached for when prompt engineering or retrieval would have solved the problem more&#xA;cheaply, and it carries serving consequences that are easy to overlook.&lt;/p&gt;&#xA;&lt;p&gt;This page covers when fine-tuning earns its cost and what it changes downstream.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When fine-tuning is the appropriate tool and when it is not.&lt;/li&gt;&#xA;&lt;li&gt;How full fine-tuning and parameter-efficient methods differ operationally.&lt;/li&gt;&#xA;&lt;li&gt;What serving a fine-tuned or adapter-based model requires.&lt;/li&gt;&#xA;&lt;li&gt;How to evaluate whether a fine-tune actually improved your task.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LLM performance benchmarks</title>
      <link>https://ait.bsc.es/handbook/inference-optimization/llm-performance-benchmarks/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/inference-optimization/llm-performance-benchmarks/</guid>
      <description>&lt;p&gt;Most published inference numbers are not reproducible in your environment, because they&#xA;encode a traffic pattern, a hardware configuration and a measurement methodology that&#xA;are not yours.&lt;/p&gt;&#xA;&lt;p&gt;This page covers how to benchmark your own deployment in a way that supports capacity&#xA;and configuration decisions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which workload parameters must be specified for a benchmark to mean anything.&lt;/li&gt;&#xA;&lt;li&gt;How to model a realistic request arrival pattern.&lt;/li&gt;&#xA;&lt;li&gt;Why steady-state and cold-start measurements differ.&lt;/li&gt;&#xA;&lt;li&gt;How to report results so others can reproduce them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mode 1 — Manual endpoint</title>
      <link>https://ait.bsc.es/llm-inference/modes/manual-endpoint/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/modes/manual-endpoint/</guid>
      <description>&lt;p&gt;This mode splits the work in two. First you start the endpoint — it stays alive in Slurm. Then&#xA;you send as many batches as you like. When you are done, you stop it.&lt;/p&gt;&#xA;&lt;p&gt;Use it when you have &lt;strong&gt;several batches&lt;/strong&gt; to run against the same model: the model is loaded&#xA;once and reused, instead of paying the load cost on every job.&lt;/p&gt;&#xA;&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The module loaded — see &lt;a href=&#34;https://ait.bsc.es/llm-inference/quickstart/&#34;&gt;Quickstart&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;A model ID with &lt;code&gt;SUPPORTED=yes&lt;/code&gt; in &lt;code&gt;llm-inference model list&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;An input file on a shared filesystem (&lt;code&gt;/gpfs&lt;/code&gt; or &lt;code&gt;$SCRATCH&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;step-1--start-the-endpoint&#34;&gt;Step 1 — Start the endpoint&lt;/h2&gt;&#xA;&lt;figure class=&#34;code-example&#34;&gt;&lt;figcaption class=&#34;code-example__title&#34;&gt;endpoint start&lt;/figcaption&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llm-inference endpoint start &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --model mistralai/Mistral-7B-Instruct-v0.3 &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --gpus &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --outdir /scratch/&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;/run-001 &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm &lt;span class=&#34;nv&#34;&gt;account&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;my_project &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm &lt;span class=&#34;nv&#34;&gt;qos&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;accelerated &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm &lt;span class=&#34;nv&#34;&gt;partition&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;acc &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm &lt;span class=&#34;nv&#34;&gt;time&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;02:00:00 &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm cpus-per-task&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;80&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;The command prints JSON with the Slurm &lt;code&gt;job_id&lt;/code&gt;, the auto-assigned &lt;code&gt;port&lt;/code&gt; and the model. It&#xA;also writes these files into &lt;code&gt;--outdir&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenAI-compatible API</title>
      <link>https://ait.bsc.es/handbook/model-interaction/openai-compatible-api/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-interaction/openai-compatible-api/</guid>
      <description>&lt;p&gt;A large share of inference servers and client libraries speak an OpenAI-compatible HTTP&#xA;API. Treating it as a portability layer is usually right, but compatibility is a&#xA;spectrum rather than a guarantee.&lt;/p&gt;&#xA;&lt;p&gt;This page describes the surface conceptually. For the endpoints exposed by this team&amp;rsquo;s&#xA;service, see the LLM Inference module User Guide.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which endpoints make up the commonly implemented core of the API.&lt;/li&gt;&#xA;&lt;li&gt;How chat completions differ from the older text completion shape.&lt;/li&gt;&#xA;&lt;li&gt;How streaming responses are delivered and consumed.&lt;/li&gt;&#xA;&lt;li&gt;Where compatible implementations tend to diverge in practice.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Overview</title>
      <link>https://ait.bsc.es/llm-inference/overview/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/overview/</guid>
      <description>&lt;p&gt;&lt;code&gt;llm-inference&lt;/code&gt; is a command-line tool that runs large language models on the MareNostrum 5&#xA;HPC system. It sits between you and the two things that normally make this awkward — Slurm&#xA;and vLLM — and handles both.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-the-tool-does-for-you&#34;&gt;What the tool does for you&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Reserves GPUs and nodes in Slurm&lt;/strong&gt; with the right parameters.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Starts the vLLM engine&lt;/strong&gt; inside a Singularity container.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Waits until the model is ready&lt;/strong&gt; — it polls &lt;code&gt;/health&lt;/code&gt; for you.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Returns your results&lt;/strong&gt;, or gives you an HTTP URL you can use with &lt;code&gt;curl&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The goal is simple: you say which model you want, how many GPUs you need, and how you want to&#xA;work. The tool does the rest.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What is LLM inference infrastructure?</title>
      <link>https://ait.bsc.es/handbook/infrastructure-and-operations/what-is-llm-inference-infrastructure/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/infrastructure-and-operations/what-is-llm-inference-infrastructure/</guid>
      <description>&lt;p&gt;A model server on its own is not a service. Between a client and a set of accelerators&#xA;sit gateways, routers, model storage, autoscaling, observability and the control plane&#xA;that manages them.&lt;/p&gt;&#xA;&lt;p&gt;This page maps those components and their responsibilities.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which components make up an inference platform.&lt;/li&gt;&#xA;&lt;li&gt;How a request travels through the stack.&lt;/li&gt;&#xA;&lt;li&gt;Where model artifacts are stored and how they reach a replica.&lt;/li&gt;&#xA;&lt;li&gt;Which responsibilities belong to the control plane versus the data plane.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What is LLM inference?</title>
      <link>https://ait.bsc.es/handbook/foundations/what-is-llm-inference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/foundations/what-is-llm-inference/</guid>
      <description>&lt;p&gt;Inference is the process of using a trained model to produce output for new input. For&#xA;large language models this happens in two distinct phases with very different&#xA;performance characteristics, and almost every serving trade-off in this handbook follows&#xA;from that asymmetry.&lt;/p&gt;&#xA;&lt;p&gt;This page establishes the vocabulary used throughout: prefill, decode, tokens, context,&#xA;and the KV cache.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What happens between a request arriving and tokens being returned.&lt;/li&gt;&#xA;&lt;li&gt;Why prefill is compute-bound and decode is memory-bandwidth-bound.&lt;/li&gt;&#xA;&lt;li&gt;What the KV cache is and why it dominates memory planning.&lt;/li&gt;&#xA;&lt;li&gt;The vocabulary reused across the rest of the handbook.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installation</title>
      <link>https://ait.bsc.es/llm-inference/installation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/installation/</guid>
      <description>&lt;p&gt;&lt;code&gt;llm-inference&lt;/code&gt; is already installed on MareNostrum 5. You do not build or install anything —&#xA;you load it as a module.&lt;/p&gt;&#xA;&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A &lt;strong&gt;MareNostrum 5 account&lt;/strong&gt; with access to the GPU partition (&lt;code&gt;acc&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;A valid &lt;strong&gt;Slurm billing account&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;load-the-module&#34;&gt;Load the module&lt;/h2&gt;&#xA;&lt;figure class=&#34;code-example&#34;&gt;&lt;figcaption class=&#34;code-example__title&#34;&gt;Load llm-inference&lt;/figcaption&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;module load EB/apps&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;module use /apps/ACC/LLM-INFERENCE/modulefiles&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;module load llm-inference/0.0.1-GCCcore-13.2.0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h2 id=&#34;verify&#34;&gt;Verify&lt;/h2&gt;&#xA;&lt;figure class=&#34;code-example&#34;&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llm-inference --version&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llm-inference --help&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;If &lt;code&gt;llm-inference&lt;/code&gt; is not found, the &lt;code&gt;module use&lt;/code&gt; line did not take effect — check the path and&#xA;re-run the three commands in order.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Anthropic-compatible API</title>
      <link>https://ait.bsc.es/handbook/model-interaction/anthropic-compatible-api/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-interaction/anthropic-compatible-api/</guid>
      <description>&lt;p&gt;Some inference servers expose an Anthropic-compatible Messages API alongside or instead&#xA;of an OpenAI-compatible one. The two express similar capabilities with different request&#xA;structures, and the differences matter when writing portable clients.&lt;/p&gt;&#xA;&lt;p&gt;This page covers the shape conceptually; the service-specific details are in the &lt;code&gt;llm- inference&lt;/code&gt; user guide.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The structure of a Messages API request and response.&lt;/li&gt;&#xA;&lt;li&gt;How system prompts and message roles are represented.&lt;/li&gt;&#xA;&lt;li&gt;How tool use is expressed compared with the OpenAI-compatible surface.&lt;/li&gt;&#xA;&lt;li&gt;What to account for when supporting both APIs from one client.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Choosing the right GPU number</title>
      <link>https://ait.bsc.es/handbook/planning-your-deployment/choosing-the-right-gpu-number/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/planning-your-deployment/choosing-the-right-gpu-number/</guid>
      <description>&lt;p&gt;Accelerator count is driven by two independent requirements: fitting the model and its&#xA;KV cache in memory at all, and serving the expected concurrent load within your latency&#xA;targets. Either can dominate.&lt;/p&gt;&#xA;&lt;p&gt;This page separates the two questions so they can be sized independently and then&#xA;reconciled.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How to separate the memory requirement from the throughput requirement.&lt;/li&gt;&#xA;&lt;li&gt;When to add accelerators to one replica versus adding replicas.&lt;/li&gt;&#xA;&lt;li&gt;How concurrency targets translate into hardware count.&lt;/li&gt;&#xA;&lt;li&gt;What headroom to leave for traffic variation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Document Triage Pipeline</title>
      <link>https://ait.bsc.es/blueprints/document-triage-pipeline/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/blueprints/document-triage-pipeline/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;An offline batch pipeline that classifies and routes large document sets without an interactive latency budget.&lt;/p&gt;&#xA;&lt;p&gt;This page shows the structure a blueprint detail page uses. The problem statement and component list below are real design context; the deployment and usage sections are placeholders.&lt;/p&gt;&#xA;&lt;h2 id=&#34;problem-addressed&#34;&gt;Problem addressed&lt;/h2&gt;&#xA;&lt;p&gt;Bulk document classification is throughput work, but it is often built on interactive serving infrastructure, which wastes most of the available accelerator capacity.&lt;/p&gt;</description>
    </item>
    <item>
      <title>GPU architecture fundamentals</title>
      <link>https://ait.bsc.es/handbook/kernel-optimization/gpu-architecture-fundamentals/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/kernel-optimization/gpu-architecture-fundamentals/</guid>
      <description>&lt;p&gt;Reasoning about kernel performance requires an accurate model of the hardware: how work&#xA;is scheduled onto execution units, and how the memory hierarchy behaves under different&#xA;access patterns.&lt;/p&gt;&#xA;&lt;p&gt;This page covers the architectural fundamentals that inference performance depends on.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How GPU work is organised into threads, warps and blocks.&lt;/li&gt;&#xA;&lt;li&gt;The memory hierarchy and the cost of each level.&lt;/li&gt;&#xA;&lt;li&gt;Why coalesced memory access matters so much.&lt;/li&gt;&#xA;&lt;li&gt;How to reason about occupancy and arithmetic intensity.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LLM quantization</title>
      <link>https://ait.bsc.es/handbook/model-preparation/llm-quantization/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-preparation/llm-quantization/</guid>
      <description>&lt;p&gt;Quantization stores and computes with lower-precision numbers, reducing memory footprint&#xA;and often increasing throughput. The saving is real and frequently large; the accuracy&#xA;cost is real too, and workload-dependent.&lt;/p&gt;&#xA;&lt;p&gt;This page explains the main approaches and how to decide whether a given quantization is&#xA;acceptable for your task.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What quantization changes in the memory budget and the compute path.&lt;/li&gt;&#xA;&lt;li&gt;How post-training quantization differs from quantization-aware training.&lt;/li&gt;&#xA;&lt;li&gt;Which parts of a model are most sensitive to reduced precision.&lt;/li&gt;&#xA;&lt;li&gt;How to measure quality loss on your own task rather than trusting a general claim.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mode 2 — One-shot inference</title>
      <link>https://ait.bsc.es/llm-inference/modes/one-shot-inference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/modes/one-shot-inference/</guid>
      <description>&lt;p&gt;This mode does everything inside a &lt;strong&gt;single Slurm job&lt;/strong&gt;: it starts vLLM, waits until it is&#xA;ready, sends every request from your input file, writes the output, and shuts vLLM down. You&#xA;run one command.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-to-use-it&#34;&gt;When to use it&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You already have an input file ready.&lt;/li&gt;&#xA;&lt;li&gt;You want to process everything in one go and forget about it.&lt;/li&gt;&#xA;&lt;li&gt;You do not need the endpoint to stay alive afterwards.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;command&#34;&gt;Command&lt;/h2&gt;&#xA;&lt;figure class=&#34;code-example&#34;&gt;&lt;figcaption class=&#34;code-example__title&#34;&gt;bash inference&lt;/figcaption&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llm-inference bash inference &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --model mistralai/Mistral-7B-Instruct-v0.3 &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --in  /scratch/&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;/requests.json &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --out /scratch/&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;/results.jsonl &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --outdir /scratch/&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;/run-bash &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --gpus &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm &lt;span class=&#34;nv&#34;&gt;account&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;my_project &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm &lt;span class=&#34;nv&#34;&gt;qos&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;accelerated &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm &lt;span class=&#34;nv&#34;&gt;partition&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;acc &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm &lt;span class=&#34;nv&#34;&gt;time&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;01:00:00 &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;  --slurm cpus-per-task&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;80&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;By default the command &lt;strong&gt;blocks&lt;/strong&gt; until the Slurm job ends. To get the shell back immediately&#xA;and check on the job later, add &lt;code&gt;--no-wait&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Quickstart</title>
      <link>https://ait.bsc.es/llm-inference/quickstart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/quickstart/</guid>
      <description>&lt;p&gt;From zero to a first result. Everything here runs on a MareNostrum 5 login node.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-need&#34;&gt;What you need&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A &lt;strong&gt;MareNostrum 5 account&lt;/strong&gt; with access to the GPU partition (&lt;code&gt;acc&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;A valid &lt;strong&gt;Slurm billing account&lt;/strong&gt; — this is the &lt;code&gt;account&lt;/code&gt; parameter below.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;step-1--load-the-module&#34;&gt;Step 1 — Load the module&lt;/h2&gt;&#xA;&lt;p&gt;The recommended way to use the tool on MareNostrum 5 is as a module:&lt;/p&gt;&#xA;&lt;figure class=&#34;code-example&#34;&gt;&lt;figcaption class=&#34;code-example__title&#34;&gt;Load the module&lt;/figcaption&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;module load EB/apps&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;module use /apps/ACC/LLM-INFERENCE/modulefiles&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;module load llm-inference/0.0.1-GCCcore-13.2.0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Check that it is available&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llm-inference --version&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;div class=&#34;callout callout--tip&#34; role=&#34;note&#34;&gt;&#xA;  &lt;p class=&#34;callout__title&#34;&gt;&#xA;    &lt;span class=&#34;callout__icon&#34; aria-hidden=&#34;true&#34;&gt;&lt;svg viewBox=&#34;0 0 24 24&#34; width=&#34;16&#34; height=&#34;16&#34; fill=&#34;none&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34;&gt;&lt;path d=&#34;M9 18h6M10 22h4&#34;&gt;&lt;/path&gt;&lt;path d=&#34;M12 2a6 6 0 0 0-3 11v3h6v-3a6 6 0 0 0-3-11z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&#xA;    Avoid typing this every session&#xA;  &lt;/p&gt;</description>
    </item>
    <item>
      <title>Static, dynamic and continuous batching</title>
      <link>https://ait.bsc.es/handbook/inference-optimization/batching/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/inference-optimization/batching/</guid>
      <description>&lt;p&gt;Batching amortises the cost of moving weights through the accelerator across multiple&#xA;requests. How requests are grouped determines both achievable throughput and the latency&#xA;individual requests experience.&lt;/p&gt;&#xA;&lt;p&gt;This page compares the three main strategies and explains the shift toward continuous&#xA;batching.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why batching improves accelerator utilization at all.&lt;/li&gt;&#xA;&lt;li&gt;How static, dynamic and continuous batching differ.&lt;/li&gt;&#xA;&lt;li&gt;Why variable-length generation penalises static batching so heavily.&lt;/li&gt;&#xA;&lt;li&gt;How batching configuration trades throughput against tail latency.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Training vs. inference</title>
      <link>https://ait.bsc.es/handbook/foundations/training-vs-inference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/foundations/training-vs-inference/</guid>
      <description>&lt;p&gt;Training and inference both run the same model architecture on the same accelerators,&#xA;which makes it tempting to treat them as one problem. Their resource profiles, failure&#xA;modes and success criteria differ enough that conflating them leads to expensive&#xA;mistakes.&lt;/p&gt;&#xA;&lt;p&gt;This page contrasts the two so the rest of the handbook can assume an inference-first&#xA;perspective.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How the compute, memory and networking profiles of the two workloads differ.&lt;/li&gt;&#xA;&lt;li&gt;Why throughput is the goal in training and latency often is in serving.&lt;/li&gt;&#xA;&lt;li&gt;Which training-oriented infrastructure choices transfer to serving and which do not.&lt;/li&gt;&#xA;&lt;li&gt;How the cost model changes when a workload runs continuously.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What is distributed inference?</title>
      <link>https://ait.bsc.es/handbook/infrastructure-and-operations/what-is-distributed-inference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/infrastructure-and-operations/what-is-distributed-inference/</guid>
      <description>&lt;p&gt;Once a model no longer fits on one accelerator, a single forward pass becomes a&#xA;distributed computation with collective communication on its critical path. Interconnect&#xA;performance and failure handling become first-order concerns.&lt;/p&gt;&#xA;&lt;p&gt;This page covers what distribution adds beyond the parallelism schemes themselves.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When distributing a single request becomes necessary.&lt;/li&gt;&#xA;&lt;li&gt;Why interconnect bandwidth and latency bound distributed inference.&lt;/li&gt;&#xA;&lt;li&gt;How a replica spanning several nodes is coordinated.&lt;/li&gt;&#xA;&lt;li&gt;What happens when one participant in a distributed replica fails.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Calculating GPU memory for serving LLMs</title>
      <link>https://ait.bsc.es/handbook/planning-your-deployment/calculating-gpu-memory/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/planning-your-deployment/calculating-gpu-memory/</guid>
      <description>&lt;p&gt;Running out of accelerator memory in production is one of the more common and more&#xA;avoidable inference failures. A memory budget computed in advance turns it into a&#xA;capacity decision rather than an incident.&lt;/p&gt;&#xA;&lt;p&gt;This page sets out the components of that budget and how each one scales.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The components that make up accelerator memory consumption.&lt;/li&gt;&#xA;&lt;li&gt;How to estimate weight memory from parameter count and precision.&lt;/li&gt;&#xA;&lt;li&gt;How KV cache size scales with batch size and context length.&lt;/li&gt;&#xA;&lt;li&gt;How much headroom to reserve for fragmentation and runtime overhead.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Choosing a mode</title>
      <link>https://ait.bsc.es/llm-inference/choosing-a-mode/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/choosing-a-mode/</guid>
      <description>&lt;p&gt;The tool gives you three ways to work. This page helps you pick one in under a minute.&lt;/p&gt;&#xA;&lt;h2 id=&#34;decision-table&#34;&gt;Decision table&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;If you need to…&lt;/th&gt;&#xA;          &lt;th&gt;Use&lt;/th&gt;&#xA;          &lt;th&gt;Guide&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Process a single input file in one go and get a results file.&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;bash inference&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://ait.bsc.es/llm-inference/modes/one-shot-inference/&#34;&gt;One-shot inference&lt;/a&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Keep an endpoint alive and send several batches to it.&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;endpoint start&lt;/code&gt; + &lt;code&gt;batch run&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://ait.bsc.es/llm-inference/modes/manual-endpoint/&#34;&gt;Manual endpoint&lt;/a&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Talk to the model from &lt;code&gt;curl&lt;/code&gt;, the OpenAI SDK or your own code.&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;api start&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://ait.bsc.es/llm-inference/modes/http-api/&#34;&gt;Shared HTTP API&lt;/a&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Just experiment, or validate your parameters.&lt;/td&gt;&#xA;          &lt;td&gt;any mode with &lt;code&gt;--dry-run&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://ait.bsc.es/llm-inference/concepts/&#34;&gt;Concepts&lt;/a&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;in-one-sentence-each&#34;&gt;In one sentence each&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Mode 1 — Manual endpoint.&lt;/strong&gt; You decide when it starts and when it stops. Good for repeated&#xA;batches against the same loaded model.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Mode 2 — One-shot inference.&lt;/strong&gt; One command, one input file, one output file. Best for&#xA;straightforward batch processing.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Mode 3 — Shared HTTP API.&lt;/strong&gt; Exposes an OpenAI-style HTTP URL for &lt;code&gt;curl&lt;/code&gt; or any client.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;how-they-compare&#34;&gt;How they compare&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;&lt;/th&gt;&#xA;          &lt;th&gt;Manual endpoint&lt;/th&gt;&#xA;          &lt;th&gt;One-shot&lt;/th&gt;&#xA;          &lt;th&gt;HTTP API&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Commands to run&lt;/td&gt;&#xA;          &lt;td&gt;2+ (&lt;code&gt;start&lt;/code&gt;, &lt;code&gt;batch run&lt;/code&gt;, &lt;code&gt;stop&lt;/code&gt;)&lt;/td&gt;&#xA;          &lt;td&gt;1&lt;/td&gt;&#xA;          &lt;td&gt;2+ (&lt;code&gt;start&lt;/code&gt;, &lt;code&gt;stop&lt;/code&gt;)&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Model loaded&lt;/td&gt;&#xA;          &lt;td&gt;once, reused&lt;/td&gt;&#xA;          &lt;td&gt;once per job&lt;/td&gt;&#xA;          &lt;td&gt;once, reused&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Input&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;.json&lt;/code&gt; file per batch&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;.json&lt;/code&gt; file&lt;/td&gt;&#xA;          &lt;td&gt;live HTTP requests&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Output&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;.jsonl&lt;/code&gt; file per batch&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;.jsonl&lt;/code&gt; file&lt;/td&gt;&#xA;          &lt;td&gt;HTTP responses&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Ends when&lt;/td&gt;&#xA;          &lt;td&gt;you run &lt;code&gt;endpoint stop&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;the batch finishes&lt;/td&gt;&#xA;          &lt;td&gt;you run &lt;code&gt;api stop&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;You must stop it&lt;/td&gt;&#xA;          &lt;td&gt;&lt;strong&gt;yes&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;no&lt;/td&gt;&#xA;          &lt;td&gt;&lt;strong&gt;yes&lt;/strong&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;div class=&#34;callout callout--warning&#34; role=&#34;alert&#34;&gt;&#xA;  &lt;p class=&#34;callout__title&#34;&gt;&#xA;    &lt;span class=&#34;callout__icon&#34; aria-hidden=&#34;true&#34;&gt;&lt;svg viewBox=&#34;0 0 24 24&#34; width=&#34;16&#34; height=&#34;16&#34; fill=&#34;none&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34;&gt;&lt;path d=&#34;M12 3l9 16H3z&#34;&gt;&lt;/path&gt;&lt;path d=&#34;M12 9v5M12 17h.01&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&#xA;    Modes 1 and 3 hold GPUs until you stop them&#xA;  &lt;/p&gt;</description>
    </item>
    <item>
      <title>Choosing the right kernel optimization tool</title>
      <link>https://ait.bsc.es/handbook/kernel-optimization/choosing-the-right-kernel-optimization-tool/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/kernel-optimization/choosing-the-right-kernel-optimization-tool/</guid>
      <description>&lt;p&gt;Kernels can be written at several levels of abstraction, from vendor assembly through&#xA;domain-specific languages to compiler-generated code. The levels differ in achievable&#xA;performance, portability and how much effort each change costs.&lt;/p&gt;&#xA;&lt;p&gt;This page compares them and suggests how to choose.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The levels of abstraction available for kernel work.&lt;/li&gt;&#xA;&lt;li&gt;How portability and peak performance trade against each other.&lt;/li&gt;&#xA;&lt;li&gt;Where compiler-based approaches are sufficient.&lt;/li&gt;&#xA;&lt;li&gt;Which profiling tools to use to direct the effort.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Clinical Note Summarization</title>
      <link>https://ait.bsc.es/blueprints/clinical-note-summarization/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/blueprints/clinical-note-summarization/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;Summarize clinical documentation into structured fields with human review built into the workflow.&lt;/p&gt;&#xA;&lt;p&gt;This page shows the structure a blueprint detail page uses. The problem statement and component list below are real design context; the deployment and usage sections are placeholders.&lt;/p&gt;&#xA;&lt;h2 id=&#34;problem-addressed&#34;&gt;Problem addressed&lt;/h2&gt;&#xA;&lt;p&gt;Clinical documentation is long, repetitive and time-consuming to review, but summarizing it automatically raises immediate questions of accuracy, auditability and data handling that a naive integration does not address.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Function calling</title>
      <link>https://ait.bsc.es/handbook/model-interaction/function-calling/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-interaction/function-calling/</guid>
      <description>&lt;p&gt;Function calling lets a model return a structured request to invoke a tool rather than a&#xA;direct answer. It is the mechanism underneath most agent architectures, and the point&#xA;where model output starts to have side effects.&lt;/p&gt;&#xA;&lt;p&gt;That makes both the schema design and the validation of the model&amp;rsquo;s requests security-&#xA;relevant, not merely functional.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How a function-calling exchange proceeds, turn by turn.&lt;/li&gt;&#xA;&lt;li&gt;How to describe tools so a model uses them correctly.&lt;/li&gt;&#xA;&lt;li&gt;Why every tool call must be validated before execution.&lt;/li&gt;&#xA;&lt;li&gt;How multi-step tool use composes into agent behaviour.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How does an LLM work?</title>
      <link>https://ait.bsc.es/handbook/foundations/how-does-an-llm-work/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/foundations/how-does-an-llm-work/</guid>
      <description>&lt;p&gt;You do not need to be able to derive backpropagation to serve a model well, but you do&#xA;need an accurate picture of what the hardware is doing during each forward pass. This&#xA;page provides that picture, at the level of detail that serving decisions actually&#xA;depend on.&lt;/p&gt;&#xA;&lt;p&gt;The emphasis is on where the time and the memory go, rather than on model quality or&#xA;training dynamics.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The shape of a transformer forward pass, layer by layer.&lt;/li&gt;&#xA;&lt;li&gt;Why attention cost grows with sequence length.&lt;/li&gt;&#xA;&lt;li&gt;How autoregressive generation turns one request into many forward passes.&lt;/li&gt;&#xA;&lt;li&gt;Which parts of the computation dominate time and memory.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LLM distillation</title>
      <link>https://ait.bsc.es/handbook/model-preparation/llm-distillation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-preparation/llm-distillation/</guid>
      <description>&lt;p&gt;Distillation transfers the behaviour of a large teacher model into a smaller student.&#xA;Where it works, it changes the serving economics substantially, because the deployed&#xA;model is genuinely smaller rather than merely compressed.&lt;/p&gt;&#xA;&lt;p&gt;This page covers the approach, its requirements and its limits.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What distillation is and how it differs from quantization and pruning.&lt;/li&gt;&#xA;&lt;li&gt;What data and compute a distillation run requires.&lt;/li&gt;&#xA;&lt;li&gt;Which task types distil well and which resist it.&lt;/li&gt;&#xA;&lt;li&gt;How to validate that the student preserves the behaviour you care about.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LLM observability</title>
      <link>https://ait.bsc.es/handbook/infrastructure-and-operations/llm-observability/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/infrastructure-and-operations/llm-observability/</guid>
      <description>&lt;p&gt;Generic service metrics do not explain inference behaviour. Request rate and error rate&#xA;say nothing about queue depth, batch composition, cache hit rate or accelerator&#xA;utilization, which are where inference problems actually appear.&lt;/p&gt;&#xA;&lt;p&gt;This page covers what to instrument and how to make it actionable.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which inference-specific signals to collect beyond standard service metrics.&lt;/li&gt;&#xA;&lt;li&gt;How to instrument the phases of a request separately.&lt;/li&gt;&#xA;&lt;li&gt;Which signals belong on a dashboard and which should page someone.&lt;/li&gt;&#xA;&lt;li&gt;How to handle prompt and completion data given privacy constraints.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PagedAttention</title>
      <link>https://ait.bsc.es/handbook/inference-optimization/paged-attention/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/inference-optimization/paged-attention/</guid>
      <description>&lt;p&gt;Naively allocating a contiguous KV cache block per request wastes a large fraction of&#xA;accelerator memory, because allocations must be sized for the longest possible output&#xA;rather than the actual one.&lt;/p&gt;&#xA;&lt;p&gt;PagedAttention applies the idea behind virtual memory paging to the KV cache, trading a&#xA;level of indirection for substantially better memory utilization.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why contiguous KV cache allocation fragments memory.&lt;/li&gt;&#xA;&lt;li&gt;How paging the KV cache into fixed-size blocks addresses that.&lt;/li&gt;&#xA;&lt;li&gt;How paging enables sharing between requests with common prefixes.&lt;/li&gt;&#xA;&lt;li&gt;What the indirection costs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mode 3 — Shared HTTP API</title>
      <link>https://ait.bsc.es/llm-inference/modes/http-api/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/modes/http-api/</guid>
      <description>&lt;p&gt;This mode starts a long-lived vLLM endpoint that other tools can talk to over HTTP: &lt;code&gt;curl&lt;/code&gt;, the&#xA;OpenAI SDK, or your own applications — as long as they run inside the MareNostrum 5 network.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-to-use-it&#34;&gt;When to use it&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You want to share the endpoint between several tools.&lt;/li&gt;&#xA;&lt;li&gt;The requests are interactive and you do not know them in advance.&lt;/li&gt;&#xA;&lt;li&gt;You want the URL to stay alive until you stop it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;callout callout--warning&#34; role=&#34;alert&#34;&gt;&#xA;  &lt;p class=&#34;callout__title&#34;&gt;&#xA;    &lt;span class=&#34;callout__icon&#34; aria-hidden=&#34;true&#34;&gt;&lt;svg viewBox=&#34;0 0 24 24&#34; width=&#34;16&#34; height=&#34;16&#34; fill=&#34;none&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34;&gt;&lt;path d=&#34;M12 3l9 16H3z&#34;&gt;&lt;/path&gt;&lt;path d=&#34;M12 9v5M12 17h.01&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&#xA;    No authentication, TLS or proxy support&#xA;  &lt;/p&gt;</description>
    </item>
    <item>
      <title>Choosing the right inference framework</title>
      <link>https://ait.bsc.es/handbook/planning-your-deployment/choosing-the-right-inference-framework/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/planning-your-deployment/choosing-the-right-inference-framework/</guid>
      <description>&lt;p&gt;Serving frameworks differ less in the features they list than in what they optimise for&#xA;and how they behave at the edges of their operating range. The right comparison is&#xA;against your own traffic pattern.&lt;/p&gt;&#xA;&lt;p&gt;This page gives the criteria to compare on, and a method for evaluating candidates&#xA;without committing to one first.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The criteria that meaningfully separate serving frameworks.&lt;/li&gt;&#xA;&lt;li&gt;Which optimizations to check for, and why their presence alone is not enough.&lt;/li&gt;&#xA;&lt;li&gt;How to benchmark candidates against your own traffic pattern.&lt;/li&gt;&#xA;&lt;li&gt;What operational characteristics to weigh alongside raw performance.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Concepts</title>
      <link>https://ait.bsc.es/llm-inference/concepts/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/concepts/</guid>
      <description>&lt;p&gt;The vocabulary this guide uses. Where a term is a general inference concept rather than&#xA;something specific to this tool, it links to the &lt;a href=&#34;https://ait.bsc.es/handbook/&#34;&gt;handbook&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;tool-concepts&#34;&gt;Tool concepts&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Term&lt;/th&gt;&#xA;          &lt;th&gt;Meaning&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Model ID&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;The identifier passed to &lt;code&gt;--model&lt;/code&gt;, e.g. &lt;code&gt;mistralai/Mistral-7B-Instruct-v0.3&lt;/code&gt;. Must appear in &lt;code&gt;llm-inference model list&lt;/code&gt; with &lt;code&gt;SUPPORTED=yes&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Outdir&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;The directory given with &lt;code&gt;--outdir&lt;/code&gt;. The tool writes the generated Slurm script, logs and sidecar files here.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Sidecar file&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;A small JSON written into the outdir recording &lt;code&gt;job_id&lt;/code&gt;, &lt;code&gt;port&lt;/code&gt; and &lt;code&gt;model&lt;/code&gt;. It is how commands find a running endpoint.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Endpoint&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;A running vLLM server inside a Slurm job, reachable on an auto-assigned port.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Job ID&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;The Slurm job identifier. Every &lt;code&gt;status&lt;/code&gt; and &lt;code&gt;stop&lt;/code&gt; command takes it via &lt;code&gt;--job&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Dry run&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;--dry-run&lt;/code&gt; validates parameters and writes the Slurm script &lt;strong&gt;without submitting&lt;/strong&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;required-slurm-parameters&#34;&gt;Required Slurm parameters&lt;/h2&gt;&#xA;&lt;p&gt;All three modes need the same set. Pass them by repeating &lt;code&gt;--slurm&lt;/code&gt; with &lt;code&gt;key=value&lt;/code&gt; pairs:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fast scaling</title>
      <link>https://ait.bsc.es/handbook/infrastructure-and-operations/fast-scaling/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/infrastructure-and-operations/fast-scaling/</guid>
      <description>&lt;p&gt;Inference replicas scale slowly compared with stateless services, because a replica&#xA;cannot serve until many gigabytes of weights have been fetched and loaded. Autoscaling&#xA;that ignores this reacts long after the traffic has changed.&lt;/p&gt;&#xA;&lt;p&gt;This page covers where that time goes and how to reduce it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which stages make up replica startup time.&lt;/li&gt;&#xA;&lt;li&gt;How model loading and image pull dominate that time.&lt;/li&gt;&#xA;&lt;li&gt;Which techniques shorten each stage.&lt;/li&gt;&#xA;&lt;li&gt;How to set autoscaling policy around the remaining latency.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FlashAttention</title>
      <link>https://ait.bsc.es/handbook/kernel-optimization/flash-attention/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/kernel-optimization/flash-attention/</guid>
      <description>&lt;p&gt;A textbook attention implementation materialises the full attention matrix in memory,&#xA;making the operation memory-bound and its footprint quadratic in sequence length. That&#xA;is the dominant cost for long contexts.&lt;/p&gt;&#xA;&lt;p&gt;FlashAttention restructures the computation so the matrix is never fully materialised,&#xA;trading extra arithmetic for far less memory traffic.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why naive attention is memory-bound rather than compute-bound.&lt;/li&gt;&#xA;&lt;li&gt;How tiling and online softmax avoid materialising the attention matrix.&lt;/li&gt;&#xA;&lt;li&gt;Why trading recomputation for memory traffic is a net win here.&lt;/li&gt;&#xA;&lt;li&gt;How the approach applies differently to prefill and decode.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Literature Review Assistant</title>
      <link>https://ait.bsc.es/blueprints/literature-review-assistant/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/blueprints/literature-review-assistant/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;An agent that searches, filters and summarizes scientific literature against a stated research question.&lt;/p&gt;&#xA;&lt;p&gt;This page shows the structure a blueprint detail page uses. The problem statement and component list below are real design context; the deployment and usage sections are placeholders.&lt;/p&gt;&#xA;&lt;h2 id=&#34;problem-addressed&#34;&gt;Problem addressed&lt;/h2&gt;&#xA;&lt;p&gt;Screening literature for relevance is mechanical, high-volume work, but summaries that drop the provenance of a claim are worse than useless for research.&lt;/p&gt;&#xA;&lt;h2 id=&#34;architecture&#34;&gt;Architecture&lt;/h2&gt;&#xA;&lt;figure class=&#34;architecture&#34; aria-labelledby=&#34;arch-literature-review-assistant-2&#34;&gt;&#xA;  &lt;figcaption class=&#34;architecture__title&#34; id=&#34;arch-literature-review-assistant-2&#34;&gt;Component overview&lt;/figcaption&gt;&#xA;    &lt;pre class=&#34;architecture__sketch&#34;&gt;&lt;code&gt;  [1] Search tools&#xA;  [2] Relevance screening&#xA;  [3] Citation-preserving summarizer&#xA;  [4] Inference backend&lt;/code&gt;&lt;/pre&gt;&lt;p class=&#34;architecture__caption&#34;&gt;A concrete architecture diagram will replace this sketch when the blueprint is published.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Speculative decoding</title>
      <link>https://ait.bsc.es/handbook/inference-optimization/speculative-decoding/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/inference-optimization/speculative-decoding/</guid>
      <description>&lt;p&gt;Decoding is limited by memory bandwidth rather than compute, so a forward pass that&#xA;verifies several candidate tokens costs little more than one that produces a single&#xA;token. Speculative decoding exploits that.&lt;/p&gt;&#xA;&lt;p&gt;This page explains the mechanism and the conditions under which it actually pays off.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why verifying several tokens costs little more than generating one.&lt;/li&gt;&#xA;&lt;li&gt;How draft-and-verify preserves the target model&amp;rsquo;s output distribution.&lt;/li&gt;&#xA;&lt;li&gt;Which draft model choices work, including model-free variants.&lt;/li&gt;&#xA;&lt;li&gt;When speculative decoding fails to help or hurts.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Structured outputs</title>
      <link>https://ait.bsc.es/handbook/model-interaction/structured-outputs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-interaction/structured-outputs/</guid>
      <description>&lt;p&gt;Asking a model to reply in JSON and hoping for the best does not survive production&#xA;traffic. Structured output support constrains generation so the result conforms to a&#xA;schema by construction.&lt;/p&gt;&#xA;&lt;p&gt;This page covers the available approaches and their costs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The difference between prompting for a format and constraining generation to it.&lt;/li&gt;&#xA;&lt;li&gt;How grammar and schema-constrained decoding work at a high level.&lt;/li&gt;&#xA;&lt;li&gt;What constrained decoding costs in latency and flexibility.&lt;/li&gt;&#xA;&lt;li&gt;How to handle the cases a schema cannot express.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Where is LLM inference run?</title>
      <link>https://ait.bsc.es/handbook/foundations/where-is-llm-inference-run/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/foundations/where-is-llm-inference-run/</guid>
      <description>&lt;p&gt;Where inference runs determines what you can control and what you must accept. The&#xA;decision is rarely purely technical: data residency, procurement, existing hardware and&#xA;the shape of demand all constrain it.&lt;/p&gt;&#xA;&lt;p&gt;This page lays out the options and the criteria for choosing between them.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The main deployment targets and what distinguishes them.&lt;/li&gt;&#xA;&lt;li&gt;How data residency and compliance constrain the choice.&lt;/li&gt;&#xA;&lt;li&gt;When on-premises accelerators are worth the operational burden.&lt;/li&gt;&#xA;&lt;li&gt;Why demand shape matters as much as demand volume.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>InferenceOps and management</title>
      <link>https://ait.bsc.es/handbook/infrastructure-and-operations/inferenceops/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/infrastructure-and-operations/inferenceops/</guid>
      <description>&lt;p&gt;Beyond the initial deployment, an inference service needs release procedures, capacity&#xA;management, cost attribution and incident response — the ordinary operational&#xA;disciplines, adapted to workloads where a single replica may cost more per hour than an&#xA;entire conventional service.&lt;/p&gt;&#xA;&lt;p&gt;This page collects those practices.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;How to release model and configuration changes safely.&lt;/li&gt;&#xA;&lt;li&gt;How to manage capacity and quota across tenants.&lt;/li&gt;&#xA;&lt;li&gt;How to attribute and control cost.&lt;/li&gt;&#xA;&lt;li&gt;What inference-specific incident response looks like.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Key metrics for LLM inference</title>
      <link>https://ait.bsc.es/handbook/foundations/key-metrics/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/foundations/key-metrics/</guid>
      <description>&lt;p&gt;Inference performance cannot be summarised by a single number. A deployment tuned for&#xA;tokens per second may feel unresponsive; one tuned for first-token latency may waste&#xA;most of its accelerator capacity.&lt;/p&gt;&#xA;&lt;p&gt;This page defines the metrics used throughout the handbook and, importantly, what each&#xA;one obscures when quoted alone.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The definitions of time to first token, time per output token and end-to-end latency.&lt;/li&gt;&#xA;&lt;li&gt;How throughput and concurrency relate, and why averages mislead.&lt;/li&gt;&#xA;&lt;li&gt;What goodput measures and why it matters under load.&lt;/li&gt;&#xA;&lt;li&gt;Which metrics to attach to a service-level objective.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Model Context Protocol</title>
      <link>https://ait.bsc.es/handbook/model-interaction/model-context-protocol/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-interaction/model-context-protocol/</guid>
      <description>&lt;p&gt;The Model Context Protocol standardises how a model-facing application connects to tools&#xA;and data sources, so that integrations can be written once and reused across clients&#xA;rather than rebuilt per application.&lt;/p&gt;&#xA;&lt;p&gt;This page introduces the concepts and where MCP fits relative to plain function calling.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What problem MCP standardises, and for whom.&lt;/li&gt;&#xA;&lt;li&gt;The roles of host, client and server in the protocol.&lt;/li&gt;&#xA;&lt;li&gt;How MCP relates to and differs from direct function calling.&lt;/li&gt;&#xA;&lt;li&gt;What to consider before exposing internal systems through an MCP server.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Prefill-decode disaggregation</title>
      <link>https://ait.bsc.es/handbook/inference-optimization/prefill-decode-disaggregation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/inference-optimization/prefill-decode-disaggregation/</guid>
      <description>&lt;p&gt;Prefill is compute-bound and decode is bandwidth-bound. Running both on the same replica&#xA;means one phase&amp;rsquo;s requirements always compromise the other&amp;rsquo;s, and interference between&#xA;them shows up directly in tail latency.&lt;/p&gt;&#xA;&lt;p&gt;Disaggregation separates them, at the cost of moving KV cache between resources.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why colocating prefill and decode causes interference.&lt;/li&gt;&#xA;&lt;li&gt;How a disaggregated deployment routes a request through both stages.&lt;/li&gt;&#xA;&lt;li&gt;What transferring KV cache between stages costs.&lt;/li&gt;&#xA;&lt;li&gt;When the added complexity is justified.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Voice Assistant Frontend</title>
      <link>https://ait.bsc.es/blueprints/voice-assistant-frontend/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/blueprints/voice-assistant-frontend/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;A speech interface that pairs streaming text-to-speech with a conversational model backend.&lt;/p&gt;&#xA;&lt;p&gt;This page shows the structure a blueprint detail page uses. The problem statement and component list below are real design context; the deployment and usage sections are placeholders.&lt;/p&gt;&#xA;&lt;h2 id=&#34;problem-addressed&#34;&gt;Problem addressed&lt;/h2&gt;&#xA;&lt;p&gt;Voice interfaces are judged almost entirely on responsiveness, so the naive approach — generate the full text response, then synthesise it — feels broken even when both stages are individually fast.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Accessible Content Narration</title>
      <link>https://ait.bsc.es/blueprints/accessible-content-narration/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/blueprints/accessible-content-narration/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;Generate spoken narration for written content as a batch process, with pronunciation overrides.&lt;/p&gt;&#xA;&lt;p&gt;This page shows the structure a blueprint detail page uses. The problem statement and component list below are real design context; the deployment and usage sections are placeholders.&lt;/p&gt;&#xA;&lt;h2 id=&#34;problem-addressed&#34;&gt;Problem addressed&lt;/h2&gt;&#xA;&lt;p&gt;Narrating a large content library is a throughput problem with a long tail of domain terms that generic synthesis mispronounces.&lt;/p&gt;&#xA;&lt;h2 id=&#34;architecture&#34;&gt;Architecture&lt;/h2&gt;&#xA;&lt;figure class=&#34;architecture&#34; aria-labelledby=&#34;arch-accessible-content-narration-2&#34;&gt;&#xA;  &lt;figcaption class=&#34;architecture__title&#34; id=&#34;arch-accessible-content-narration-2&#34;&gt;Component overview&lt;/figcaption&gt;&#xA;    &lt;pre class=&#34;architecture__sketch&#34;&gt;&lt;code&gt;  [1] Text normalisation&#xA;  [2] Pronunciation dictionary&#xA;  [3] Batch synthesis runner&#xA;  [4] Audio store&lt;/code&gt;&lt;/pre&gt;&lt;p class=&#34;architecture__caption&#34;&gt;A concrete architecture diagram will replace this sketch when the blueprint is published.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Input and output format</title>
      <link>https://ait.bsc.es/llm-inference/input-output-format/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/input-output-format/</guid>
      <description>&lt;p&gt;Both &lt;code&gt;batch run&lt;/code&gt; and &lt;code&gt;bash inference&lt;/code&gt; use the same input and output format.&lt;/p&gt;&#xA;&lt;h2 id=&#34;input-file-json&#34;&gt;Input file (&lt;code&gt;.json&lt;/code&gt;)&lt;/h2&gt;&#xA;&lt;p&gt;A JSON object with an array of requests. Each request has its own &lt;code&gt;id&lt;/code&gt; plus the usual chat-API&#xA;fields:&lt;/p&gt;&#xA;&lt;figure class=&#34;code-example&#34;&gt;&lt;figcaption class=&#34;code-example__title&#34;&gt;requests.json&lt;/figcaption&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;#34;requests&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;req-001&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;model&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;mistralai/Mistral-7B-Instruct-v0.3&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;messages&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;#34;role&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;system&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;&amp;#34;content&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;You are a concise assistant.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;#34;role&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;user&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;   &lt;span class=&#34;nt&#34;&gt;&amp;#34;content&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Explain tensor parallelism in one paragraph.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;max_tokens&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;256&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;temperature&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;0.7&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;req-002&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;model&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;mistralai/Mistral-7B-Instruct-v0.3&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;messages&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;#34;role&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;user&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;&amp;#34;content&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Write a Python function that returns the n-th Fibonacci number.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;max_tokens&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;384&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;temperature&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;0.0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h3 id=&#34;fields&#34;&gt;Fields&lt;/h3&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Field&lt;/th&gt;&#xA;          &lt;th&gt;Purpose&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;id&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Your identifier for the request. Copied to the output so you can match them up.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;model&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;The model ID. Should match the model the endpoint was started with.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;messages&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;The conversation, as &lt;code&gt;role&lt;/code&gt; / &lt;code&gt;content&lt;/code&gt; pairs. Roles: &lt;code&gt;system&lt;/code&gt;, &lt;code&gt;user&lt;/code&gt;, &lt;code&gt;assistant&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;max_tokens&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Upper bound on generated tokens for this request.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;temperature&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Sampling temperature. &lt;code&gt;0.0&lt;/code&gt; is the most deterministic.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;div class=&#34;callout callout--tip&#34; role=&#34;note&#34;&gt;&#xA;  &lt;p class=&#34;callout__title&#34;&gt;&#xA;    &lt;span class=&#34;callout__icon&#34; aria-hidden=&#34;true&#34;&gt;&lt;svg viewBox=&#34;0 0 24 24&#34; width=&#34;16&#34; height=&#34;16&#34; fill=&#34;none&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34;&gt;&lt;path d=&#34;M9 18h6M10 22h4&#34;&gt;&lt;/path&gt;&lt;path d=&#34;M12 2a6 6 0 0 0-3 11v3h6v-3a6 6 0 0 0-3-11z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&#xA;    Tip&#xA;  &lt;/p&gt;</description>
    </item>
    <item>
      <title>Prefix caching</title>
      <link>https://ait.bsc.es/handbook/inference-optimization/prefix-caching/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/inference-optimization/prefix-caching/</guid>
      <description>&lt;p&gt;Production traffic repeats itself. Shared system prompts, few-shot examples and multi-&#xA;turn conversations all mean requests frequently share a long prefix whose KV cache was&#xA;already computed.&lt;/p&gt;&#xA;&lt;p&gt;Prefix caching reuses that work, which can remove most of the prefill cost for such&#xA;requests.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Why real traffic contains so much shared prefix.&lt;/li&gt;&#xA;&lt;li&gt;How cached prefixes are matched and reused.&lt;/li&gt;&#xA;&lt;li&gt;How prefix caching interacts with paged KV cache management.&lt;/li&gt;&#xA;&lt;li&gt;What cache invalidation and eviction require.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Prompt engineering</title>
      <link>https://ait.bsc.es/handbook/model-interaction/prompt-engineering/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/handbook/model-interaction/prompt-engineering/</guid>
      <description>&lt;p&gt;Prompt engineering has a poor reputation earned by folklore, but the underlying practice&#xA;is ordinary engineering: change one thing, measure the effect on a fixed evaluation set,&#xA;keep what works.&lt;/p&gt;&#xA;&lt;p&gt;This page focuses on techniques that survive that treatment, and on the evaluation&#xA;discipline that makes the difference.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-you-will-learn&#34;&gt;What you will learn&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Which prompt structures reliably improve task performance.&lt;/li&gt;&#xA;&lt;li&gt;How to build an evaluation set before tuning prompts.&lt;/li&gt;&#xA;&lt;li&gt;How prompt length interacts with latency and cost.&lt;/li&gt;&#xA;&lt;li&gt;Why prompts should be versioned like any other production artifact.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;recommended-outline&#34;&gt;Recommended outline&lt;/h2&gt;&#xA;&lt;p&gt;This page is an outline. The subsections below are the planned structure;&#xA;they are filled in as the handbook is written.&lt;/p&gt;</description>
    </item>
    <item>
      <title>API reference</title>
      <link>https://ait.bsc.es/llm-inference/api-reference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://ait.bsc.es/llm-inference/api-reference/</guid>
      <description>&lt;p&gt;In &lt;a href=&#34;https://ait.bsc.es/llm-inference/modes/http-api/&#34;&gt;HTTP API mode&lt;/a&gt;, vLLM serves an OpenAI-compatible HTTP&#xA;surface. This page documents the endpoints you will use.&lt;/p&gt;&#xA;&lt;p&gt;All paths are relative to the base URL printed by &lt;code&gt;api start&lt;/code&gt;, which looks like&#xA;&lt;code&gt;http://nid001:45123&lt;/code&gt;. Host and port are assigned at run time and change on every start.&lt;/p&gt;&#xA;&lt;div class=&#34;callout callout--warning&#34; role=&#34;alert&#34;&gt;&#xA;  &lt;p class=&#34;callout__title&#34;&gt;&#xA;    &lt;span class=&#34;callout__icon&#34; aria-hidden=&#34;true&#34;&gt;&lt;svg viewBox=&#34;0 0 24 24&#34; width=&#34;16&#34; height=&#34;16&#34; fill=&#34;none&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34;&gt;&lt;path d=&#34;M12 3l9 16H3z&#34;&gt;&lt;/path&gt;&lt;path d=&#34;M12 9v5M12 17h.01&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&#xA;    No authentication&#xA;  &lt;/p&gt;&#xA;  &lt;div class=&#34;callout__body&#34;&gt;&#xA;    &lt;p&gt;There is no API key, no TLS and no proxy support. The endpoint is reachable by anyone inside the&#xA;MN5 network who knows the host and port. Do not treat it as a shared service outside your own&#xA;work.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
