diff --git a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-OCR.mdx b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-OCR.mdx index f999fa73be..678bedcfbb 100644 --- a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-OCR.mdx +++ b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-OCR.mdx @@ -26,8 +26,6 @@ For more details, please refer to the [official DeepSeek-OCR repository](https:/ Please refer to the [official SGLang installation guide](../../../docs/get-started/install) for installation instructions. -For SGLang CPU installation, please refer to the [CPU version installation guide](../../../docs/hardware-platforms/cpu_server#installation). - ## 3. Model Deployment This section provides deployment configurations optimized for different hardware platforms and use cases. diff --git a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-R1.mdx b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-R1.mdx index 3b6b3583e0..787ec3f552 100644 --- a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-R1.mdx +++ b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-R1.mdx @@ -37,8 +37,6 @@ For more details, please refer to the [official DeepSeek-R1 repository](https:// Please refer to the [official SGLang installation guide](../../../docs/get-started/install) for installation instructions. -For SGLang CPU installation, please refer to the [CPU version installation guide](../../../docs/hardware-platforms/cpu_server#installation). - ## 3. Model Deployment This section provides deployment configurations optimized for different hardware platforms and use cases. diff --git a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V3.mdx b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V3.mdx index b0f22db90b..550d6e4ea3 100644 --- a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V3.mdx +++ b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V3.mdx @@ -22,8 +22,6 @@ SGLang offers multiple installation methods. You can choose the most suitable in Please refer to the [official SGLang installation guide](../../../docs/get-started/install) for installation instructions. -For SGLang CPU installation, please refer to the [CPU version installation guide](../../../docs/hardware-platforms/cpu_server#installation). - ## 3. Model Deployment This section provides a progressive guide from quick deployment to performance optimization, suitable for users at different levels. diff --git a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V3_1.mdx b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V3_1.mdx index 67e4bcdd94..c2a00167c8 100644 --- a/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V3_1.mdx +++ b/docs/cookbook/autoregressive/DeepSeek/DeepSeek-V3_1.mdx @@ -18,8 +18,6 @@ SGLang offers multiple installation methods. You can choose the most suitable in Please refer to the [official SGLang installation guide](../../../docs/get-started/install) for installation instructions. -For SGLang CPU installation, please refer to the [CPU version installation guide](../../../docs/hardware-platforms/cpu_server#installation). - ## 3. Model Deployment This section provides a progressive guide from quick deployment to performance optimization, suitable for users at different levels. diff --git a/docs/cookbook/autoregressive/Ernie/Ernie4.5.mdx b/docs/cookbook/autoregressive/Ernie/Ernie4.5.mdx index 9f4d35afbf..88cb930b5f 100644 --- a/docs/cookbook/autoregressive/Ernie/Ernie4.5.mdx +++ b/docs/cookbook/autoregressive/Ernie/Ernie4.5.mdx @@ -15,7 +15,7 @@ ERNIE-4.5 delivers advanced features as below: - **Vision Encoder**: Dedicated adaptive-resolution ViT with 2D RoPE and image packing; for video, adaptive frame sampling and timestamp rendering, supporting both shared and modality-specific visual processing. - **Adapter**: Shared modality-bridging module with spatial and temporal compression to align vision to text embedding space, enabling cross-modal understanding without compromising text representations. - **Multimodal Position Embedding**: Unified 3D RoPE (temporal, height, width) for vision and 1D RoPE for text in a single embedding space, supporting parameter sharing while encoding modality-specific positions. -- **Hardware Optimization**: Specifically tuned for AMD MI300X, MI325X, and MI355X GPUs. +- **Hardware Optimization**: Specifically tuned for AMD MI300X, MI325X, MI355X GPUs and Intel Xeon CPUs. ## 2. SGLang Installation diff --git a/docs/cookbook/autoregressive/Google/Gemma4.mdx b/docs/cookbook/autoregressive/Google/Gemma4.mdx index b87670a56e..245e510b90 100644 --- a/docs/cookbook/autoregressive/Google/Gemma4.mdx +++ b/docs/cookbook/autoregressive/Google/Gemma4.mdx @@ -97,7 +97,7 @@ For other installation methods, please refer to the [official SGLang installatio ### 3.1 Basic Configuration -The Gemma 4 series offers models in various sizes and architectures, optimized for different hardware platforms including NVIDIA GPUs, AMD GPUs, and Intel Arc Pro B-Series GPUs(codename: BMG (Battlemage)). The recommended launch configurations vary by hardware and model size. +The Gemma 4 series offers models in various sizes and architectures, optimized for different hardware platforms including NVIDIA GPUs, AMD GPUs, and Intel Arc Pro B-Series GPUs(codename: BMG (Battlemage)), Xeon CPUs. The recommended launch configurations vary by hardware and model size. **Interactive Command Generator**: Use the configuration selector below to automatically generate the appropriate deployment command for your hardware platform and model variant. diff --git a/docs/cookbook/autoregressive/OpenAI/GPT-OSS.mdx b/docs/cookbook/autoregressive/OpenAI/GPT-OSS.mdx index 6e94653d66..b077f983b3 100644 --- a/docs/cookbook/autoregressive/OpenAI/GPT-OSS.mdx +++ b/docs/cookbook/autoregressive/OpenAI/GPT-OSS.mdx @@ -25,8 +25,6 @@ SGLang offers multiple installation methods. You can choose the most suitable in Please refer to the [official SGLang installation guide](../../../docs/get-started/install) for installation instructions. -For SGLang CPU installation, please refer to the [CPU version installation guide](../../../docs/hardware-platforms/cpu_server#installation). - ## 3.Model Deployment This section provides deployment configurations optimized for different hardware platforms and use cases. diff --git a/docs/cookbook/autoregressive/Qwen/Qwen3-Next.mdx b/docs/cookbook/autoregressive/Qwen/Qwen3-Next.mdx index 2dde9f8b8b..f9733a3dd0 100644 --- a/docs/cookbook/autoregressive/Qwen/Qwen3-Next.mdx +++ b/docs/cookbook/autoregressive/Qwen/Qwen3-Next.mdx @@ -32,8 +32,6 @@ SGLang offers multiple installation methods. You can choose the most suitable in Please refer to the [official SGLang installation guide](../../../docs/get-started/install) for installation instructions. -For SGLang CPU installation, please refer to the [CPU version installation guide](../../../docs/hardware-platforms/cpu_server#installation). - ## 3. Model Deployment This section provides deployment configurations optimized for different hardware platforms and use cases. diff --git a/docs/cookbook/diffusion/Cosmos/Cosmos3.mdx b/docs/cookbook/diffusion/Cosmos/Cosmos3.mdx index 2dd4a67b40..a6313d33c5 100644 --- a/docs/cookbook/diffusion/Cosmos/Cosmos3.mdx +++ b/docs/cookbook/diffusion/Cosmos/Cosmos3.mdx @@ -69,6 +69,12 @@ The default `flow_shift` is `3.0` for T2I, `10.0` for non-Edge video and all act ## 3. Serve Cosmos3 +For Intel Xeon CPU deployment, use `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu` with the selected Cosmos3 checkpoint. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu sglang serve --model-path nvidia/Cosmos3-Nano --port 30010 +``` + Serve `Cosmos3-Nano` directly from the Hugging Face model ID: ```bash Command diff --git a/docs/cookbook/diffusion/Ernie-Image/Ernie-Image.mdx b/docs/cookbook/diffusion/Ernie-Image/Ernie-Image.mdx index d5f1785a46..a9c987b798 100644 --- a/docs/cookbook/diffusion/Ernie-Image/Ernie-Image.mdx +++ b/docs/cookbook/diffusion/Ernie-Image/Ernie-Image.mdx @@ -57,6 +57,20 @@ sglang serve \ --port 30010 ``` +Intel Xeon CPU deployment is supported by prefixing the server command with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu` and omitting GPU-only flags. + +Serve ERNIE-Image: + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu sglang serve --model-path baidu/ERNIE-Image --port 30010 +``` + +Serve ERNIE-Image-Turbo: + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu sglang serve --model-path baidu/ERNIE-Image-Turbo --port 30010 +``` + ## 4. Generate an image Use the OpenAI-compatible image generation API after the server starts: diff --git a/docs/cookbook/diffusion/Ideogram/Ideogram4.mdx b/docs/cookbook/diffusion/Ideogram/Ideogram4.mdx index 32294dbf5e..13a393de23 100644 --- a/docs/cookbook/diffusion/Ideogram/Ideogram4.mdx +++ b/docs/cookbook/diffusion/Ideogram/Ideogram4.mdx @@ -61,6 +61,12 @@ HF_TOKEN=$HF_TOKEN sglang serve \ --port 30010 ``` +Intel Xeon CPU deployment is supported for the fal checkpoints with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu`; omit GPU-only flags. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu HF_TOKEN=$HF_TOKEN sglang serve --model-path ideogram-ai/ideogram-4-nf4 --port 30010 +``` + FP8: ```bash Command @@ -71,6 +77,12 @@ HF_TOKEN=$HF_TOKEN sglang serve \ --port 30010 ``` +Intel Xeon CPU deployment is supported for the fal checkpoints with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu`; omit GPU-only flags. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu HF_TOKEN=$HF_TOKEN sglang serve --model-path ideogram-ai/ideogram-4-fp8 --port 30010 +``` + Comfy-Org NVFP4: ```bash Command @@ -93,6 +105,12 @@ HF_TOKEN=$HF_TOKEN sglang serve \ --port 30010 ``` +IntelXeon CPU deployment is supported for the fal checkpoints with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu`; omit GPU-only flags. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu HF_TOKEN=$HF_TOKEN sglang serve --model-path fal/ideogram-v4-fast --port 30010 +``` + fal Instant: ```bash Command @@ -103,6 +121,12 @@ HF_TOKEN=$HF_TOKEN sglang serve \ --port 30010 ``` +Intel Xeon CPU deployment is supported for the fal checkpoints with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu`; omit GPU-only flags. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu HF_TOKEN=$HF_TOKEN sglang serve --model-path fal/ideogram-v4-instant --port 30010 +``` + ### Tensor and sequence parallelism Both fal variants support native DiT tensor parallelism and Ulysses sequence parallelism. The following two-GPU layouts were validated at 1024×1024 on B200 GPUs for both `fal/ideogram-v4-fast` and `fal/ideogram-v4-instant`. diff --git a/docs/cookbook/diffusion/Krea/Krea-2.mdx b/docs/cookbook/diffusion/Krea/Krea-2.mdx index 3ef02f15e3..52d146b005 100644 --- a/docs/cookbook/diffusion/Krea/Krea-2.mdx +++ b/docs/cookbook/diffusion/Krea/Krea-2.mdx @@ -39,6 +39,12 @@ This section covers deploying Krea-2-Turbo for fast, high-quality image generati ### 3.1 Basic Configuration +Intel Xeon CPU deployment is supported with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu` and the selected Krea-2 checkpoint. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu sglang serve --model-path krea/Krea-2-Turbo +``` + Krea-2-Turbo generates high-quality images in only 8 inference steps. Launch the server with: ```bash Command diff --git a/docs/cookbook/diffusion/LingBot-World/LingBot-World-2.0.mdx b/docs/cookbook/diffusion/LingBot-World/LingBot-World-2.0.mdx index 2796d7ca1d..41b1254acd 100644 --- a/docs/cookbook/diffusion/LingBot-World/LingBot-World-2.0.mdx +++ b/docs/cookbook/diffusion/LingBot-World/LingBot-World-2.0.mdx @@ -48,6 +48,12 @@ sglang serve \ --enable-torch-compile false ``` +Intel Xeon CPU deployment is supported with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu`; omit GPU-only parallel and offload flags. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu sglang serve --model-path robbyant/lingbot-world-v2-14b-causal-fast-diffusers --pipeline-class-name LingBotWorldCausalDMDPipeline +``` + ### Optional KV-Cache Compression Long-running sessions can enable lossy int4 PRQ compression for completed diff --git a/docs/cookbook/diffusion/LingBot-World/LingBot-World.mdx b/docs/cookbook/diffusion/LingBot-World/LingBot-World.mdx index e4670ff571..a69bc2b00d 100644 --- a/docs/cookbook/diffusion/LingBot-World/LingBot-World.mdx +++ b/docs/cookbook/diffusion/LingBot-World/LingBot-World.mdx @@ -43,6 +43,14 @@ sglang serve \ --text-encoder-cpu-offload false ``` + +Intel Xeon CPU deployment is supported with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu`; omit GPU-only parallel and offload flags. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu sglang serve --model-path robbyant/lingbot-world-fast-diffusers --pipeline-class-name LingBotWorldCausalDMDPipeline +``` + + ### Optional KV-Cache Compression Long-running sessions can enable lossy int4 PRQ compression for completed diff --git a/docs/cookbook/diffusion/LongLive/LongLive-2.0.mdx b/docs/cookbook/diffusion/LongLive/LongLive-2.0.mdx index 0d487172e7..a110cf9ab8 100644 --- a/docs/cookbook/diffusion/LongLive/LongLive-2.0.mdx +++ b/docs/cookbook/diffusion/LongLive/LongLive-2.0.mdx @@ -51,6 +51,12 @@ sglang serve \ `Rabinovich/LongLive-2.0-5B-Diffusers` is the Diffusers-format conversion of the official `Efficient-Large-Model/LongLive-2.0-5B` weights. +Intel Xeon CPU deployment is supported with `SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu` and the selected LongLive checkpoint. + +```bash Command +SGLANG_DIFFUSION_PLATFORM_OVERRIDE=cpu sglang serve --model-path Rabinovich/LongLive-2.0-5B-Diffusers +``` + ## 4. Generation ### 4.1 Single prompt diff --git a/docs/cookbook/diffusion/Qwen-Image/Qwen-Image.mdx b/docs/cookbook/diffusion/Qwen-Image/Qwen-Image.mdx index c26e8ca036..1f7fb31dae 100644 --- a/docs/cookbook/diffusion/Qwen-Image/Qwen-Image.mdx +++ b/docs/cookbook/diffusion/Qwen-Image/Qwen-Image.mdx @@ -34,7 +34,7 @@ This section provides deployment configurations optimized for different hardware ### 3.1 Basic Configuration -Qwen-Image is a text-to-image model. The recommended launch configurations vary by hardware. SGLang supports serving Qwen-Image on NVIDIA B200, B300, H200, H100, AMD MI300X, MI325X, MI355X GPUs and Ascend A2/A3 Series NPUs. +Qwen-Image is a text-to-image model. The recommended launch configurations vary by hardware. SGLang supports serving Qwen-Image on NVIDIA B200, B300, H200, H100, AMD MI300X, MI325X, MI355X GPUs, Intel Xeon CPUs, and Ascend A2/A3 Series NPUs. Use the [command builder](#1-quick-start) above. diff --git a/docs/cookbook/diffusion/Wan/Wan2.1.mdx b/docs/cookbook/diffusion/Wan/Wan2.1.mdx index 95fab54f8b..cbb983ecfa 100644 --- a/docs/cookbook/diffusion/Wan/Wan2.1.mdx +++ b/docs/cookbook/diffusion/Wan/Wan2.1.mdx @@ -34,7 +34,7 @@ This section provides deployment configurations optimized for different hardware ### 3.1 Basic Configuration -The Wan2.1 series offers models in multiple sizes and resolutions. SGLang supports Wan2.1 deployment on NVIDIA B200, B300, H200, H100, and AMD MI300X, MI325X, MI355X GPUs and Ascend A2/A3 Series NPUs. The recommended launch configurations vary by hardware, model size, and memory headroom. +The Wan2.1 series offers models in multiple sizes and resolutions. SGLang supports Wan2.1 deployment on NVIDIA B200, B300, H200, H100, AMD MI300X, MI325X, MI355X GPUs, Intel Xeon CPUs, and Ascend A2/A3 Series NPUs. The recommended launch configurations vary by hardware, model size, and memory headroom. Use the [command builder](#1-quick-start) above. diff --git a/docs/docs/hardware-platforms/cpu_server.mdx b/docs/docs/hardware-platforms/cpu_server.mdx index 6ac568698b..b8be8a69a3 100644 --- a/docs/docs/hardware-platforms/cpu_server.mdx +++ b/docs/docs/hardware-platforms/cpu_server.mdx @@ -123,7 +123,7 @@ cd python cp pyproject_cpu.toml pyproject.toml # Install SGLang dependent libs, and build SGLang main package uv pip install --upgrade pip setuptools -uv pip install . +uv pip install . # If installing sgl-diffusion, please use: uv pip install ".[diffusion]" # Build the CPU backend kernels cd sglang/kernels/aot @@ -148,7 +148,7 @@ Notes: - If you encounter code compilation issues during the `sgl-kernel` building process, please check your `gcc` and `g++` versions and upgrade them if they are outdated. - It is recommended to use `gcc-13` and `g++-13` as they have been verified + It is recommended to use `gcc-15` and `g++-15` as they have been verified in the official Docker container. - The system library path is typically located in one of the following directories: diff --git a/docs/scripts/tests/diffusion-builders.test.mjs b/docs/scripts/tests/diffusion-builders.test.mjs index 4c4967c53e..255fa284bd 100644 --- a/docs/scripts/tests/diffusion-builders.test.mjs +++ b/docs/scripts/tests/diffusion-builders.test.mjs @@ -130,10 +130,10 @@ test("legacy image hardware, precision and checkpoint choices remain available", const qwen = get("/Qwen-Image/Qwen-Image.mdx"); const edit = get("/Qwen-Image/Qwen-Image-Edit.mdx"); const zimage = get("/Z-Image/Z-Image-Turbo.mdx"); - assert.equal(flux.supportedHardware.length, 10); - assert.equal(qwen.supportedHardware.length, 9); - assert.equal(edit.supportedHardware.length, 7); - assert.equal(zimage.supportedHardware.length, 9); + assert.equal(flux.supportedHardware.length, 11); + assert.equal(qwen.supportedHardware.length, 10); + assert.equal(edit.supportedHardware.length, 8); + assert.equal(zimage.supportedHardware.length, 10); assert.ok(resolve(flux, { hw: "arc_b", version: "flux2-dev", gpus_per_node: 4 }).flags.includes("--tp-size 4")); assert.ok(resolve(flux, { hw: "a2", version: "flux2-dev", gpus_per_node: 2 }).flags.includes("--tp-size 2")); assert.ok( @@ -151,7 +151,7 @@ test("Wan preserves standard, multi-GPU, Ascend and LoRA recipes", () => { for (const version of ["1", "2"]) { const config = get(`/Wan/Wan2.${version}.mdx`); assert.equal(config.overlayDims.find((dim) => dim.id === "variant").options.length, 3); - for (const hw of config.supportedHardware.filter((id) => !["a2", "a3"].includes(id))) { + for (const hw of config.supportedHardware.filter((id) => !["a2", "a3", "xeon"].includes(id))) { const gpus = version === "2" && hw === "b300" ? 8 : 4; const result = resolve(config, { hw, gpus_per_node: gpus }); assert.deepEqual(result.builder.errors, []); diff --git a/docs/src/snippets/_deployment.jsx b/docs/src/snippets/_deployment.jsx index 77eea6061d..6c92d5479b 100644 --- a/docs/src/snippets/_deployment.jsx +++ b/docs/src/snippets/_deployment.jsx @@ -820,7 +820,8 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => { const modelName = resolveModelName(sel); if (cell.pd && cell.commands) return interpolate(cell.commands[mode] || cell.commands.python, envValues, modelName); const nnodes = cellNnodes(cell, sel); - const multinode = nnodes > 1; + // Xeon's "nodes" selector sizes --tp-size, not a real multi-machine launch. + const multinode = nnodes > 1 && sel.hw !== "xeon"; const cellEnv = [...(cell.env || []), ...overlayEnv(sel)]; const flags = overlayCompose(cell.flags, sel); if (multinode) { @@ -1330,9 +1331,21 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => { } } for (const [key, bounds] of Object.entries(commandBuilder.resource?.limits || {})) { + if (typeof bounds.disabledWhen === "function" && bounds.disabledWhen(out)) { + out[key] = bounds.disabledValue ?? 0; + continue; + } const fallback = Number(commandBuilder.defaultSelection?.[key] ?? bounds.min ?? 1); const value = Number.parseInt(out[key], 10); - out[key] = Math.min(bounds.max, Math.max(bounds.min, Number.isFinite(value) ? value : fallback)); + const values = typeof bounds.allowedValues === "function" + ? bounds.allowedValues(out) + : (bounds.allowedValues || []); + const bounded = Math.min(bounds.max, Math.max(bounds.min, Number.isFinite(value) ? value : fallback)); + out[key] = values.length + ? values.reduce((closest, candidate) => + Math.abs(candidate - bounded) < Math.abs(closest - bounded) ? candidate : closest, + values[0]) + : bounded; } for (const key of ["tp_size", "ulysses_degree", "ring_degree"]) { const value = Number.parseInt(out[key], 10); @@ -1662,9 +1675,15 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => { nodes: resourcesFollowPlatformDefault ? (nextRecipe?.nodes ?? next.nodes) : next.nodes, - gpus_per_node: resourcesFollowPlatformDefault - ? (nextRecipe?.gpus_per_node ?? next.gpus_per_node) - : next.gpus_per_node, + gpus_per_node: (() => { + const bounds = commandBuilder.resource?.limits?.gpus_per_node; + if (typeof bounds?.disabledWhen === "function" && bounds.disabledWhen(next)) { + return bounds.disabledValue ?? 0; + } + return resourcesFollowPlatformDefault + ? (nextRecipe?.gpus_per_node ?? next.gpus_per_node) + : next.gpus_per_node; + })(), topology_mode: "auto", tp_size: resourcesFollowPlatformDefault ? (nextRecipe?.tp_size ?? 1) @@ -1711,11 +1730,12 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => { commit(value); }; - const renderBuilderNumberInput = ({ identity, value, min, max, label, onCommit }) => ( + const renderBuilderNumberInput = ({ identity, value, min, max, label, disabled, onCommit }) => ( { if (!commandBuilder) return; const bounds = commandBuilder.resource?.limits?.[key] || { min: 1, max: 8 }; setSel((prev) => { - const value = Math.min(bounds.max, Math.max(bounds.min, Number(prev[key]) + delta)); + if (typeof bounds.disabledWhen === "function" && bounds.disabledWhen(prev)) return prev; + const values = typeof bounds.allowedValues === "function" + ? bounds.allowedValues(prev) + : (bounds.allowedValues || []); + const current = Number(prev[key]); + const value = values.length + ? values[Math.max(0, Math.min(values.length - 1, + values.findIndex((candidate) => candidate === current) + delta))] + : Math.min(bounds.max, Math.max(bounds.min, current + delta)); return normalizeBuilderSelection({ ...prev, [key]: value, topology_mode: "auto" }); }); }; @@ -1748,11 +1776,22 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => { const value = Number.parseInt(rawValue, 10); if (!Number.isFinite(value)) return; const bounds = commandBuilder.resource?.limits?.[key] || { min: 1, max: 8 }; - setSel((prev) => normalizeBuilderSelection({ + setSel((prev) => { + if (typeof bounds.disabledWhen === "function" && bounds.disabledWhen(prev)) return prev; + const values = typeof bounds.allowedValues === "function" + ? bounds.allowedValues(prev) + : (bounds.allowedValues || []); + const bounded = Math.min(bounds.max, Math.max(bounds.min, value)); + return normalizeBuilderSelection({ ...prev, - [key]: Math.min(bounds.max, Math.max(bounds.min, value)), + [key]: values.length + ? values.reduce((closest, candidate) => + Math.abs(candidate - bounded) < Math.abs(closest - bounded) ? candidate : closest, + values[0]) + : bounded, topology_mode: "auto", - })); + }); + }); }; const editBuilderTopology = (key, value) => { @@ -1977,6 +2016,7 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => { const renderStepper = (key, label, detail) => { const bounds = commandBuilder.resource?.limits?.[key] || { min: 1, max: 8 }; + const disabled = typeof bounds.disabledWhen === "function" && bounds.disabledWhen(sel); return (
@@ -1987,7 +2027,7 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => { {renderBuilderNumberInput({ @@ -1996,12 +2036,13 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => { min: bounds.min, max: bounds.max, label, + disabled, onCommit: (value) => setBuilderResource(key, value), })}
@@ -2297,7 +2338,11 @@ export const Deployment = ({ config, benchmarks, agenticLink }) => {
diff --git a/docs/src/snippets/autoregressive/deepseek-ocr-deployment.jsx b/docs/src/snippets/autoregressive/deepseek-ocr-deployment.jsx index bdf9e36819..152e396f00 100644 --- a/docs/src/snippets/autoregressive/deepseek-ocr-deployment.jsx +++ b/docs/src/snippets/autoregressive/deepseek-ocr-deployment.jsx @@ -24,7 +24,8 @@ export const DeepSeekOCRDeployment = () => { type: 'checkbox', items: [ { id: 'tp', label: 'TP', subtitle: 'Tensor Parallel', default: true, required: true }, - { id: 'ep', label: 'EP', subtitle: 'Expert Parallel', default: false, disabledWhen: (v) => v.hardware === 'xeon', disabledReason: 'Intel Xeon CPUs only support Tensor Parallel (TP)' } + { id: 'dp', label: 'DP', subtitle: 'Data Parallel', default: false, disabledWhen: (v) => v.hardware !== 'xeon', disabledReason: 'This DP recipe is only available on Intel Xeon CPUs' }, + { id: 'ep', label: 'EP', subtitle: 'Expert Parallel', default: false, disabledWhen: (v) => v.hardware === 'xeon', disabledReason: 'Expert Parallel (EP) is not supported on Intel Xeon CPUs' } ] } }; @@ -94,6 +95,7 @@ export const DeepSeekOCRDeployment = () => { const generateCommand = () => { const { hardware, quantization, strategy } = values; const strategyArray = Array.isArray(strategy) ? strategy : []; + const tpSize = 1; // Validation checks // Check MI300X compatibility - MI300X + DeepSeek-OCR only supports FP16 quantization @@ -113,7 +115,11 @@ export const DeepSeekOCRDeployment = () => { // TP strategy if (strategyArray.includes('tp')) { - cmd += ` \\\n --tp 1`; + cmd += ` \\\n --tp ${tpSize}`; + } + + if (hardware === 'xeon' && strategyArray.includes('dp')) { + cmd += ` \\\n --dp ${tpSize}`; } // EP strategy diff --git a/docs/src/snippets/autoregressive/deepseek-r1-basic-deployment.jsx b/docs/src/snippets/autoregressive/deepseek-r1-basic-deployment.jsx index 3353074f78..055bd83f33 100644 --- a/docs/src/snippets/autoregressive/deepseek-r1-basic-deployment.jsx +++ b/docs/src/snippets/autoregressive/deepseek-r1-basic-deployment.jsx @@ -47,7 +47,7 @@ export const DeepSeekR1BasicDeployment = () => { type: 'checkbox', items: [ { id: 'tp', label: 'TP', subtitle: 'Tensor Parallel', default: true, required: true }, - { id: 'dp', label: 'DP', subtitle: 'Data Parallel', default: false, disabledWhen: (v) => v.hardware === 'xeon', disabledReason: 'Intel Xeon CPUs only support Tensor Parallel (TP)' }, + { id: 'dp', label: 'DP', subtitle: 'Data Parallel', default: false }, { id: 'ep', label: 'EP', subtitle: 'Expert Parallel', default: false, disabledWhen: (v) => v.hardware === 'xeon', disabledReason: 'Intel Xeon CPUs only support Tensor Parallel (TP)' }, { id: 'mtp', label: 'MTP', subtitle: 'Multi-token Prediction', default: false, disabledWhen: (v) => v.hardware === 'xeon', disabledReason: 'Intel Xeon CPUs do not support Multi-token Prediction' }, ], @@ -116,7 +116,13 @@ export const DeepSeekR1BasicDeployment = () => { command += isXeon ? ' \\\n --tp 6' : ' \\\n --tp 8'; } if (strategyValues.includes('dp')) { - command += ' \\\n --attn-dp-size 8'; + if(!isXeon) { + command += ' \\\n --attn-dp-size 8'; + } + else { + command += ' \\\n --dp 6'; + command += ' \\\n --enable-dp-attention'; + } } if (strategyValues.includes('ep')) { command += ' \\\n --ep 8'; diff --git a/docs/src/snippets/autoregressive/deepseek-v3-deployment.jsx b/docs/src/snippets/autoregressive/deepseek-v3-deployment.jsx index 4733499aa7..ee7aae4efb 100644 --- a/docs/src/snippets/autoregressive/deepseek-v3-deployment.jsx +++ b/docs/src/snippets/autoregressive/deepseek-v3-deployment.jsx @@ -37,7 +37,7 @@ export const DeepSeekV3Deployment = () => { type: 'checkbox', items: [ { id: 'tp', label: 'TP', subtitle: 'Tensor Parallel', default: true, required: true }, - { id: 'dp', label: 'DP', subtitle: 'Data Parallel', default: false, disabledWhen: (v) => v.hardware === 'xeon' }, + { id: 'dp', label: 'DP', subtitle: 'Data Parallel', default: false }, { id: 'ep', label: 'EP', subtitle: 'Expert Parallel', default: false, disabledWhen: (v) => v.hardware === 'xeon' }, { id: 'mtp', label: 'MTP', subtitle: 'Multi-token Prediction', default: false, disabledWhen: (v) => v.hardware === 'xeon' }, ] @@ -151,7 +151,14 @@ export const DeepSeekV3Deployment = () => { cmd += ` --model-path ${modelPath}`; if (strategyArray.includes('tp')) cmd += isXeon ? ' \\\n --tp 6' : ' \\\n --tp 8'; - if (strategyArray.includes('dp')) cmd += ' \\\n --attn-dp-size 8'; + if (strategyArray.includes('dp')) { + if(!isXeon) { + cmd += ' \\\n --attn-dp-size 8'; + } + else { + cmd += ' \\\n --dp 6 \\\n --enable-dp-attention'; + } + } if (strategyArray.includes('ep')) cmd += ' \\\n --ep 8'; if (strategyArray.includes('mtp')) { cmd += ' \\\n --speculative-algorithm EAGLE \\\n --speculative-num-steps 3 \\\n --speculative-eagle-topk 1 \\\n --speculative-num-draft-tokens 4'; diff --git a/docs/src/snippets/autoregressive/deepseek-v31-deployment.jsx b/docs/src/snippets/autoregressive/deepseek-v31-deployment.jsx index a60a3c0dbc..41412ca1f6 100644 --- a/docs/src/snippets/autoregressive/deepseek-v31-deployment.jsx +++ b/docs/src/snippets/autoregressive/deepseek-v31-deployment.jsx @@ -28,7 +28,7 @@ export const DeepSeekV31Deployment = () => { type: 'checkbox', items: [ { id: 'tp', label: 'TP', default: true, required: true }, - { id: 'dp', label: 'DP attention', default: false, disabledWhen: (v) => v.hardware === 'xeon' }, + { id: 'dp', label: 'DP attention', default: false }, { id: 'ep', label: 'EP', default: false, disabledWhen: (v) => v.hardware === 'xeon' }, { id: 'mtp', label: 'Multi-token Prediction', default: false, disabledWhen: (v) => v.hardware === 'xeon' } ] @@ -148,7 +148,14 @@ export const DeepSeekV31Deployment = () => { // TP is mandatory cmd += isXeon ? ` \\\n --tp 6` : ` \\\n --tp 8`; if (strategyArray.includes('dp')) { - cmd += ` \\\n --attn-dp-size 8`; + if(!isXeon){ + cmd += ` \\\n --attn-dp-size 8`; + } + else{ + cmd += ` \\\n --dp 6`; + cmd += ` \\\n --enable-dp-attention`; + } + } if (strategyArray.includes('ep')) { cmd += ` \\\n --ep 8`; diff --git a/docs/src/snippets/autoregressive/ernie-45-deployment.jsx b/docs/src/snippets/autoregressive/ernie-45-deployment.jsx index b024bb0aa5..2fa476e536 100644 --- a/docs/src/snippets/autoregressive/ernie-45-deployment.jsx +++ b/docs/src/snippets/autoregressive/ernie-45-deployment.jsx @@ -14,7 +14,8 @@ export const Ernie45Deployment = () => { items: [ { id: 'mi300x', label: 'MI300X', default: true }, { id: 'mi325x', label: 'MI325X', default: false }, - { id: 'mi355x', label: 'MI355X', default: false } + { id: 'mi355x', label: 'MI355X', default: false }, + { id: 'xeon', label: 'XEON', default: false } ] }, strategy: { @@ -23,8 +24,8 @@ export const Ernie45Deployment = () => { type: 'checkbox', items: [ { id: 'tp', label: 'TP', subtitle: 'Tensor Parallel', default: true, required: true }, - { id: 'dp', label: 'DP', subtitle: 'Data Parallel', default: false, disabledWhen: (values) => values.modelsize === '21b' }, - { id: 'ep', label: 'EP', subtitle: 'Expert Parallel', default: false, disabledWhen: (values) => values.modelsize === '21b' } + { id: 'dp', label: 'DP', subtitle: 'Data Parallel', default: false, disabledWhen: (values) => values.modelsize === '21b' || values.hardware === 'xeon' }, + { id: 'ep', label: 'EP', subtitle: 'Expert Parallel', default: false, disabledWhen: (values) => values.modelsize === '21b' || values.hardware === 'xeon' } ] } }; @@ -46,7 +47,12 @@ export const Ernie45Deployment = () => { let cmd = 'python3 -m sglang.launch_server \\\n'; cmd += ` --model-path ${modelPath}`; - const tpValue = modelsize === '300b' ? 8 : 1; + const isXeon = hardware === 'xeon'; + if (isXeon) { + cmd += ` \\\n --device cpu \\\n --disable-overlap-schedule`; + } + + const tpValue = isXeon ? 6 : (modelsize === '300b' ? 8 : 1); const dpValue = modelsize === '300b' ? 8 : null; const epValue = modelsize === '300b' ? 8 : null; @@ -54,11 +60,11 @@ export const Ernie45Deployment = () => { cmd += ` \\\n --tp ${tpValue}`; } - if (strategyArray.includes('dp') && modelsize === '300b') { + if (strategyArray.includes('dp') && modelsize === '300b' && !isXeon) { cmd += ` \\\n --attn-dp-size ${dpValue}`; } - if (strategyArray.includes('ep') && modelsize === '300b') { + if (strategyArray.includes('ep') && modelsize === '300b' && !isXeon) { cmd += ` \\\n --ep ${epValue}`; } diff --git a/docs/src/snippets/autoregressive/gemma4-deployment.jsx b/docs/src/snippets/autoregressive/gemma4-deployment.jsx index f285f55da0..a14ee4aa46 100644 --- a/docs/src/snippets/autoregressive/gemma4-deployment.jsx +++ b/docs/src/snippets/autoregressive/gemma4-deployment.jsx @@ -25,11 +25,13 @@ export const Gemma4Deployment = () => { getDynamicItems: (values) => { const size = values.modelSize; const showMI300X = size === '31b' || size === '26b-a4b'; + const showXeon = ['e2b', 'e4b', '31b', '26b-a4b'].includes(size); return [ { id: 'h200', label: 'H200', default: true }, { id: 'b200', label: 'B200', default: false }, { id: 'b300', label: 'B300', default: false }, { id: 'mi300x', label: 'MI300X', default: false, disabled: !showMI300X }, + { id: 'xeon', label: 'XEON', default: false, disabled: !showXeon }, { id: 'arc_b', label: 'BMG', default: false }, ]; } @@ -93,6 +95,12 @@ export const Gemma4Deployment = () => { '31b': { tp: 4, mem: 0.80 }, '26b-a4b': { tp: 4, mem: 0.75 }, }, + xeon: { + e2b: { tp: 1, mem: 0.9 }, + e4b: { tp: 1, mem: 0.9 }, + '31b': { tp: 4, mem: 0.5 }, + '26b-a4b': { tp: 2, mem: 0.5 }, + }, }; const generateCommand = (values) => { @@ -117,11 +125,14 @@ export const Gemma4Deployment = () => { const modelPath = `${modelNames[modelSize]}${qatSuffix}`; const mtpEnabled = values.speculative === 'enabled'; - if (mtpEnabled && modelSize === '26b-a4b' && hardware !== 'mi300x') { + if (mtpEnabled && modelSize === '26b-a4b' && hardware !== 'mi300x' && hardware !== 'xeon') { tp = 2; } let cmd = `sglang serve --model-path ${modelPath}`; + if (hardware === 'xeon') { + cmd += ` \\\n --device cpu \\\n --disable-overlap-schedule`; + } if (tp > 1) { cmd += ` \\\n --tp ${tp}`; } @@ -135,11 +146,15 @@ export const Gemma4Deployment = () => { }); if (mtpEnabled) { - cmd += ` \\\n --speculative-algorithm NEXTN`; - cmd += ` \\\n --speculative-draft-model-path ${modelPath}-assistant`; - cmd += ` \\\n --speculative-num-steps 5`; - cmd += ` \\\n --speculative-num-draft-tokens 6`; - cmd += ` \\\n --speculative-eagle-topk 1`; + if (hardware === 'xeon') { + cmd += ` \\\n --speculative-algorithm NGRAM`; + } else { + cmd += ` \\\n --speculative-algorithm NEXTN`; + cmd += ` \\\n --speculative-draft-model-path ${modelPath}-assistant`; + cmd += ` \\\n --speculative-num-steps 5`; + cmd += ` \\\n --speculative-num-draft-tokens 6`; + cmd += ` \\\n --speculative-eagle-topk 1`; + } } if (hardware === 'b300') { @@ -233,6 +248,9 @@ export const Gemma4Deployment = () => { next.checkpoint = 'standard'; next.speculative = 'disabled'; } + if (optionName === 'hardware' && value === 'xeon') { + next.checkpoint = 'standard'; + } return next; }); }; @@ -420,8 +438,17 @@ export const Gemma4Deployment = () => { values.hardware === 'arc_b' && option.name === 'speculative' && item.id !== 'disabled'; + const isXeonQatLocked = + values.hardware === 'xeon' && + option.name === 'checkpoint' && + item.id === 'qat'; + const isXeon12bLocked = + values.hardware === 'xeon' && + option.name === 'modelSize' && + item.id === '12b'; const isDisabled = Boolean( - item.disabled || isArcBModelLocked || isArcBCheckpointLocked || isArcBSpeculativeLocked + item.disabled || isArcBModelLocked || isArcBCheckpointLocked || + isArcBSpeculativeLocked || isXeonQatLocked || isXeon12bLocked ); return (