vanch007's picture
Add 3-scene Chrome Metal WebGL comparison table & 7 visual renders (panda, sakura, pelican)
f9fdcf9 verified
|
Raw History Blame Contribute Delete
6.3 kB
---
library_name: mlx
license: apache-2.0
license_link: https://www.apache.org/licenses/LICENSE-2.0
base_model: ccore/Inkling-2-Mini-3D-Coder
base_model_relation: quantized
pipeline_tag: text-generation
tags:
- mlx
- oq
- oq8e
- quantized
- inkling2
- inkling2_loop
- 3d-coder
- threejs
- omlx
- splash
---
# Inkling-2-Mini-3D-Coder-oQ8e
Mixed-precision Apple Silicon MLX (`oQ8e`) conversion of [ccore/Inkling-2-Mini-3D-Coder](https://huggingface.co/ccore/Inkling-2-Mini-3D-Coder), streamed directly from the upstream `F16` GGUF (`gguf/Inkling-2-Mini-3D-Coder-F16.gguf`, SHA-256 `6c6b84dff631bb38ed2c56bc0c8cbb6ae20cf3ab66a4baff892ed32e50261a8a`) into 4 safetensors shards without grafting external vision or MTP weights.
- **Architecture**: `inkling2_loop` (`Inkling2LoopForConditionalGeneration`, text-only: 24 layers, looped core layers `6..18` x3 passes, 128 routed experts / 8 active, `hidden_size=2304`, `vocab_size=201024`, `unpadded_vocab_size=200058`).
- **Engine Compatibility**: Verified on Apple Silicon with `oMLX` (`0.8.5.dev1`) native MLX and `Splash 1.7.3` (`splash model-check mlx-affine none` -> `{"family":"Inkling-2-Mini"}`) with speculative decoding via [incoai/Inkling-2-Mini-DFlash2](https://huggingface.co/incoai/Inkling-2-Mini-DFlash2).
## Quantization and Storage Breakdown
Follows the `oQ8e` mixed-precision schema (`5.366` effective bits/weight across `26.070B` logical parameters, `16.285 GiB` / `17.486 GB` stored across `668` tensors):
| Storage format | Logical weights | Share of total | Tensor storage | Effective bits/weight |
|---|---:|---:|---:|---:|
| NVFP4, group 16 (layers `0..19` routed experts) | 20.384B | 78.190% | 10.679 GiB | 4.50 |
| MXFP8, group 32 (layers `20..23` routed experts) | 4.077B | 15.638% | 3.916 GiB | 8.25 |
| Affine 8-bit, group 64 (attention, embeddings, `lm_head`) | 1.572B | 6.031% | 1.556 GiB | 8.50 |
| FP32 (routers, norms, loop controllers, `global_scale`) | 0.036B | 0.137% | 0.133 GiB | 32.00 |
| BF16 (conv / relative projection weights) | 0.001B | 0.005% | 0.002 GiB | 16.00 |
| **Total** | **26.070B** | **100%** | **16.285 GiB** | **5.366** |
## Recommended 3D-Coder Prompting
Upstream recommended system prompt for single-file Three.js scenes:
```text
Use only the Three.js core ES module from https://cdnjs.cloudflare.com/ajax/libs/three.js/0.160.0/three.module.min.js. Do not import addons or legacy examples/js paths; implement any camera controls directly inside the HTML.
```
Sampling parameters used in evaluation: `temperature=0.9`, `top_p=1.0`, `reasoning_effort="high"`.
## Local Verification (Apple Silicon 128 GB, oMLX `0.8.5.dev1` + Splash `1.7.3` + `DFlash 2`)
- **Uncontested Three.js HTML Smoke**:
- Native MLX (`oMLX 0.8.5.dev1`): `51.43 tok/s` decode, `17.502 GB` peak `phys_footprint`
- Splash `1.7.3` + `DFlash 2`: **`105.58 tok/s`** decode (**`2.05×`**), `5.6 tok/cycle` (`~65.7%` est. acceptance), `19.864 GB` peak `phys_footprint`
- **Paired `4K` / `16K` Speed Benchmarks** (measured under active desktop GPU load, alternating order across 3 rounds):
- `4K` mean: Native `pp=239.61` / `tg=14.05 tok/s` vs Splash **`pp=405.12` (`1.69×`) / `tg=31.61 tok/s` (`2.25×`, up to `39.90`)**
- `16K` mean: Native `pp=194.94` / `tg=14.75 tok/s` vs Splash **`pp=419.63` (`2.15×`) / `tg=32.68 tok/s` (`2.22×`, up to `39.85`)**
- **Honest Thermal Caveat**: Under desktop contention once `Thermal: fair` engaged, short `512`-token coding (`17.89` vs `20.59 tok/s`, `17.1%` accept) and 2-way concurrency (`15.01` vs `22.66 tok/s`) lagged native MLX.
## Before / After 3D WebGL Comparison (3 Scenes: Panda, Sakura, Pelican)
Paired comparison against [Inkling-2-Mini-Unbound-v3-oQ8e-mtp](https://huggingface.co/nokeepai/Inkling-2-Mini-Unbound-v3-oQ8e-mtp) on `Splash 1.7.3 + DFlash 2` (`temperature=0.9`, `top_p=1.0`, `seed=67`, `reasoning_effort="high"`):
- **Honest Token Count Finding (`+42.0%` mean)**: Under `reasoning_effort="high"`, `3D-Coder oQ8e` did **not** use fewer tokens than `Unbound-v3`—it generated **`+35.3%` to `+49.3%` more total tokens** (`+60.0%–110.1%` more visible HTML code tokens). Note that upstream's `-34.7%` benchmark compared `3D-Coder` Epoch 5 (`37,898` tok on red panda, matching our `38,022`) against the noisier raw base `thinkingmachines/Inkling-2-Mini` (`55,761`), whereas `Unbound-v3` stops around `22K–28K`.
- **1-Shot Reliability (`seed=67`)**: `Unbound-v3` passed `3/3` WebGL checks (`0` page errors); `3D-Coder oQ8e` won decisively in visual richness on `panda` and `sakura` (`2/3` raw 1-shot pass), while `pelican` failed raw module initialization due to a 1-space identifier typo (`const brake lever` on line 1101) — and renders cleanly once changed to `brakeLever`.
| Scene (`seed=67`) | Baseline (`Unbound-v3`) | `3D-Coder oQ8e` | Token Delta / Outcome |
|---|---:|---:|---|
| **Voxel Red Panda** | `26,884` tok (`19,564 B`) | **`38,022` tok (`49,350 B`)** | `+41.4%` total (`+110.1%` visible) · **PASS** (fixes bamboo blocking camera) |
| **Sakura Courtyard Shrine** | `22,157` tok (`20,816 B`) | **`33,091` tok (`40,707 B`)** | `+49.3%` total (`+64.7%` visible) · **PASS** (adds mountains, stone fence, koi pond, bridge) |
| **Pelican on Coastal Bicycle** | `27,642` tok (`24,302 B`) | `37,393` tok (`46,317 B`) | `+35.3%` total (`+60.0%` visible) · **1-SHOT FAIL** (`const brake lever` space typo -> PASS w/ 1-char fix) |
### Rendered Chrome Metal WebGL Screenshots (`1280×800`)
| Scene | Baseline (`Unbound-v3`) | `Inkling-2-Mini-3D-Coder-oQ8e` |
|---|---|---|
| **01 · Voxel Red Panda** | ![Baseline Red Panda](assets/baseline_splash_panda.png) | ![3D-Coder Red Panda](assets/3dcoder_splash_panda.png) |
| **02 · Sakura Shrine** | ![Baseline Sakura](assets/baseline_splash_sakura.png) | ![3D-Coder Sakura](assets/3dcoder_splash_sakura.png) |
| **03 · Pelican (Raw 1-Shot)** | ![Baseline Pelican](assets/baseline_splash_pelican.png) | ![3D-Coder Pelican Raw 1-Shot Fail](assets/3dcoder_splash_pelican.png) |
| **03 · Pelican (1-Char Fix Preview)** | ![Baseline Pelican](assets/baseline_splash_pelican.png) | ![3D-Coder Pelican After 1-Char Fix](assets/3dcoder_splash_pelican_1space_fix.png) |
## License
Apache 2.0, following [ccore/Inkling-2-Mini-3D-Coder](https://huggingface.co/ccore/Inkling-2-Mini-3D-Coder).