Brings in 139 upstream commits: the Qwen3.6-35B-A3B model (ModelGeometry from the file's own metadata, native experts IQ3_XXS/Q5_K/Q6_K, dense split-K attention, the GDN gate per model, the MTP drafter, native packs through the verify window), the VRAM/RAM planner with --vram-cap/--ram-cap, the fat-binary CUDA build, and the front-end fixes (content streaming, preserve_thinking, the engine's actual context, /health tiers).
Conflicts resolved:
- Makefile: kept upstream's CUDA_ARCHS default and the drop-unsupported-arch logic (fixes the compute_120 build on this toolkit) and kept the local PASCAL=1 override.
- README.md: kept both the local --fit-max-tokens row and upstream's engine-flag row.
- frontend/main.cpp: kept the local --fit-max-tokens option beside upstream's --vram-cap/--ram-cap.
The branch took f07b81e from main but not 121d23a, so a build of the branch
answered 500 "prompt (N tokens) + max_new (M) exceeds the context" to every
request without max_tokens, and to any with max_tokens at or above
context - prompt - 7, on Flash-Next and on Qwen3.6 alike. The hunk in
frontend/main.cpp is main's, unchanged.
tests/python/serve_max_tokens_check.py (make test-serve PORT=...) sends five
such requests to a running server: 0 of 5 before, 5 of 5 after, on
Flash-Next at 196,608 and on Qwen3.6 Q4_K_XL at 262,144 (RTX 4090).
REGINA-112.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
Compiles CMAKE_CUDA_ARCHITECTURES=61 and passes -DSTRATA_EXPERIMENTAL_SM60=ON,
with an early error when nvcc is 13+ (which dropped sm_60/sm_70). Default
build is unchanged.
CUDA_ARCHS defaults to 61;70;75;86;89;120 (STRATA_EXPERIMENTAL_SM60 follows
from the 61 / 70 as before). The list is filtered against `nvcc
--list-gpu-arch` with a note for what is dropped, so the default builds on
CUDA 12.4 (no 120: VM 221 built 61;70;75;86;89 in 6 min 17 s at -j 14) and
on CUDA 13 (no 61 / 70) alike; without nvcc on the PATH the list is kept
as given. `make build CUDA_ARCHS=61` is unchanged.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
REGINA-104 (a Qwen3.6 tool call dropped when its required parameter is not
written first) was upstream's required-first rule running unpatched: the
any-argument-order patch was applied only by `make build`, and every VM tree
of the port was configured with cmake directly, on a copied submodule.
Qwen3.6's template routes to the Qwen3-Coder parser the patch covers, so
CMake now applies it when third_party/llama.cpp is configured (patch -p1 -N,
a reverse dry run first so an applied tree is a no-op; a tree the patch does
not fit fails the configure instead of building the wrong parser). Verified:
a fresh submodule checkout reports the patch applied and a second configure
says nothing; on VM 221 the rebuilt libllama-common parses `limit offset
path`, `offset path limit`, `path limit offset` and `path` on
Qwen3.6-35B-A3B-UD-IQ3_XXS.gguf (make test-chat-parser PASS).
`make build` also passes -DSTRATA_MMQ_KQUANTS=ON: the Q4_K_XL file's Q6_K
down experts take the MMQ prompt path (docs/qwen36-port/step3-experts.md),
which that option builds.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
generate.cpp: every cudaMemGetInfo the planners read goes through vram_info, which clamps the free
figure to cap - used under --vram-cap MIB; a blocker of total - cap is allocated before the weight
arena. --ram-cap GIB bounds the RAM tier (host_available_memory is clamped, the resident budget
too) and the pinned arena. A model whose architecture has no per-layer token embedding starts
without --ple-gguf (no PLE kernels selected, and session.cpp carves no PLE history for it). For a
qwen35moe file the start reads the geometry, checks the pack's layout against it, makes the 4.2
plan from this card's free VRAM and the file's own census (non-expert weights, the draft block,
KV per token in the chosen format, the session, the reserve, the prompt buffers unless prefill
borrows), prints the three tiers, and stops at the step 2 gate naming the steps not done. The
serve loop answers STATS with one JSON line: experts, VRAM slots and how many hold an expert, RAM
copies, mapped experts, tokens served, VRAM hits of lookups, RAM-copy and file reads, warm hints,
and the major page faults since start (the disk-read proxy); the same line is logged at start.
frontend: /health carries that line as "tiers" (the last reading, marked stale, during a request);
--vram-cap and --ram-cap pass through; a one-file model needs no second shard. Makefile: any
CUDA_ARCHS entry below 75 switches STRATA_EXPERIMENTAL_SM60 on (make build CUDA_ARCHS=61).
Not compiled yet: the CUDA translation units need the VM (its sweep is running); this commit is
checked on the VM in the Pascal build commit that follows.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
Images: --mmproj PATH loads the Qwen3.8 Flash-Next projector through llama.cpp's mtmd
library and encodes image_url parts on the CPU (frontend/vision.hpp). The embeddings go to
the engine as a GENI request, its existing vision path, with the prompt's <|image_pad|>
runs standing in for each image. --vision-tokens caps the tokens per image. GET /v1/models
lists "image" under input_modalities when the encoder is loaded. Checked on an RTX 4090:
screenshots, photos, several images in one message, and pi's file attachments and
clipboard paste.
Engine process: the engine is started and watched from frontend/engine.hpp; when it exits
or its stall watchdog fires, the front end exits too, for a supervisor to restart. Stall
reports add the current stage and thread wait channels. Reasoning streams; content and
tool calls are sent once the whole message is parsed, so partial JSON never changes
arguments already sent.
Tests: make test-frontend (child exit, protocol, backpressure; no model needed) and
make test-chat-parser MODEL=<gguf> (template and tool-call parsing against the real GGUF).
The image path and the supervision were written by a Codex session; this commit finishes,
documents and checks them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
llama.cpp's Qwen3-Coder grammar takes a tool call's required arguments first and
the optional ones after. Qwen3.8 Flash-Next often writes the optional ones first
(limit, offset, path), and because the grammar's tool-call group is optional and
has no end anchor, such a call parsed as no call at all: no error, finish_reason
"stop", an empty answer. A coding agent sees its turn end after it announced the
call.
The grammar now accepts the arguments in any order; whether a required one is
missing is for the tool to report. The change is kept as a patch under patches/
that `make build` applies to the submodule. The front end logs the raw output
when it contains <tool_call> but no call was parsed, so the next case of this is
visible in the journal.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
unbiased-strata is the engine plus a front end. Started normally it runs
the front end, which starts a copy of itself as the engine (--engine) and
talks to it over a pipe in the engine's own line protocol, as upstream's
Python server does. The engine source is included unchanged; only its
entry point is renamed at compile time.
Tokenizer, Jinja chat template and HTTP library come from the pinned
llama.cpp submodule. Endpoints: POST /v1/chat/completions (with
streaming and reasoning_content), GET /v1/models, GET /health.
Builds on the RTX 3090 pod. Not yet verified end to end.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ggml now comes from third_party/llama.cpp (commit 3cf03257, the one upstream
pins) instead of a clone made during the build. 'make build' configures and
builds the engine for RTX 30/40/50 cards with an AVX2 CPU baseline.
Not yet verified on a CUDA machine.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>