Repository navigation
[Model] Add Clef-Flash support - #61308
Conversation
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Tianyu Guo <guoty@inferact.ai>
|
Documentation preview: https://vllm--61308.org.readthedocs.build/en/61308/ |
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Tianyu Guo <guoty@inferact.ai>
|
/ci run --allow-stale |
|
✅ Triggered Buildkite CI #94363 for commit
|
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
|
/ci run --allow-stale |
|
✅ Triggered Buildkite CI #94373 for commit
|
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.
Selector would run (27)
Would skip (today's rules run them) (46)
Would add (today's rules do not run them) (5)
AMD mirrors: would skip (47)
AMD mirrors: would add (3)
11 changed files · base |
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>
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>
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
choice,noul, andscorequestions in one pooling request.Validation
Compared the full checkpoint at revision
8b2e5fd17c09fd49bc2880b805d5323ec7ff4ff3against the release'sjoint_schema_model.pyin 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:
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, andload_release_model(..., attn_implementation="sdpa"), comparing each question's softmax probabilities against/v1/systemoneresponses. 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_5ForConditionalGenerationand suppliesjoint_head_config.jsonplusjoint_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-checklistskill. (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.