Modified lmsysorg/sglang:nightly-dev-cu13-20260924-ffac53d7 by
lovewin10. Not an official SGLang image.
The SGLang inside the base image is replaced by a newer SGLang source tree (upstream commit 1be97a0a63,
version 0.5.24.dev) that carries the V14 episodic memory: models whose directory names a V14
architecture are served with a memory that persists across requests. A fact told in one chat is answered
in a later, separate chat. CUDA graphs, the radix/prefix cache and EAGLE speculative decoding (MTP draft)
stay on; the entrypoint and the sglang serve command are the base image's, so a launch command written
for the base image runs unchanged apart from a writable /memory mount.
SGLang source. /sgl-workspace/sglang is the newer tree, installed as the base image installs it
(editable), with its dependencies: torch 2.14.1+cu130, flashinfer 0.7.3, sglang-kernel 0.4.10,
transformers 5.19.0.
V14 architectures. A V14 model directory keeps its backbone's checkpoint and adds memory options and remote code for Transformers. In SGLang its architecture is mapped to the native model when the configuration is loaded, so every engine feature of the native model applies. No model subclass, no architecture list is changed.
| V14 architecture | native SGLang model | memory in this image |
|---|---|---|
Qwen3_5V14ForConditionalGeneration, Qwen3_5V14ForCausalLM | Qwen3.5 dense | yes, tested on Qwen3.8-27B |
Qwen3_5MoeV14ForConditionalGeneration, Qwen3_5MoeV14ForCausalLM | Qwen3.5 MoE | yes, same code as dense; not run on real weights |
NemotronHV14ForConditionalGeneration, NemotronHV14ForCausalLM | Nemotron-H | yes, tested on Nemotron 3.5 Super VL 120B NVFP4 (text requests; requests with images, video or audio run without memory) |
GptOssV14ForCausalLM | GPT-OSS | loads with SGLANG_V14_MEMORY=0 only |
Qwen4ExpV14ForConditionalGeneration | Qwen4-Exp | loads with SGLANG_V14_MEMORY=0 only |
LFM3 V14 directories cannot be served: this SGLang has no LFM3 model.
The memory (sglang/srt/v14). The keys and values the attention layers compute are cut into events
and stored with, on hybrid models, a low-rank engram of the state each event leaves in the recurrent
layers (Gated DeltaNet, Mamba2). A request's prompt is read once to see what it asks for; the stored
events whose keys would take its attention are recalled (one decision for every layer and head), their
engrams are composed into the request's recurrent state, and the prompt is read again with the recalled
keys and values merged into the attention by log-sum-exp. While decoding the merge runs inside the CUDA
graphs over static per-request buffers. Events are written after prefill on a background thread;
generated tokens are not written.
Engine hooks (15 files of SGLang, 133 added lines; the backbones' algorithms are untouched): the FlashInfer backend can return the attention log-sum-exp, the model runner calls the memory around forwards and may run a prefill again, the recurrent layers hand over per-event states, the scheduler registers and releases requests, warm-up and health-check requests write nothing.
Converted model directories on the Hugging Face Hub (the original weights, with the memory options and the memory code added); each card has its launch command and what was measured:
docker run --rm -it --gpus all --ipc=host -p 8000:8000 `
-v "<folder containing the model>:/model:ro" `
-v "<folder for the memory store>:/memory" `
lovewin10/sglang-v14:nightly-dev-cu13-20260924-ffac53d7-v14 `
sglang serve --model-path /model/<V14 model directory> --trust-remote-code `
--host 0.0.0.0 --port 8000 --mem-fraction-static 0.78 --served-model-name EVE-27B `
--chat-template /model/<V14 model directory>/chat_template.jinja `
--reasoning-parser qwen3-thinking --tool-call-parser qwen3_coder `
--attention-backend flashinfer --linear-attn-backend triton --mamba-ssm-dtype float32 `
--speculative-algorithm EAGLE --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 `
--enable-linear-replayssm-spec --mamba-radix-cache-strategy extra_buffer_lazy `
--context-length 262144 --max-prefill-tokens 32768 --max-running-requests 8 `
--kv-cache-dtype fp8_e4m3 --max-mamba-cache-size 16
For Nemotron-H use the arguments of SGLang's cookbook page for the checkpoint (they differ from the Qwen ones
above); only the image, the model directory and the /memory mount change.
A V14 model directory is made from a checkpoint with the upgrade scripts of the V14 project
(examples/<architecture>_reinstatement_upgrade.py --link hardlink): the checkpoint's own config.json with
the architecture name, an auto_map and the memory options added, two code files, and links to the weights.
Environment variables:
SGLANG_V14_MEMORY=0 serves the model without memory, as the plain checkpoint.SGLANG_V14_MEMORY_HOME is the store directory (default /memory); one sub-directory per set of weights.SGLANG_V14_MAX_BUFFER_GB bounds the static decode buffers (default 24).SGLANG_V14_PROFILE=1 logs the time the memory spends in its eager sections (slows the server).SGLANG_V14_TRACE=1 logs every recall decision: the best votes, the events recalled, the events composed
into the recurrent states.One RTX PRO 6000 Blackwell (96 GB) under Docker Desktop, 2026-11-11. Every figure comes from running this
image as it is, each model starting on an empty store. The questions are few (six facts, four unrelated
questions, four concurrent chats, six corrected facts, six two-step questions): a functional check, not a
benchmark. Every statement and every question is a chat of its own. For comparison, the 27B without memory
(SGLANG_V14_MEMORY=0) answers none of the cross-chat facts, gives its first token after 0.09 to 0.30 s
and decodes the same three prompts at 50.2, 58.5 and 46.9 tokens/s.
Qwen3.8-27B (Qwen3_5V14ForConditionalGeneration, the serve arguments above)
| Check | Result |
|---|---|
| Ready | 772 s |
| CUDA graphs captured | draft decode, draft extend, draft prefill, target prefill, target verify |
| Prefill forwards in a graph | 150 / 158 (the other 8 are single-token prefills behind a cached prefix, which SGLang's own rule runs eagerly) |
| Decode and verify forwards in a graph | 63 / 63 |
| Prefix cache | 24 prefills served from it; 1984 tokens: 2.342 s cold, 0.513 s sent again after 15 s, 3.944 s sent right behind, waiting for the previous request to be stored |
| Speculative decoding (EAGLE, MTP draft) | mean accept length 2.93 |
| Facts told in one chat, asked in another | 6 / 6 |
| Unrelated questions | 4 / 4 |
| After 40 unrelated chats: facts | 6 / 6 |
| After them: unrelated questions | 4 / 4 |
| Four chats telling and asking at once | 4 / 4 |
| A fact in the middle of a 9442-token prompt, asked in a new chat | answered |
| A picture shown in one chat, asked about in a text-only chat | answered |
| Stream dropped by the client | server keeps answering |
| A fact corrected in a later chat, asked for its present value | 6 / 6 |
| Two facts from two chats needed for one answer | 3 / 6 |
| Wait for the first token (three short prompts, streamed) | 0.62, 0.79, 0.83 s |
| Decode speed (after the first token) | 42.2 tokens/s |
| Store | 205 events, 18763 tokens, 875.7 MB (251.3 MB of it state engrams) |
| Tracebacks | 0 |
Nemotron 3.5 Super VL 120B NVFP4 (NemotronHV14ForConditionalGeneration, the cookbook's single-GPU arguments with EAGLE)
| Check | Result |
|---|---|
| Ready | 711 s |
| CUDA graphs captured | draft decode, draft extend, target verify; none for the prefill: SGLang's rule for multimodal models |
| Prefill forwards in a graph | 0 / 176 |
| Decode and verify forwards in a graph | 107 / 107 |
| Prefix cache | 3 prefills served from it; 3634 tokens: 4.84 s cold, 0.361 s sent again after 15 s, 0.775 s sent right behind, waiting for the previous request to be stored |
| Speculative decoding (EAGLE, MTP draft) | mean accept length 3.17 |
| Facts told in one chat, asked in another | 5 / 6 |
| Unrelated questions | 4 / 4 |
| After 40 unrelated chats: facts | 5 / 6 |
| After them: unrelated questions | 4 / 4 |
| Four chats telling and asking at once | 4 / 4 |
| A fact in the middle of a 14812-token prompt, asked in a new chat | not answered |
| Stream dropped by the client | server keeps answering |
| A fact corrected in a later chat, asked for its present value | 0 / 6 (2 more answered the old value) |
| Two facts from two chats needed for one answer | 1 / 6 |
| Wait for the first token (three short prompts, streamed) | 0.47, 0.66, 0.63 s |
| Decode speed (after the first token) | 126.0 tokens/s |
| Store | 256 events, 21899 tokens, 622.0 MB (529.5 MB of it state engrams) |
| Tracebacks | 0 |
Qwen3.5-0.8B V14 directory with SGLANG_V14_MEMORY=0 (no memory)
| Check | Result |
|---|---|
| CUDA graphs captured | draft decode, draft extend, draft prefill, target prefill, target verify |
| Prefill forwards in a graph | 19 / 19 |
| Decode and verify forwards in a graph | 25 / 25 |
| Prefix cache | 3 prefills served from it; 1944 tokens: 0.066 s cold, 0.183 s sent again after 15 s, 0.058 s sent right behind |
| Speculative decoding (EAGLE, MTP draft) | mean accept length 2.04 |
| Facts told in one chat, asked in another | 0 / 3 |
| Unrelated questions | 0 / 4 (plus 4 only in the reasoning) |
| Wait for the first token (three short prompts, streamed) | 0.1, 0.1, 0.07 s |
| Decode speed (after the first token) | 358.6 tokens/s |
| Tracebacks | 0 |
flashinfer (as in the command above)
or fa3; with another one the server stops at startup and says so. TP, PP and DP attention must be 1.recall_while_decoding). The upgrade script turns it off for Nemotron-H:
measured on Nemotron 3.5 Super VL, a stored document that began by telling the reader how to answer was
recalled during every generation and the reply obeyed it, while the decisions taken on the prompt's
first reading were right. Qwen directories keep it on.recall_floor, recall_ratio in the model directory's memory options) were set on Qwen3.5-0.8B; on
the 27B no floor separates the best votes of unrelated questions (0.5 to 2.1) from the lowest vote of a
right answer (2.06), so they were left alone.recall_while_decoding off: the first reading of a prompt's
tokens decides, with no vote while decoding or after a re-reading. Measured so: cross-chat facts 5 of 6
(the paraphrased one is missed), corrected facts 0 of 6, two-step questions 1 of 6, and the fact inside a
14.8k-token document not recalled (vote 0.18, floor 0.29). With the later votes on, corrected facts were
4 of 6 but replies answered another stored question or acknowledged a recalled statement as if it had
just been said: better a miss than the wrong target./memory for each user or tenant whose memories must stay apart; delete the directory to forget./sgl-workspace/sglang (git status).Content type
Image
Digest
sha256:e47b4dbeb…
Size
19.5 GB
Last updated
about 3 hours ago
docker pull lovewin10/sglang-v14:nightly-dev-cu13-20260924-ffac53d7-v14