Skip to content

[Model] Add Clef-Flash support - #61308

Merged
Isotr0py merged 3 commits into
vllm-project:mainfrom
gty111:feat/clef-flash
Oct 13, 2026
Merged

Isotr0py merged 3 commits into
vllm-project:mainfrom
gty111:feat/clef-flash

Conversation

@gty111

@gty111 gty111 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Add native support for Cloudflare/clef-flash through /v1/systemone, reusing the Qwen3.5 backbone and the joint schema head introduced for Clef-Omni in #61064.

Claims

  • Automatically detect and load the separate joint schema head, scoring choice, noul, and score questions in one pooling request.
  • Support text/JSON, images, and videos sampled at 2 fps. Match the release's fixed prompt, media separators, schema spans, and 16K truncation.
  • Share the head/pooler between Clef-Flash and Clef-Omni. Flash rejects audio inputs and ignores video soundtracks.

Validation

Compared the full checkpoint at revision 8b2e5fd17c09fd49bc2880b805d5323ec7ff4ff3 against the release's joint_schema_model.py in BF16. Ten model inputs covered invoice decisions, Unicode/empty instructions, a state truncated to 16K, one/two images, video, and image+video. Prompt token IDs and question/option spans matched the reference exactly in all ten cases.

Each mode ran the ten inputs once sequentially and twice at concurrency 4:

Mode Requests Highest-probability option matches Max absolute probability difference
Eager 30 57/57 0.001508
Default compile 30 57/57 0.000863

The four invoice threshold labels were correct in every repetition (12/12 per mode). These are synthetic model correctness checks. Probability normalization and input-token counts also matched; output-token counts were zero.

The reference evaluation used encode_record, collate_records, and load_release_model(..., attn_implementation="sdpa"), comparing each question's softmax probabilities against /v1/systemone responses. Serve the model with:

vllm serve Cloudflare/clef-flash \
  --served-model-name clef-flash --dtype bfloat16 \
  --max-model-len 16384 --max-num-batched-tokens 512 --max-num-seqs 8
# Add --enforce-eager for the eager comparison.

Details

The checkpoint advertises Qwen3_5ForConditionalGeneration and supplies joint_head_config.json plus joint_head.safetensors. Architecture conversion detects that head, and the Flash wrapper uses the output embedding table for lexical option features, matching the reference implementation.

The existing Clef head/pooler is moved unchanged into clef_joint_schema.py. Flash shares the joint schema strategy's typed answers and span/truncation logic, with its own media rendering for adjacent placeholders and a single trailing newline.

Duplicate checks found no open Clef-Flash support PR. #61064 supports Clef-Omni; the other open Clef-related PRs concern API/frontend behavior.

Model comparisons cover BF16 with TP=1. Multi-GPU configurations, quantization, and the full Clef checkpoint were not evaluated.

AI assistance (Codex) was used to implement and validate this model support.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
@mergify

mergify Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--61308.org.readthedocs.build/en/61308/

