How doesKutup Baud work?

Kutup Baud is Qwen3-0.6B with a new architecture built into the model (two structure blocks, eight control tokens, a decision head and shape grammars) and every one of its weights retrained: a full fine-tune, not LoRA. It knows four industrial protocols (Modbus, OPC UA, OPC DA and MQTT), plans each answer before writing it, and runs entirely in your browser. English only.

Open Baud ↗

Kutup Baud in four facts

  • New architecture28 → 30 blocks

    2 structure blocks, 8 control tokens, a decision head and 5 shape grammars, all in one GGUF file.

  • Full fine-tune627.5 M

    weights, every one trained: not LoRA adapters, the model itself.

  • In your browser395 MB

    downloads once; runs 100% in the browser with WebAssembly and WebGPU.

  • Closed-book exam37.3%

    the file your browser runs (Q4_K_M), on 713 questions. The 27-billion-parameter teacher, closed book: 38.1%; untouched Qwen3-0.6B: 10.4%.

The idea in one machine

Think of Baud as a bench engraver: it first decides which stencil the answer needs, then the stylus can only cut through that stencil’s open windows.

Engraved trace: the answer being writtenEight stencil plates in the rack, one per control tokenOpen windows: the only places the stylus can cutBaud plans each message with four typed questions and turns the selector to one of eight control tokens (a message in another language goes to the language token by rule; an out-of-scope one gets its token from the model's own first choice), then writes under that token's grammar: the stylus cuts only the open windows, and for a frame the app recomputes the CRC itself.

How a question gets its answer

  1. Question

    You type your question. Nothing leaves the browser.

    In your browser
  2. Plan

    The decision head answers four questions in one pass: which protocol, which shape, in scope, English?

    In your browser
  3. Route

    Not English: it says it works in English only. Outside the four protocols: it says so. Otherwise: the planned shape.

    In your browser
  4. Write

    The answer starts with the shape’s control token, and a grammar keeps the shape exact.

    In your browser
  5. Check

    The app does the arithmetic itself: the CRC, LRC, MBAP length and header of a frame you paste, the hex-to-decimal values in Baud’s frame tables, and whether an MQTT topic filter matches a topic.

    In your browser
  6. Answer

    The plan, the answer and the checker’s note appear together.

    In your browser

Only the model files come from the server, once. The question and the answer stay in your browser.

The plan: four questions, one pass

Before Baud writes anything, it answers four typed questions about your message. This is not a separate model: it is the same file’s decision head, run through llama.cpp’s decision-model interface (System One).

“Decode this Modbus RTU frame: 11 03 00 6B 00 03 76 87”

  • ProtocolModbus100%
  • ShapeFrame layout100%
  • In scopeYes100%
  • EnglishYes100%

Route: Frame layout

“Compare MQTT QoS 0, 1 and 2”

  • ProtocolMQTT97.1%
  • ShapeTable95.3%
  • In scopeYes100%
  • EnglishYes100%

Route: Table

“What are the steps to connect an OPC UA client with Sign & Encrypt?”

  • ProtocolOPC UA100%
  • ShapeSteps97.5%
  • In scopeYes100%
  • EnglishYes100%

Route: Steps

“What are the benefits of MQTT 5.0 over 3.1.1?”

  • ProtocolMQTT58.0%
  • ShapeList69.8%
  • In scopeYes100%
  • EnglishYes100%

Route: List

“Show Python that reads holding registers 0 to 9”

  • ProtocolModbus100%
  • ShapeCode94.6%
  • In scopeYes100%
  • EnglishYes100%

Route: Code

“What does an OPC DA quality byte tell me?”

  • ProtocolOPC DA100%
  • ShapeExplanation85.7%
  • In scopeYes100%
  • EnglishYes100%

Route: Explanation

“What is the weather in Istanbul?”

  • ProtocolNone100%
  • ShapeExplanation100%
  • In scopeNo100%
  • EnglishYes100%

Route: Out of scope

“Modbus nedir?”

  • ProtocolModbus100%
  • ShapeExplanation97.9%
  • In scopeYes100%
  • EnglishNo100%

Route: English only

These are the probabilities the installed model gave in the browser.

Six shapes, two gates

Explanation

Short paragraphs. For explaining an idea.

No grammar: free text.

Table

Comparisons and lists of values.

The same number of columns on every row, a header and a |---| separator.

Steps

Things to do in order.

Numbered 1, 2, 3… in order; at most 8 steps.

List

Several parallel items.

Every item starts with “- ”.

Frame layout

The fields of a message, frame or packet.

The header is always “Field | Size | Value | Meaning”; the app draws it as a byte strip.

Code

A hex frame, code or configuration.

One code block; the app computes and fills in [CRC].

Out of scope

For questions outside the four protocols it says so, and what it can help with instead.

English only

A message in another language gets an English reply saying it works in English only.

The decision head picks the shape; a grammar (GBNF) enforces it while the answer is written. The grammars are stored inside the model file.

Qwen3-0.6B and Kutup Baud, side by side

Qwen3-0.6BKutup Baud
Transformer blocks2830: 28 retrained + 2 new structure blocks
Parameters596.0 M627.5 M, all trained
Vocabulary151,936 rows; 151,669 in useThe same table; 8 unused rows now hold shape control tokens
Decision headNoneBuilt in: four typed questions in one pass (protocol, shape, scope, language)
Answer shapeFree text6 shapes; 5 enforced by GBNF grammars stored in the file
TrainingGeneral pre-trainingEvery weight retrained on protocol Q&A and decisions (full fine-tune)
ExpertiseGeneralModbus, OPC UA, OPC DA, MQTT (versions and variants)
LanguageMultilingualEnglish only, by design
ArithmeticGuessed in textCRC, LRC and MBAP length computed by the app

What is inside the file

embedding table = output layer151,936 rowsinput: tokens8 control tokenseach row is both an input vector and decision weights+2 structure blocksnew layers that start as identity×28 Qwen3 blocksevery weight retrained
One file. Two new structure blocks sit on top of Qwen3’s 28 blocks, and eight control tokens live in unused rows of the embedding table. That table is shared with the output layer, so each row is also its token’s decision weights.
Decision head

llama.cpp decision type “openjev”: it answers a typed question by the probabilities of the options’ letters (A, B, C…). Its temperatures were fitted on held-out decisions.

qwen3.decision.*
Shape grammars

Five GBNF grammars: table, frame, steps, list, code. llama.cpp follows them while writing.

baud.grammar.*
Decision questions

The four questions the app asks, with their options and descriptions.

baud.decision.questions
Chat templates

Baud’s own chat format and the decision prompt.

tokenizer.chat_template[.systemone]
627.5 M parameters28 + 2 blockshidden size 1024vocabulary 151,936context 2,048Q4_K_M · 395 MiBbase: Qwen/Qwen3-0.6B

The structure blocks start as copies of the last block with their output projections set to zero, so at first they change nothing and learn only what the base model lacked.

A full fine-tune and a new architecture, together

LoRAFor comparison: the base weights stay frozen and only thin added matrices are trained.
Full fine-tuneEvery weight of the model is updated in training.
Kutup BaudA full fine-tune plus a new architecture: 2 new structure blocks (the bright rows on top) and 8 control tokens, then all 627.5 M weights trained together.

Why both? The new blocks and tokens carry the structure engine; the full fine-tune lets the rest of the model learn to work with that engine and to hold the protocol knowledge. Training only adapters (LoRA) would have left the base model as it was.

How Baud learned

Every weight of Qwen3-0.6B was retrained (a full fine-tune, not LoRA). The teacher is an open 27-billion-parameter model; the student is Baud, small enough for a browser at 0.6 billion.

  1. A Documents2,195 passages from 34 documents on 4 protocols
  2. B TeacherQwen3.8-27B wrote 32,773 question–answer pairs; 27,988 passed a strict check
  3. C Made by code2,297 examples: frames, codes, tables; every value exact
  4. D Training set37,746 chats + 79,887 decision examples; 3% held out
  5. E TrainingFirst the new parts alone (300 steps), then every weight
  6. F ExamA closed-book exam of 713 questions
  7. G ExportGGUF, Q4_K_M; split into parts
AdamW · learning rate 3e-5 · cosineEffective batch 64fp32 master weights · bf16 computeWeighted loss: answer 1, control token 3, decision letter 10Google Colab · RTX PRO 6000

Where the knowledge comes from

TopicDocumentsPublisherPassages
ModbusModbus Application Protocol V1.1b3 · Modbus over Serial Line V1.02 · Modbus Messaging on TCP/IP V1.0b · Modbus/TCP SecurityModbus Organization107
OPC UAOPC 10000 parts 1–14, 16–18, 20–24, 26, 80 (version 1.05)OPC Foundation1,712
OPC DAKutup’s own OPC DA notes (1.0a, 2.05a, 3.0, XML-DA), checked against the DA 3.0 textKutup8
MQTTMQTT 5.0 · 3.1.1 · 3.1 · MQTT-SN 1.2 · Sparkplug 3.0.0OASIS · IBM · Eclipse Foundation368
TablesOPC UA status codes, attributes, enumerations and node idsOPC Foundation UA-Nodeset (MIT)–

The documents were read only by the teacher model, which wrote question–answer pairs from them in its own words. No document text was used as training text, published or shipped with Baud.

How good is it?

The exam questions were written from the documents and kept out of training. Baud, the base model and the 27-billion-parameter teacher answered the same questions without seeing any document; the teacher graded the answers without knowing who wrote them. The “Q4_K_M, the file in your browser” row is the quantized file your browser downloads, answering through the app’s own path in llama.cpp (the decision head plans, the grammar holds the shape).

All713 questions
  • Baud 0.6B (bf16)40.9%
  • Baud Q4_K_M, the file in your browser37.3%
  • Qwen3-0.6B (untouched)10.4%
  • Qwen3.8-27B, closed book38.1%
Modbus161 questions
  • Baud 0.6B (bf16)49.1%
  • Baud Q4_K_M, the file in your browser45.3%
  • Qwen3-0.6B (untouched)12.4%
  • Qwen3.8-27B, closed book48.4%
OPC UA296 questions
  • Baud 0.6B (bf16)29.7%
  • Baud Q4_K_M, the file in your browser29.4%
  • Qwen3-0.6B (untouched)7.8%
  • Qwen3.8-27B, closed book25.7%
OPC DA14 questions
  • Baud 0.6B (bf16)64.3%
  • Baud Q4_K_M, the file in your browser21.4%
  • Qwen3-0.6B (untouched)0.0%
  • Qwen3.8-27B, closed book35.7%
MQTT242 questions
  • Baud 0.6B (bf16)47.9%
  • Baud Q4_K_M, the file in your browser42.6%
  • Qwen3-0.6B (untouched)12.8%
  • Qwen3.8-27B, closed book46.7%

The decision head

Accuracy of the four decision questions on held-out messages:

  • Protocol99.3%
  • Shape82.0%
  • In scope100%
  • English100%
  • 82.1%of held-out chats with the right shape, language and scope
  • 118 / 120grammar-constrained answers fit their shape exactly (Q4_K_M, llama-server)
  • 700most answer tokens
  • 0temperature: the same question gives the same answer

Size and quality

Quantisation stores the weights in fewer bits: the file shrinks and perplexity moves a little. Three candidate files took the exam through the app’s path; their differences are within the noise of 713 questions (about ±1.8 points). The browser downloads the highlighted file, the balance of download size and accuracy.

  • bf16perplexity 4.661,202 MiB
  • Q8_0perplexity 4.64641 MiB
  • Q5_K_Mperplexity 4.44 · exam 38.1%444 MiB
  • Q4_K_Mperplexity 4.82 · exam 37.3%395 MiB
  • IQ4_XSperplexity 4.62 · exam 36.2%366 MiB

Using it elsewhere

The same file runs with llama.cpp. On Hugging Face: yunusemrejr/Baud-0.6B ↗

llama-server -m baud-0.6b-q4_k_m-00001-of-00005.gguf -c 2048
curl localhost:8080/v1/systemone -d '{"state": "Decode 11 03 00 6B 00 03 76 87",
  "questions": {"shape": {"type": "choice", "instructions": "Which answer shape fits the message best?",
  "criteria": {"prose": null, "table": null, "steps": null, "list": null, "frame": null, "code": null}}}}'

Limits

  • 0.6 billion parameters: Baud can be wrong, and the smaller the detail, the more likely.
  • Register maps, vendor defaults and product behaviour are not in the standards, and not in Baud. Take them from the device documentation.
  • The app’s checker verifies only what it can recompute (CRC, LRC, MBAP length, frame header, hex values, topic matching); it does not verify Baud’s explanations.
  • Baud is weakest at number conversion and building frames: it can slip when it turns hex into decimal or writes request bytes. The app marks such slips in frame tables; compare bytes it builds with your device documentation.
  • Writing code is not Baud’s strength; check short commands and samples before you use them.
  • The exam measures questions written from the documents; it is not an independent field-accuracy measurement.
  • Verify critical settings with vendor documentation, the site procedure and a qualified engineer.