Skip to content

Add --constrained and --engine-samples for the engine perf branches - #10

Merged
mmastrac merged 1 commit into
mainfrom
engine-perf-flags
Sep 24, 2026
Merged

mmastrac merged 1 commit into
mainfrom
engine-perf-flags

Conversation

@mmastrac

Copy link
Copy Markdown
Owner

Adds the server side of two vLLM changes that are still open. Both come from the fork branches that the djev-spark image builds on:

flag engine change effect
--constrained vllm-project/vllm#58216 (diffusion_constrained) label reads run the unembedding, sampler and self-conditioning over the labels only. The argmax is unchanged. label_mass is always 1
--engine-samples vllm-project/vllm#58438 (diffusion_samples) a fixed samples: N goes out as one request that fans into N seeded noise draws, instead of N separate requests. --max-samples caps N

Both flags are off by default. The fork's example server turns them on, but stock vLLM returns 400 when a diffusion request sets seed. Stock vLLM ignores diffusion_constrained.

The patch is the fork's example-server diff, which applied cleanly, with the two defaults flipped. one_read, one_read_continuation and read_many now return one distribution list per draw. diagnostics.timing gains requests.

Measured on a GB10 with the djev-spark stack, flags on against off, same engine: +8–9% req/s with 1 sample, +33–50% with 4 samples.

This PR does not overlap #9, which changes only the chat and tool-choice path.

🤖 Generated with Claude Code

Ports the example server's side of two open vLLM changes, from the fork's
constrained-vocab (vllm#58216) and diffusion-samples (vllm#58438) branches:

- --constrained sends diffusion_constrained on every label read, so the
  engine runs the unembedding, sampler and self-conditioning over the
  labels only.
- --engine-samples sends a fixed sample count as one diffusion_samples
  request with a seed, and reads one choice per draw. --max-samples caps
  the count.

Both are opt-in, unlike the fork's example server, because a stock vLLM
rejects seed on a diffusion request. The read path now returns one
distribution list per draw, and diagnostics.timing gains "requests".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant