Commit Β·
3ec6064
1
Parent(s): 175cd4d
Model card: add context window & prefill sizes; base_model = VibeThinker-3B (128K)
Browse files
README.md
CHANGED
|
@@ -3,7 +3,7 @@ license: apache-2.0
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
base_model:
|
| 6 |
-
-
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
tags:
|
| 9 |
- webgpu
|
|
@@ -53,6 +53,30 @@ Every win was found by **measuring** β nanosecond GPU timestamp profiling β
|
|
| 53 |
| Footprint | one static HTML page; weights supplied by the visitor (BYO-model) |
|
| 54 |
| Privacy | absolute β inference never leaves the device |
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
## Note on weights
|
| 57 |
|
| 58 |
**This page hosts no multi-GB weights.** Emberglass is the *engine*; it is bring-your-own-model. Point it at a Qwen2.5-3B (or compatible) checkpoint served locally and it quantizes to int4 on the way to the GPU. Drag in a PEFT/MLX LoRA adapter to hot-swap a specialization live.
|
|
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
base_model:
|
| 6 |
+
- WeiboAI/VibeThinker-3B
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
tags:
|
| 9 |
- webgpu
|
|
|
|
| 53 |
| Footprint | one static HTML page; weights supplied by the visitor (BYO-model) |
|
| 54 |
| Privacy | absolute β inference never leaves the device |
|
| 55 |
|
| 56 |
+
## Context window & prefill sizes
|
| 57 |
+
|
| 58 |
+
The base model β [WeiboAI/VibeThinker-3B](https://huggingface.co/WeiboAI/VibeThinker-3B), a Qwen2.5-architecture 3B reasoning model (from Qwen2.5-Coder-3B) β supports **131072 (128K) positions** with a **32K sliding window**, and is built to *think long*: its generation config defaults to `max_new_tokens=65536`, and the authors suggest **60Kβ100K tokens** for the hardest problems. So context length is a first-class concern here, not an afterthought.
|
| 59 |
+
|
| 60 |
+
The runtime exposes context + prefill as options:
|
| 61 |
+
|
| 62 |
+
```js
|
| 63 |
+
const rt = new QwenWGPU(device, QWEN25_3B, { maxCtx: 8192, maxPrefillT: 8192 });
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
- **`maxCtx`** β the context window (KV-cache length). Decode attention is **split-K** and prefill attention is **flash / online-softmax** (O(block) workgroup memory, not O(ctx)), so neither caps out at small sizes β context scales until you run out of VRAM.
|
| 67 |
+
- **`maxPrefillT`** β the largest prompt processed in one batched (tiled-int4-GEMM) prefill pass. Longer prompts (or prefill while a LoRA adapter is active) fall back to the sequential path; clamped to `maxCtx`.
|
| 68 |
+
|
| 69 |
+
Defaults are **8192 / 8192** β ample for the bug-bounty triage adapter (its chain-of-thought runs a few thousand tokens) at a modest footprint. Raise them toward the base model's 128K as memory allows. **The KV cache is the cost**, and it grows linearly (~72 KB per token of context, f32, across all 36 layers):
|
| 70 |
+
|
| 71 |
+
| context (`maxCtx`) | KV cache (f32) |
|
| 72 |
+
|---|---|
|
| 73 |
+
| 8 192 *(default)* | ~0.6 GB |
|
| 74 |
+
| 16 384 | ~1.2 GB |
|
| 75 |
+
| 32 768 *(sliding window)* | ~2.4 GB |
|
| 76 |
+
| 131 072 *(max positions)* | ~9.4 GB |
|
| 77 |
+
|
| 78 |
+
Plus ~2 GB of int4/int8 weights and lazily-sized prefill scratch. **Verified in-browser:** batched prefill is bit-exact to the sequential path through ctx 1024; runs end-to-end at 4 096 / 8 192; and a `maxCtx: 16384` build prefills a 9 000-token prompt and decodes past it. (KV is f32 today β quantizing it would roughly halve these numbers.)
|
| 79 |
+
|
| 80 |
## Note on weights
|
| 81 |
|
| 82 |
**This page hosts no multi-GB weights.** Emberglass is the *engine*; it is bring-your-own-model. Point it at a Qwen2.5-3B (or compatible) checkpoint served locally and it quantizes to int4 on the way to the GPU. Drag in a PEFT/MLX LoRA adapter to hot-swap a specialization live.
|