mudler / mudler/vllm.cpp

SPEC-REJECTION: implement stochastic speculative verification

Open
#1,507 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
423
Forks
53
Avg merge
20h 26m
Merged PRs (30d)
310

Description

Goal

Extend the shared SPEC-REJECTION verifier from greedy-only acceptance to the stochastic rejection-sampling contract required by DFlash2 and other probabilistic speculative decoders.

Current gap

The local RejectionSampler accepts drafts only when they equal the target argmax. Its API and runner call chain carry target logits plus draft token ids, but do not carry realized draft probabilities or logits q, request temperatures, deterministic per-request RNG state, or residual distribution sampling after rejection.

DFlash2 W4 requires a T>0 inverse-CDF proposal arm and a realized-q draft-logit cache consumed by lossless verification. Implementing that cache without a stochastic consumer would land dead code.

Scope

Write a committed prerequisite spec under the existing SPEC-REJECTION row, then implement the pinned-vLLM stochastic acceptance and residual-resampling path through the shared API, CPU reference, CUDA/device op, runner state, and production call chain. Preserve the existing greedy path byte-for-byte when temperature is zero.

Consumer

SPEC-DFLASH2 W4 / issue #1314 depends on this work before its full path walk and realized-q cache can land.

Integration

One pull request for the prerequisite spec and implementation, as recorded in .agents/developer-preferences.md. Local commits are authorized; push, PR creation, and merge are not.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing SPEC-REJECTION row and the Local RejectionSampler, then trace the shared API, CPU reference, CUDA/device op, runner state, and production call chain named in the scope. Read .agents/developer-preferences.md for the integration constraint. Done means the prerequisite spec is committed and the stochastic acceptance and residual-resampling path works while preserving the zero-temperature greedy path byte-for-byte.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
ai-infra-agents, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.