Skip to main content
skill CX Codex

jetson-speculative-decoding — Claude Code skill: faster Jetson token

A skill that adds EAGLE-3 or draft-model speculative decoding to a Jetson vLLM server when token generation is the slow part.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NVIDIA/skills --skill jetson-speculative-decoding -a claude-code
Open on GitHub

What jetson-speculative-decoding does

The skill edits a vLLM server you already run on Jetson: it appends --speculative-config to the vllm serve command from the jetson-llm-serve recipe. A small draft model proposes tokens, the target model verifies them in one forward pass, and per-token latency drops.

On Jetson the outcome depends on VRAM headroom, not on draft quality. That is why the skill allows EAGLE-3 on Thor and AGX Orin only, and tells you not to try it on Orin Nano or NX: there is rarely room for both target and draft, so startup ends in OOM. It suggests starting num_speculative_tokens at 5 on Thor and 3 on AGX Orin, and dropping --gpu-memory-utilization by about 0.05 against the non-speculative baseline. The gain shows up on single-stream or low-concurrency work, up to 2 requests; at 8 and above batched decode usually wins and the draft model just steals memory.

You need a baseline from jetson-llm-benchmark and either a published EAGLE-3 head or a small same-family draft model. After enabling it, the skill has you benchmark at --concurrency 1 before and after: if the gain is under 10%, or throughput regresses at concurrency 8, turn speculation off.

What it helps with

  • speed up token generation on a Jetson vLLM server when TTFT is fine
  • pick a speculative token count for Thor or AGX Orin
  • check whether a draft model earns back the VRAM it takes
  • free memory for the draft model without breaking server startup
  • roll back speculation when the benchmark shows a regression

Example prompts for the agent

  • Append --speculative-config with the eagle3 method to the vllm serve command from jetson-llm-serve and tune the speculative token count for Thor
  • Compare throughput_tok_s and tpot_ms_p50 at --concurrency 1 before and after enabling speculative decoding
  • Startup OOMs after I turned on speculation — what should I lower first?

How to install jetson-speculative-decoding

1Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill jetson-speculative-decoding -a claude-code

2Manually: put the files in place

~/.claude/skills/jetson-speculative-decoding/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/jetson-speculative-decoding/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about jetson-speculative-decoding

How do I install jetson-speculative-decoding in Claude?

Run npx skills add NVIDIA/skills --skill jetson-speculative-decoding -a claude-code. The skill lands in ~/.claude/skills/jetson-speculative-decoding/SKILL.md.

What does jetson-speculative-decoding do?

It adds speculative decoding to a Jetson vLLM server, using either an EAGLE-3 head or a small same-family draft model. It also sets rules for choosing the speculative token count and for verifying the change with a benchmark.

Which Jetson boards does it work on?

Thor and AGX Orin. Skip Orin Nano and NX: there is rarely enough free memory for both the target and draft model, and the server will OOM at startup. You also need a working jetson-llm-serve recipe and a jetson-llm-benchmark baseline.

Source text

SKILL.md · Apache-2.0
---
name: jetson-speculative-decoding
description: Add EAGLE-3 or draft-model speculative decoding to a Jetson vLLM server when TPOT is the bottleneck.
version: 0.0.1
license: "Apache-2.0"
metadata:
  author: "Jetson Team"
  tags: [jetson, llm, speculative-decoding]
  languages: [markdown]
  data-classification: public
---

# Jetson Speculative Decoding (vLLM)

Speculative decoding lets a small "draft" model propose tokens that the target model verifies in a single forward pass, reducing per-token latency. On Jetson, the win/loss is **dominated by VRAM headroom**, not by the draft quality. This skill encodes the parts an LLM won't already know.

## Purpose

Tune an existing Jetson vLLM deployment for faster token generation by appending the right `--speculative-config` and validating whether it improves single-stream decode speed.

## When to use

- TPOT/ITL is the bottleneck (TTFT is fine, output is just slow).
- Workload is single-stream or low-concurrency (≤2). Speculation usually loses at high concurrency.
- Jetson family is **Thor or AGX Orin**. Do **not** suggest EAGLE-3 on Orin Nano/NX — there is rarely enough VRAM headroom to host both target and draft, and you'll OOM at startup.

## When NOT to use

- High-concurrency serving (≥8): batched decode usually beats speculation; the draft model just steals VRAM.
- Models without a published EAGLE-3 head — do not train one ad-hoc as a "fix".
- After applying `jetson-inference-mem-tune` flags that already pushed `--gpu-memory-utilization` near the ceiling. Free at least ~2 GB first.

## Prerequisites

- A working vLLM server recipe from `jetson-llm-serve`.
- Enough memory headroom for the draft model or EAGLE-3 head in addition to the target model.
- A benchmark baseline from `jetson-llm-benchmark` before enabling speculation.
- A target model with a compatible EAGLE-3 head, or a small same-family draft model for the fallback path.

## Instructions

Append `--speculative-config` to the `vllm serve` command shown in `jetson-llm-serve`.

EAGLE-3 (preferred when a head is published for the target model):

```bash
--speculative-config '{
  "method": "eagle3",
  "model": "<eagle3-head-repo-id>",
  "num_speculative_tokens": 5,
  "draft_tensor_parallel_size": 1
}'
```

Draft-model (fallback — pair a small same-family model):

```bash
--speculative-config '{
  "method": "draft_model",
  "model": "<small-draft-model-repo-id>",
  "num_speculative_tokens": 4,
  "draft_tensor_parallel_size": 1
}'
```

### Jetson-specific tuning rules

- `num_speculative_tokens`: start at **5** on Thor, **3** on AGX Orin. Higher values pay off only if the draft acceptance rate is >0.6.
- Always pair with the same vLLM runtime path used by `jetson-llm-serve`: upstream vLLM 0.20+ (`vllm/vllm-openai:latest`) or validated native vLLM 0.20+ on Thor, upstream vLLM 0.20+ on Orin JetPack 7.2 / L4T r39+, or the NVIDIA-AI-IOT vLLM image on older Orin. Do not use an Orin NVIDIA-AI-IOT vLLM image on Thor. Older runtimes may lack EAGLE-3 or the current `--speculative-config` shape.
- Drop `--gpu-memory-utilization` by ~0.05 vs the non-speculative baseline to give the draft model headroom.

## How to verify it actually helped

1. Run `jetson-llm-benchmark` (vLLM path) at `--concurrency 1` **before and after** enabling speculation.
2. Acceptance: target ≥30% improvement in `throughput_tok_s` and ≥20% drop in `tpot_ms_p50` at concurrency 1.
3. If improvement is <10%, or `throughput_tok_s` regresses at concurrency 8, **disable** speculation. The draft model is costing more than it returns.

## Limitations

- Speculative decoding improves decode-heavy workloads; it does not reduce TTFT-dominated latency.
- High concurrency can erase the benefit because continuous batching already keeps the GPU busy.
- Orin Nano/NX usually lack enough memory headroom for both target and draft models.
- Acceptance rate and draft overhead are model-specific, so benchmark before and after instead of assuming a speedup.

## Error handling

- If vLLM rejects `--speculative-config`, verify that Thor and Orin JetPack 7.2 / L4T r39+ are using vLLM 0.20+ and that older Orin is using a JetPack-matched NVIDIA-AI-IOT vLLM image; then switch back to the non-speculative serving command if the runtime still rejects it.
- If startup OOMs, lower `--gpu-memory-utilization`, use a smaller draft, or disable speculation and hand off to `jetson-inference-mem-tune`.
- If benchmark throughput regresses, remove `--speculative-config`; a bad draft path is worse than no speculation.

## Hand off to

- `jetson-llm-benchmark` to quantify the change.
- `jetson-inference-mem-tune` if startup OOMs after enabling speculation.

## Source

vLLM speculative decoding docs and the [Jetson AI Lab GenAI tutorial](https://www.jetson-ai-lab.com/tutorials/genai-on-jetson-llms-vlms/).

© Jetson Team · Apache-2.0 · NVIDIA/skills

Similar skills

Everything for AI and ML →

From the same set194

jetson-customize-mgbe This skill renders the kernel-DT overlay that brings up an MGBE controller on Jetson Thor for 25G, 10G or 1G QSFP. Useful when the link stays down after a cold boot. CX Codex +1 1,100installs jetson-promote-image Copies overlay files and build artifacts into the staged BSP image so it is ready for flashing. It does not build or flash anything itself. CX Codex +1 1,100installs jetson-generate-kb Generates a markdown reference next to the active profile by inspecting the NVIDIA Jetson BSP and source tree. Handy after unpacking a BSP or editing target settings. CX Codex +1 1,100installs jetson-customize-clocks Prepares Jetson CPU, GPU and EMC clock changes before an image is flashed. Use it to lock rates, set ceilings, or change DVFS behaviour. CX Codex +1 1,100installs jetson-validate-image Validates NVIDIA Jetson BSP builds statically on disk or directly on the device. Catches kernel, initramfs, and module mismatches. CX Codex +1 1,100installs jetson-customize-pcie Configures individual PCIe controllers on a Jetson Thor or Orin custom carrier: enable, lane count, link speed. Changes land in a kernel-DT overlay. CX Codex +1 1,100installs jetson-customize-pinmux Parses a Jetson Orin or Thor pinmux XLSM and emits three BCT DTSIs, one entry per pin on a custom carrier. CX Codex +1 1,100installs jetson-print-bsp-info Inspects an unpacked Linux_for_Tegra BSP tree on a Linux host PC before flashing. Reports the L4T release version and rootfs state. CX Codex +1 1,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor