Search arXiv⌕ Search

arXiv subjects

Xinguang Xiao

Publications and source records attributed to Xinguang Xiao.

2 recordsLinked to original sources

Dynamic Processing During Generation: Quality Checking and Rewind in the LLM Inference Server

Serving-side components of LLM inference have so far targeted speed, leaving output quality to the model. We propose the Quality Checker (QC), a form of intelligent inference serving: while the large model generates, the server hands each paragraph to a checker and, depending on the verdict, continues, rewinds and rewrites, or ends the thinking phase. Rewind stores no snapshot: the server cancels the request and continues from the kept output, so the prefix cache leaves only tens to about a hundred tokens to recompute, with no scheduler change. We implement QC in SGLang and evaluate it on a character-level 27B model, with four conclusions. (1) Asking whether a response contains a hallucination does not work: all four checkers are near chance. (2) The server holds the complete session and should make the question narrow: rules do verbatim checks, and the checker only judges whether session facts are consistent. Asked this way, a 27B dense model without decision training gets every item right regardless of material length and placement, a decision-trained 35B-A3B is sensitive to placement, and neither 9B nor 122B-A10B is good enough. (3) Rewind needs a clue: in production cases where the model denies a tool that is in its tool list, rewriting with only a new random seed lowers the share of outputs still denying from 69% to 47%, while writing the checker's clue into the context brings it to 11%. (4) Repetition must also be asked narrowly: comparing the new paragraph pairwise with earlier ones raises AUC from 0.94-0.95 to 0.99, and rules plus ending the thinking phase when the budget runs out cut severe loops from 5.2% to 0.3%.

cs.CL↗

Latent Tools and Latent Context: Grounding Generation in Deterministic Sources

A generator's knowledge lives in its parameters, so knowledge that appeared after training or exists only inside an organization is out of its reach, and models often fabricate answers about it. We propose zmem, which lets the inference server supply deterministic sources during generation at the model's request. The model writes a search instruction on a line of its own in its thinking (a latent tool); the server executes it in place and writes the result as a page, which the generator itself encodes and which is mounted on all full-attention layers (latent context). The page is visible to all later tokens but never enters the sequence or the conversation, and generation is not interrupted. The document store uses an inverted literal index (1.2 ms per search over 312 MB; updates take effect at once), and pages are cached by content. On LD3, a byte-level hybrid-attention model, and on Qwen3.5-9B we find: (1) on private sources, correct answers rise from 3/16 and 0/12 without sources, every wrong answer fabricated, to 15/16 and 9/12, on par with source text in context and with prompts 10-14 times shorter; with self-issued searches the model answers 44/48 held-out questions on synthetic memos. (2) Pages encoded by the generator itself and mounted on all full-attention layers are partly readable without training and fully readable with a small LoRA. (3) Trusting pages mounted mid-thinking needs training, and on-policy preference training forms the habit of using sources. (4) Pages do not occupy the context: over 8 turns, prefill per turn drops from 2.7-2.9 s to 0.49 s, and a page cache hit cuts time to first token from 2.0 s to 0.23 s. On DeepSeek-V4-Flash, pre-mounted pages work without training and match source text in context with 13-19 times fewer dialogue tokens; with pages written into the KV mid-thinking, search-page QA reaches 47/61 versus 53/61 under prefix replay.

cs.CL↗