CrazyJames26 commited on
Commit
9558442
·
verified ·
1 Parent(s): 178b02c

Add model card

Browse files
Files changed (1) hide show
  1. README.md +60 -0
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen3-0.6B
4
+ language:
5
+ - en
6
+ tags:
7
+ - linear-attention
8
+ - deltanet
9
+ - distillation
10
+ - long-context
11
+ datasets:
12
+ - CrazyJames26/Dynamic_DeltaNet_Dataset
13
+ ---
14
+
15
+ # Dynamic DeltaNet students (Qwen3-0.6B)
16
+
17
+ Students of [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) in which all 28 attention layers are replaced by DeltaNet-family mixers (16 query heads, 8 shared KV heads, head dim 128). Code: [github.com/Crazy-James26/Dynamic_DeltaNet](https://github.com/Crazy-James26/Dynamic_DeltaNet). Training data: [CrazyJames26/Dynamic_DeltaNet_Dataset](https://huggingface.co/datasets/CrazyJames26/Dynamic_DeltaNet_Dataset).
18
+
19
+ Write modes: `deltanet` keeps one state per head. `latest`, `all` and `novelty_top1` keep a bank of states whose size grows logarithmically with context length (7 at 8K, capped at 8 from 11,193 tokens) and differ in which states receive each token.
20
+
21
+ ## Checkpoints
22
+
23
+ Each directory is a self-contained inference bundle: `student.safetensors`, `student_config.json`, the Qwen3 tokenizer, and the stage config used to train it. Optimizer states are not included.
24
+
25
+ | Path | Mode | Stage | Learning rate |
26
+ |---|---|---|---|
27
+ | `round2_shared_kv/latest/distillation_lr1e-4` | latest | Distillation, 4,360 steps (15.0B tokens) | 1e-4 |
28
+ | `round2_shared_kv/latest/distillation_lr5e-4` | latest | Distillation, 4,360 steps | 5e-4 |
29
+ | `round2_shared_kv/deltanet_lr1e-4_v0/distillation_step4360` | deltanet | Distillation, 4,360 steps | 1e-4 |
30
+ | `round2_shared_kv/deltanet_lr1e-4_v0/continued_pretraining_step4222` | deltanet | + full-parameter continued pretraining, 4,222 steps (15.0B tokens) | 5e-5 cosine |
31
+ | `round2_shared_kv/deltanet_lr1e-4_v0/sft_step442` | deltanet | + SFT, 442 steps | 1e-5 cosine |
32
+
33
+ Distillation trains only the replacement mixers against the frozen teacher (final hidden MSE + mean per-layer mixer-output MSE). Continued pretraining and SFT train all parameters with next-token cross-entropy.
34
+
35
+ The `latest` learning-rate sweep (1e-4 / 5e-4 / 1e-3) selects one rate by held-out composite MSE; that rate is then used for all four students. Final students trained at the selected rate will be added under `round2_shared_kv/` when they finish. `deltanet_lr1e-4_v0` is an earlier end-to-end run at the pre-sweep rates and will be superseded.
36
+
37
+ ## Results so far
38
+
39
+ 1,510-sample evaluation (1,200 RULER items prompted as `input + answer_prefix`, plus 310 general and reading-comprehension items). RULER mean retrieval (4K / 8K / 16K):
40
+
41
+ | Model | 4K | 8K | 16K |
42
+ |---|---:|---:|---:|
43
+ | Qwen3-0.6B (native) | 94.50 | 91.19 | 82.75 |
44
+ | `deltanet_lr1e-4_v0/sft_step442` | 0.81 | 0.25 | 0.50 |
45
+
46
+ Full per-task scores are in `deltanet_lr1e-4_v0/sft_step442/evaluation/scores.json`.
47
+
48
+ ## Loading
49
+
50
+ The bundles need the `dynamic_deltanet` package from the GitHub repository and [Flash Linear Attention](https://github.com/fla-org/flash-linear-attention).
51
+
52
+ ```python
53
+ from huggingface_hub import snapshot_download
54
+ from dynamic_deltanet.student import StudentForCausalLM
55
+
56
+ path = snapshot_download("CrazyJames26/Dynamic_DeltaNet",
57
+ allow_patterns="round2_shared_kv/deltanet_lr1e-4_v0/sft_step442/*")
58
+ model = StudentForCausalLM.from_pretrained(f"{path}/round2_shared_kv/deltanet_lr1e-4_v0/sft_step442",
59
+ device="cuda", compute_precision="float32")
60
+ ```