MBE Gemma 4 26B SysML (round 2)
Google's Gemma 4 26B-A4B instruct model (26B parameters, about 4B active per token), fine-tuned by
Vector Stream Systems LLC to write, repair and place SysML v2 textual models. It is the second training
round for the agent in MBEstudio. Round 1 is kept on the
round1 branch.
The base model comes from a US developer (Google), and training ran in a US data center. The model runs locally: the Q4_K_M file works with Ollama, LM Studio and llama.cpp on a single GPU, with no data leaving the machine.
Model details
| Base model | unsloth/gemma-4-26B-A4B-it (a copy of Google's Gemma 4 26B-A4B instruct weights) |
| Architecture | Mixture of experts, 26B total parameters, about 4B active per token |
| Adapter | LoRA on attention, MLP and expert projections, 16-bit (no 4-bit quantization during training) |
| Training | Supervised fine-tuning with Unsloth and TRL |
| Data | 12,764 training rows: SysML v2 models from openly licensed public repositories and reference libraries (generation, repair and fill-in tasks, each checked by the MBEstudio compiler), plus import tasks built from open interchange fixtures (placing imported requirements and elements into an existing model) |
| Schedule | 1 epoch, 1,596 steps, learning rate 5e-5, sequence length 16,384, final train loss 0.271 |
| Hardware | 1x NVIDIA H100 80GB, US data center, 79 minutes of training |
| License | Apache-2.0, the same as the base model |
Evaluation
Import placement on files the model never saw
19 import placement rows whose source files were held out at the repository level, so round 2 never trained on any of them. The model runs with thinking off (see Run it with Ollama).
| System | Correct owner | Valid JSON | Declaration exact |
|---|---|---|---|
| Word-overlap baseline | 2 / 19 | ||
| Base Gemma 4 26B-A4B | 10 / 19 | 19 / 19 | 7 / 19 |
| Round 2 | 14 / 19 | 19 / 19 | 10 / 19 |
| Claude Sonnet, for reference | 18 / 19 | 19 / 19 | 15 / 19 |
With the thinking channel left open, round 2 drops to 8 / 19, because it was trained with thinking off.
Original held-out subset
A fixed held-out subset of 196 rows (all 68 import placement rows plus 128 stratified others), greedy decoding, base and tuned model judged the same way. "Compiles clean" means the reply compiles with zero errors in the MBEstudio SysML v2 compiler.
| Check | Base Gemma 4 26B-A4B | Round 2 |
|---|---|---|
| Reply compiles clean (128 generation and repair rows) | 86 / 128 | 118 / 128 |
| Import placement: correct owner (68 rows; word-overlap baseline 10 / 68; see Caveats) | 27 / 68 | 57 / 68 |
| Exact match to the reference answer (196 rows) | 11 / 196 | 94 / 196 |
| Replies stuck in repetition loops | 0 | 0 |
Compile clean by task, base to round 2: import 12 to 30 of 32, corpus 21 to 24 of 32, corpus repair 28 to 32 of 32, corpus fill 19 to 24 of 24, reference repair 6 to 8 of 8.
Quantized file check: on 20 held-out rows (10 import placement, 10 compile), the Q4_K_M file placed 10 of 10 correctly and compiled clean on 8 of 10, against 10 of 10 and 9 of 10 for the bf16 round 2 model and 6 of 10 and 8 of 10 for the base model. No repetition loops.
Caveats. The evaluation is a 196-row subset, not the full 1,498-row held-out set. Rows were split individually, not by source repository, so held-out rows can share a repository, and even a file, with training rows. This inflates the placement score most: 41 of the 46 files behind the 68 placement rows were also in training. Use the 19-row result above for placement; 57 / 68 overstates it. The compile and exact-match numbers may be flattered too.
Files
| Path | What it is | Size |
|---|---|---|
mbe-gemma4-26b-sysml-r2-Q4_K_M.gguf | Single-file quantized model for Ollama, LM Studio and llama.cpp | 16.8 GB |
adapter/ | The LoRA adapter alone, to apply on the base model yourself | 2.0 GB |
eval/ | Raw evaluation replies (base and round 2), scores and the training log |
SHA-256 of the GGUF: 813d3e64c46f908280cc104782ba3d82346524d14cabf371668174ec1961fb36
The full merged bf16 weights are not in this version. Round 1's merged weights remain on the round1 branch.
Run it with Ollama
The model was trained and scored with thinking off. Serve it with a template that closes the thought
channel, or replies get slower and less accurate. Save this as Modelfile:
FROM hf.co/radiosilent/mbe-gemma4-26b-sysml:Q4_K_M
TEMPLATE """{{- range .Messages }}
{{- if eq .Role "system" }}<|turn>system
{{ .Content }}<turn|>
{{ else if eq .Role "user" }}<|turn>user
{{ .Content }}<turn|>
{{ else if eq .Role "assistant" }}<|turn>model
{{ .Content }}<turn|>
{{ end }}
{{- end }}<|turn>model
<|channel>thought
<channel|>"""
ollama create mbe-gemma4-26b-sysml -f Modelfile
ollama run mbe-gemma4-26b-sysml
The Q4_K_M file runs in about 18 GB of GPU memory.
Use the adapter on the base model
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "unsloth/gemma-4-26B-A4B-it"
tok = AutoTokenizer.from_pretrained(base_id)
base = AutoModelForCausalLM.from_pretrained(base_id, device_map="auto", torch_dtype="auto")
model = PeftModel.from_pretrained(base, "radiosilent/mbe-gemma4-26b-sysml", subfolder="adapter")
messages = [{"role": "user", "content": "Write a SysML v2 package for a quadcopter with four rotors, a battery and two requirements."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=2048)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
Limitations
- Trained on openly licensed models; it has not seen proprietary or domain-specific libraries.
- Import placement is well behind a frontier model (14 / 19 against Claude Sonnet's 18 / 19 on unseen files).
- The original subset scores use a row-level split (see Caveats).
- Always validate generated SysML v2 with a compiler or tool before use. Generated models are a draft for an engineer to review, not a finished design.
Contact
Vector Stream Systems LLC, vectorstreamsystems.com