@mergify mergify Bot added documentation Improvements or additions to documentation frontend pooling multi-modality Related to multi-modality (#4194) new-model Requests to new models labels Oct 13, 2026
Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@ZJY0516 ZJY0516 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 13, 2026
@Isotr0py
Isotr0py enabled auto-merge (squash) October 13, 2026 03:07
@Isotr0py

Copy link
Copy Markdown
Member

/ci run --allow-stale

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #94363 for commit 2591dfdc36be.

⚠️ This PR is 5 commits behind upstream main. Running CI at your own risk because --allow-stale was requested; outdated CI configuration may cause failures. Before merging, merge or rebase onto the latest main, then rerun /ci run on the latest PR commit.

@Isotr0py
Isotr0py disabled auto-merge October 13, 2026 03:14
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
@Isotr0py
Isotr0py enabled auto-merge (squash) October 13, 2026 04:05
@Isotr0py

Copy link
Copy Markdown
Member

/ci run --allow-stale

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #94373 for commit feba86ccfe27.

⚠️ This PR is 6 commits behind upstream main. Running CI at your own risk because --allow-stale was requested; outdated CI configuration may cause failures. Before merging, merge or rebase onto the latest main, then rerun /ci run on the latest PR commit.

@vllm-agent

Copy link
Copy Markdown
Collaborator

CI selector (shadow): 27 test steps (60 jobs) instead of 68 (100 jobs)

Shadow mode: this changes nothing about what CI runs. It shows what the evidence-based selector would pick for this PR, next to today's rules. How it works.

Feedback welcome: reply here if it would skip a step this change needs, or runs something unrelated.

steps (jobs) Today's rules Selector Would skip Would add
NVIDIA, CPU and others 68 (100) 27 (60) 46 (53) 5 (13)
AMD mirrors 62 (89) 18 (41) 47 (54) 3 (6)
Selector would run (27)
  • arm-cpu-test ×3
  • basic-models-test-other-cpu
  • basic-models-tests-extra-initialization ×14
  • basic-models-tests-initialization
  • basic-models-tests-other
  • cpu-language-generation-and-pooling-model-tests ×3
  • cpu-multi-modal-model-tests-n ×4
  • cpu-multimodal-config
  • cpu-params-env-tokenizers-parser
  • cpu-reasoning-renderers
  • distributed-model-tests-2-gpus ×3
  • engine
  • entrypoints-integration-api-server-generate
  • entrypoints-integration-speech_to_text
  • language-models-tests-extra-standard ×2
  • language-models-tests-granite-l4-compatibility
  • language-models-tests-hybrid ×2
  • language-models-tests-standard
  • multi-modal-models-standard-1-qwen2
  • multi-modal-models-standard-4-other-whisper
  • multi-modal-processor ×4
  • multi-modal-processor-cpu ×4
  • pipeline-context-parallelism-4-gpus
  • quantization ×4
  • rayexecutorv2-4-gpus
  • v1-metrics-lmeval
  • v1-others-cpu
Would skip (today's rules run them) (46)
  • amd-lm-eval-small-models-harness
  • amd-qwen3-next-mtp-async-eplb-accuracy
  • ascend-npu-test
  • async-engine-inputs-utils-worker
  • basic-correctness ×2
  • basic-correctness-cpu-offload
  • basic-correctness-cumem
  • basic-correctness-prefetch-offload
  • basic-correctness-sleep-mode
  • benchmarks-cli-test
  • cpu-tool-parsers
  • entrypoints-integration-api-server ×4
  • entrypoints-integration-api-server-openai-chat_completion
  • entrypoints-integration-api-server-openai-completion
  • entrypoints-integration-llm
  • entrypoints-integration-multimodal
  • entrypoints-integration-pooling
  • entrypoints-integration-responses-api
  • entrypoints-unit-tests
  • examples
  • fusion-e2e-quick-h100
  • fusion-e2e-tp2-b200
  • fusion-e2e-tp2-quick-h100
  • jit-monitor-no-runtime-jit
  • kernels-fla-ops-test-b200
  • kernels-mhc-test-b200
  • kernels-root-misc-test-b200
  • metrics-tracing-2-gpus
  • model-executor
  • multi-modal-models-standard-2-qwen3-gemma
  • multi-modal-models-standard-3-llava-qwen2-vl
  • pytorch-compilation-dynamic-shapes
  • pytorch-compilation-passes-unit-tests
  • pytorch-compilation-unit-tests
  • pytorch-compilation-unit-tests-h100
  • pytorch-fullgraph-cudagraph-l4-compatibility
  • pytorch-fullgraph-test
  • regression
  • rl-entrypoints-tests
  • v1-core
  • v1-executor-worker
  • v1-kv-connectors ×4
  • v1-kv-offload
  • v1-logits-oracle
  • v1-sample
  • v1-spec-decode
Would add (today's rules do not run them) (5)
  • arm-cpu-test ×3 (code map)
  • cpu-multi-modal-model-tests-n ×4 (code map)
  • engine (code map)
  • quantization ×4 (code map)
  • rayexecutorv2-4-gpus (code map)
AMD mirrors: would skip (47)
  • async-engine-inputs-utils-worker
  • basic-correctness ×2
  • basic-correctness-cpu-offload
  • basic-correctness-cumem
  • basic-correctness-prefetch-offload
  • basic-correctness-sleep-mode
  • benchmarks-cli-test
  • entrypoints-integration-api-server ×4
  • entrypoints-integration-api-server-openai-chat_completion
  • entrypoints-integration-api-server-openai-completion
  • entrypoints-integration-llm
  • entrypoints-integration-multimodal
  • entrypoints-integration-pooling
  • entrypoints-integration-responses-api
  • entrypoints-unit-tests
  • examples
  • extract-hidden-states-integration-2-gpus
  • fusion-e2e-quick-h100
  • fusion-e2e-tp2-ar-rms-config-sweep-h100
  • fusion-e2e-tp2-b200
  • fusion-e2e-tp2-quick-h100
  • jit-monitor-no-runtime-jit
  • kernels-fla-ops-test-b200
  • kernels-mhc-test-b200
  • kernels-root-misc-test-b200
  • lm-eval-small-models
  • metrics-tracing-2-gpus
  • model-executor
  • mrcr-eval-small-models
  • multi-modal-models-standard-2-qwen3-gemma
  • multi-modal-models-standard-3-llava-qwen2-vl
  • platform-tests
  • pytorch-compilation-dynamic-shapes
  • pytorch-compilation-passes-unit-tests
  • pytorch-compilation-unit-tests
  • pytorch-compilation-unit-tests-h100
  • pytorch-fullgraph-cudagraph-l4-compatibility
  • pytorch-fullgraph-test
  • regression
  • rl-entrypoints-tests
  • v1-core
  • v1-executor-worker
  • v1-kv-connectors ×4
  • v1-kv-offload
  • v1-logits-oracle
  • v1-sample
  • v1-spec-decode
AMD mirrors: would add (3)
  • engine (code map)
  • quantization ×4 (code map)
  • rayexecutorv2-4-gpus (code map)

11 changed files · base c6566bb9f6 · head feba86ccfe · Python record: build 93039 at 1e5d0ea888 · kernel record: table fe341a5 (build 94315), map fe341a5 · not counted: 11 build steps, 5 A100 steps the generator no longer emits, 12 optional steps the selector would also run

@Isotr0py
Isotr0py merged commit 380638a into vllm-project:main Oct 13, 2026
167 of 168 checks passed
AndreasKaratzas pushed a commit to AndreasKaratzas/vllm that referenced this pull request Oct 16, 2026
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Isotr0py <Isotr0py@outlook.com>

Signed-off-by: Andreas Karatzas <AndreasKaratzas@users.noreply.github.com>
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Isotr0py <Isotr0py@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation frontend multi-modality Related to multi-modality (#4194) new-model Requests to new models pooling ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants