Views
No views yet
d_model=2048, 32 states of width d_k=64 / d_v=256, one mixer per
layer, no attention and no separate feed-forward anywhere in the model.| donor tensor | shape | → | GDN | role |
|---|---|---|---|---|
self_attn.q_proj | (2048, 2048) | → | q_proj | the memory read |
self_attn.k_proj | (2048, 2048) | → | k_proj | the address |
mlp.up_proj | (8192, 2048) | → | v_proj | the payload |
mlp.gate_proj | (8192, 2048) | → | g_proj | the output gate |
mlp.down_proj | (2048, 8192) | → | o_proj | the residual write |
v_proj and o_proj are homeless — the
feed-forward claimed the value and output side first — and are left out. The
short convolutions are initialised to a causal identity (all taps zero but
the last), so a freshly collapsed layer computes its transplanted projections
untouched; the default convolution init would scramble them before a single
gradient step.n_heads must divide the query rows and the feed-forward width. This donor is
plain multi-head attention — 32 query heads over 32 key/value heads, so the
query/key ratio is 1 — which leaves every power of two up to 2048 admissible.d_k=64 is exactly the donor's head_dim. The head
partition therefore transfers intact: 32 attention heads of width 64 become 32
memory states of width 64, same numbers read against the same grouping. Each
state gets its own key group, so the layout is diagonal.model-0000{1,2}-of-00002.safetensors — 1,514,333,696 parameters, float32model.safetensors.index.json — the shard mapcollapse.json — the manifest the loader reads (donor revision, layer count, plan)modeling_collapsed.py — standalone loader, depends only on torch + lumen1pip install torch safetensors
2pip install git+https://github.com/latticedynamics/lumen.git1from huggingface_hub import snapshot_download
2import sys
3
4path = snapshot_download("kennethgrace/smollm2-1.7b-collapsed-gdn")
5sys.path.insert(0, path)
6
7from modeling_collapsed import load_collapsed
8
9model, manifest = load_collapsed(path, device="cuda")
10logits = model(ids) # (B, T) token ids -> (B, T, vocab)transformers architecture and will not load with
AutoModelForCausalLM. Generation runs in constant memory through
model.step(ids, states) rather than re-reading a growing prefix.HuggingFaceTB/SmolLM2-1.7B at revision
effd688a12921b4cc83e3312b6feb579f70f9c71, Apache-2.0. This derivative is
released under the same license. The Gated DeltaNet implementation is
lumen, MIT.