From afa63032ce0c61cbc97046335a971995d9183301 Mon Sep 17 00:00:00 2001 From: Aditya Sridhar Date: Mon, 17 Aug 2026 15:36:26 -0700 Subject: [PATCH] updating notebook with optional fixes --- .../recipes/train_dflash_cosmos3_nano.ipynb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/examples/speculative_decoding/recipes/train_dflash_cosmos3_nano.ipynb b/examples/speculative_decoding/recipes/train_dflash_cosmos3_nano.ipynb index 6c020bcdf01..904b6aa2a8a 100644 --- a/examples/speculative_decoding/recipes/train_dflash_cosmos3_nano.ipynb +++ b/examples/speculative_decoding/recipes/train_dflash_cosmos3_nano.ipynb @@ -249,6 +249,28 @@ " --overwrite\n" ] }, + { + "cell_type": "markdown", + "id": "pai-sglang-runtime-notes", + "metadata": {}, + "source": [ + "#### Native-video SGLang runtime notes\n", + "\n", + "The PAI path sends native video to SGLang. If the selected SGLang container does not include OpenCV, enable the worker's optional installation before running the compute cell:\n", + "\n", + "```bash\n", + "export INSTALL_OPENCV_HEADLESS=1\n", + "```\n", + "\n", + "For the pinned SGLang container on affected B200/Blackwell environments, use Triton multimodal attention:\n", + "\n", + "```bash\n", + "export SGLANG_EXTRA_ARGS=\"${SGLANG_EXTRA_ARGS:-} --mm-attention-backend triton_attn\"\n", + "```\n", + "\n", + "These are opt-in settings: leave them unset when the container already provides OpenCV or the default multimodal attention backend works on the allocated GPU.\n" + ] + }, { "cell_type": "code", "execution_count": null, @@ -259,6 +281,10 @@ "%%bash\n", "# Compute node: run a representative PAI shard slice in an existing Slurm GPU allocation.\n", "set -euo pipefail\n", + "# If the selected SGLang image lacks OpenCV for native-video decoding, uncomment:\n", + "# export INSTALL_OPENCV_HEADLESS=1\n", + "# On affected B200/Blackwell environments with the pinned SGLang image, uncomment:\n", + "# export SGLANG_EXTRA_ARGS=\"${SGLANG_EXTRA_ARGS:-} --mm-attention-backend triton_attn\"\n", "SPEC=\"$(cd .. && pwd)\"\n", ": \"${DATA_ROOT:?Run the Step 2 configuration cell before this cell.}\"\n", ": \"${MODEL_PATH:?Set MODEL_PATH and run Step 2 before this compute-node cell.}\"\n",