Skip to content

spark-server: SparkQwen 0.4.0 literal-dispatch convergence, tokenizer ids-only/large-encode, deferred-prefill slot fix (ported from Enntity) - #288

Closed
AzeezIsh wants to merge 14 commits into
port/sq-schedfrom
port/sq-misc
Closed

AzeezIsh wants to merge 14 commits into
port/sq-schedfrom
port/sq-misc

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Summary

The last pieces from the completeness audit of SparkQwen 0.4.0 against main. Ported from Enntity (AGPL-3.0, data-angel).

  • Literal-dispatch chain (baa93620b, 19bfc90bd, 0ce591b63, 6a1ccde4f, 318569b87, 17e5c92b0): grammar/state.rs, literal_xml.rs, engine_state.rs and first_token.rs are converged onto 0.4.0's versions.
  • Tokenizer: ATLAS_TOKENIZER_IDS_ONLY and ATLAS_LARGE_ENCODE_CONCURRENCY.
  • da4f716ae: free the worker slot when a deferred prefill fails.
  • Already on main in another shape, so not ported: 29132382e, f7ee11e26, 28611c003, cc716883b, a2ef4423d.

Test plan

  • spark-server bin tests 2974/0. clippy (with and without --tests) is clean.
  • Probes against 0.4.0's engine (expect union_check 16/16), rc16 identity against the parent, and BFCL ST-995. Running as job 1044.

Generated with Devin

data-angel and others added 14 commits October 31, 2026 08:37
…gates (0.4.0 ids_only/large_encode); grammar: take 0.4.0's state.rs + literal_xml.rs whole (converge the literal-dispatch chain)
When the setup broadcast of a deferred or queued first chunk failed, the head
freed its sequence but never sent the worker 0xFFFFFFF1, which the inline
path sends after a failed chunk; the worker could keep the slot and any
setup it had received.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit da4f716)
AzeezIsh added a commit that referenced this pull request Oct 31, 2026
…quired/named tool deferral, literal-XML fixes; ported from Enntity)

Pair-gated (#220): vs SparkQwen 0.4.0's engine union_check 15/16 (the stream-fence newline lands in #288), api_parity 26/26; rc16 C1/C8 identical to main, tools 21/21; BFCL ST-995 on the stack top 87.54 / 86.85 = main. CI green except the PR benchmark gate.
@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Pair gate result, so I'm holding this one as a draft. Against 0.4.0's engine on its spark config: lp_api_probe 13/13 and api_parity 26/26, but union_check 14/16, one worse than its parent.

On the fenced-XML-example prompt this head samples differently from 0.4.0: it writes a different XML dialect (<tool_calls><tool_call name=…><parameter name=…>), where 0.4.0 calls the tool in block mode and streams ```xml\n<tool_call>\n{json}` in stream mode. The literal-dispatch convergence is the suspect. I'm splitting it out: the tokenizer and deferred-prefill commits go to a separate PR, and the convergence gets fixed to match 0.4.0's masking before it's re-gated.

@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Superseded by #293 (the literal-dispatch part, re-cut on #290 with the double-escape fix) and #290 (the tokenizer and deferred-prefill part).

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.

2 participants