Qwen3.5-4B-mentria
Qwen3.5-4B in Q4 safetensors format for mentria-engine — a custom WebGPU runtime that runs the model entirely in your browser. Includes a Q4 vision tower for image input and a hot-swappable LoRA fine-tuned for motivational quotes.
This is the top tier of the mentria model ladder (0.8B → 2B → 4B) — served only to high-capability devices (≥2 GiB GPU buffer support, ≥8 GB device memory); other devices fall back to a smaller tier.
Try it live:
- mentria.ai/tools/ai-chat — text + vision chat
- mentria.ai/tools/quote — quote generator (uses the bundled LoRA)
Files
| Path | Size | Purpose |
|---|---|---|
qwen3.5-4b-q4-tied-00001-of-00002.safetensors |
~1.9 GB | Language model, shard 1 of 2 — Q4_0 weights (MSE-optimal per-block scale) with tied embedding/lm_head. Sharded under 2 GB so each shard fits a JS ArrayBuffer. Loaded with allowTiedEmbed. |
qwen3.5-4b-q4-tied-00002-of-00002.safetensors |
~750 MB | Language model, shard 2 of 2 |
qwen3.5-4b-vl-q4.safetensors |
~210 MB | Vision tower — Q4_0 patch embedding + transformer blocks |
tokenizer.json |
~12 MB | Qwen3.5 BPE tokenizer (248,320 vocab) |
tokenizer_config.json |
~16 KB | Special-token IDs, chat-template metadata |
chat_template.jinja |
~8 KB | Standalone chat template |
loras/quotes/adapter_config.json |
~400 B | LoRA manifest (peft_type: LORA, r=16, alpha=16) |
loras/quotes/adapter_model.safetensors |
~138 MB | LoRA weights — fine-tuned on the published quotes dataset |
Total cold-load on first visit: ~2.9 GB (LM + vision) or ~2.6 GB (LM only). Subsequent visits are instant — IndexedDB-cached.
Quantization quality
Measured against the BF16 base on a 129-task suite (24 VQA, 20 reasoning, 5 captions, 80 POPE-adversarial public VQA), greedy decoding @128 tokens. The Q4 weights are dequantized shader-exactly into the base layout, so the only difference is weight precision:
| Metric | BF16 base | This Q4 |
|---|---|---|
| VQA accuracy | 0.833 | 0.917 |
| Reasoning accuracy | 0.65 | 0.65 |
| POPE-adversarial accuracy | 0.525 | 0.525 |
| Caption F1 (lexical) | 0.172 | 0.184 |
Grade agreement with base: 0.95; mean lexical similarity of Q4 outputs to base outputs: 0.71 — the Q4 model's greedy decode tracks the BF16 base almost token-for-token. (Absolute scores are depressed on both sides by this tier's verbose step-by-step answer style at the fixed 128-token budget; the base-vs-Q4 delta is the meaningful number.)
Format note
These files target mentria-engine's specific Q4_0 safetensors layout. They are produced by an offline conversion pipeline from the upstream BF16 checkpoint (with MSE-optimal per-block Q4 scales) and are intended for use by mentria-engine specifically.
Model details
| Base model | Qwen/Qwen3.5-4B |
| Architecture | Hybrid Gated-DeltaNet (24 layers, asymmetric: 16 key heads / 32 value heads) + GQA Attention (8 layers, 16Q/4KV) + SwiGLU MLP, 32 layers, 4B params, hidden 2560 |
| Quantization | Q4_0 (group size 32, F16 scale per K-block, MSE-optimal scales) |
| Vision tower | 24-layer ViT, 1024 hidden, patch 16, spatial merge 2, projects to 2560-dim text embeddings |
| Tokenizer | Qwen3.5 BPE, 248,320 vocab |
| License | Apache 2.0 |
LoRA: loras/quotes/
Hot-swappable fine-tune for the motivational-quote use case. On this tier the DeltaNet value/gate projections are per-VALUE-head (32 heads), which mentria-engine's asymmetric LoRA dispatch handles natively.
| Training data | mentriaai/motivational-quotes — 581 hand-curated original quotes, diversity-engineered |
| Hyperparameters | rank 16, alpha 16 (gentle steer for the strong base), dropout 0.05, LR 1e-4 cosine-decay, 400-iter checkpoint, AdamW, completion-format with prompt masking |
| Target modules | mlp.{down,gate,up}_proj, self_attn.{q,k,v,o,a,b,g}_proj (full-coverage fine-tune) |
About mentria.ai
Mentria is a creative studio for tools, experiments, and visual transmissions. All tools run locally in your browser with zero server dependency.