Gemma 4 E2B for A2UI Express (retrain 2026-11-07)
A browser-ready Gemma 4 E2B fine-tune that generates the A2UI Express DSL for
the CopilotKit Express demo. This is checkpoint 540 of a 768-step Unsloth LoRA
run on 512 training conversations: the original 159 form rows, 90 informational
cards, and 272 multi-turn chains (creation, edits, second views, submitted
actions) generated through the demo's own request builder. Adapter SHA-256
54c7414491e36610133c5f22e0397a66e97d901e3b119238abf50042dc7aa323.
On the demo's held-out follow-up test set (49 chain steps, compiled by the Express compiler against the committed views) it passes 48/49: creations 19/19, edits 18/19, action answers 11/11.
Files
onnx/: theonnx-community/gemma-4-E2B-it-ONNXq4f16 text sessions (graph revision6f21c99d7e18237f8d2ce92aadfdbfeba877f63a) with the 240 adaptedMatMulNBitsmatrices requantized from the merged weights (4-bit, block size 32, asymmetric, ONNX Runtime quantizer). The decoder graph and the embedding data are byte-identical to the base export.a2ui-export-manifest.json: the provenance descriptor the demo checks before loading (adapter hash, patched matrix count, file hashes).adapter-mlx/: the LoRA adapter itself (mlx_lmlayout, rank 8, scale 2.0, 275 logical matrices), trained on a runtime 4-bit MLX quantization of the base.system_prompt.txt: the exact system prompt the demo sends and the adapter was trained with (the A2UI SDK's catalog-generated Express guide).
Recipe
LoRA rank 8, alpha 16, no dropout, every language-model projection including
Gemma 4's per-layer input gate and projection; Adam at a constant 1e-4, batch 1,
seed 3407, loss on the assistant turn only, 768 steps (1.5 epochs), checkpoint
540 selected on the compile-rate test set. Base:
unsloth/gemma-4-E2B-it at d36bdd3855c82a6a1a23f7c459b749f5724ae75d.
Use
Load with @huggingface/transformers (dtype: "q4f16", device: "webgpu",
shader-f16 required), send system_prompt.txt as the system message, and
validate the output with the A2UI Express compiler. Model output is not
guaranteed to be correct. Gemma weights keep Google's Gemma terms; see
NOTICE.txt.