Repository navigation
NeuroBrix 0.6.9
NeuroBrix 0.6.9
With nbxtensor 0.1.3 unchanged: a served mixture-of-experts model answers every turn of a conversation, and the server
reads GLM's and Mistral's tool calls, renders chat templates as their vendors do and answers each streamed request with
its own status.
Added
- Two more tool-call formats in the server: GLM's and Mistral's. A model whose chat template writes
<tool_call>NAME<arg_key>…</arg_key><arg_value>…</arg_value></tool_call>(GLM-4.7-Flash) or
[TOOL_CALLS]NAME[ARGS]{…}(Devstral Small 2) now has its calls returned astool_calls, streamed or not. Each
format is read from the template's own markers, as before. A forced call (tool_choice: "required"or a named
function) is written in the form the parser reads back. Mistral's[ARGS]is a special token in its tokenizer, and
the decode keeps it. A call that does not read as one is kept incontent, whole. Tested against each vendor's own
template: a call it writes reads back the same. After a thinking model's reasoning, a forced call or a JSON answer
now starts with what the model's own template writes there (nothing for GLM-4.7-Flash; the two new lines of Qwen3's
templates, as before), read from the template. The models themselves join the catalogue when their
containers are built.
Changed
- A streamed request that stops before its first token answers with its own status. The OpenAI-compatible server
opens the event stream with its first event; an error before it is a plain JSON error with its status (500for an
engine error). An error after tokens have streamed is an event in the stream, as the protocol requires. - A served mixture-of-experts model answers every turn of a conversation. When its experts stream from host memory
(one card too small to hold them all, e.g. Qwen3-Coder-30B-A3B on one 32 GB card), the server sees every change the
decode made to the card's experts before a turn is read. Measured on a five-turn conversation: the answers are
byte-identical to the same server run without its fast decode path. - A chat template renders the prompt its model was trained on. Templates render in the environment their vendor's
reference uses:tojsonasjson.dumps(characters as written,ensure_ascii=Falsehonoured, as GLM-4.7-Flash's
template passes it), the keys in the order the request gave them,{% break %}and{% continue %}as tags. A
request's tool schemas and past calls reach the model as sent. The renderer is sandboxed: a template is data inside a
container, and it reaches no Python object. Measured on the catalogue's 17 chat templates over one conversation with
tools: 8 render differently from 0.6.8 and all 17 render; with no tools, all 17 render byte-identically. The new
environment with 0.6.8's filter put back gives 0.6.8's text exactly, in all 34 renders, so the filter is the only
difference.
Install: pip install -U neurobrix (the Triton engine, no PyTorch) or pip install -U "neurobrix[pytorch]"; on a
Mac, python -m nbxtensor install-metal. The library is nbxtensor 0.1.3 (unchanged); nbxgrammar stays 0.1.1.