r/OpenSourceeAI • • Sep 30 '26

PSSA: a 1.5M-param plastic state space model in Rust, beating a parameter-matched transformer on a small held-out slice

small scale, single seed, wikitext slice, so treat this as a prototype result and not an architecture claim. 1,544,704 params both sides, same corpus and sampler. held-out 3.997 vs 4.429 nats, generation 226ms vs 2735ms for 200 tokens on the same cpu. the depth-1 match is the obvious weakness and a depth-2 baseline is running next. written from scratch in rust, no pytorch. repo and eval commands: github.com/Sparticle62ops/pssa. happy to be told where the comparison is unfair.

4 Upvotes

22 comments sorted by

View all comments

Show parent comment

1

u/shing3232 Oct 01 '26

how does this compare to recurrent deltanet? like KDA

1

u/Sparticle62 Oct 01 '26

closest relative honestly, though i haven't benchmarked against it yet so no numbers. the big difference is where the memory lives. deltanet and kda keep one matrix-valued state and rewrite it with the delta rule every token, kda adding per-channel gates on top. pssa's recurrent core is a mamba-style selective scan, and the associative part is split out into a separate fixed-size memory bank (512 slots) that it reads from every token and only writes to when something's novel, plus fast weights that get folded back into the transition by a closed-form ridge step. a gated deltanet at matched params is probably a fairer baseline than the transformer, so it's going on the list.

1

u/shing3232 Oct 01 '26

Well, you can have hybrid model sorts like ds4 or qwen35 with QSA/CSA2 1:4 PSSA.

1

u/Sparticle62 Oct 01 '26

yeah a hybrid is probably where this ends up. something like 1 attention layer per 4 PSSA layers makes sense to me, attention for exact recall and PSSA + the memory bank for the cheap long-context part. haven't tried it yet though. right now it's a single layer at 1.5M params, and stacking layers is slow in my code at the moment (that path still drops to CPU), so I need to fix that before a hybrid test would mean anything. it's on the list

1

u/shing3232 Oct 02 '26

It should be easier now i usually let ds41f write kernels and flash linear attention might have something for you.

1

u/Sparticle62 Oct 02 '26

yeah fair, kernels aren't the scary part they used to be. flash-linear-attention is a good shout, their chunked delta rule / gated deltanet kernels are pretty much the template for what pssa's scan needs on gpu. right now training sends the big matmuls to cuda but the recurrent scan still runs on cpu, so a proper fused chunked scan is the next big speedup. gonna dig through their repo, thanks

1

u/shing3232 Oct 02 '26

I was training a Moe 8B with 200M activation with forward pass only analytical gradient with HRM shared over KDA/CSA2. Pretrain is slow on consumer hardware. Do you have a paper of PSSA layers? i like to take a lot too.

1

u/Sparticle62 Oct 02 '26

no paper yet, the closest thing right now is the model section of the readme, it walks through the layer math step by step: https://github.com/Sparticle62ops/pssa#the-model

short version: each block is a selective diagonal ssm (input-dependent delta/B/C, same family as mamba, nothing new there), then a bounded read from a small episodic memory bank in hyperbolic space where the query is built from both the token and the current ssm state, then a learned gate on that read, a low-rank plastic adapter, and a silu mlp. the "plastic" part is the write path: novelty-gated inserts, refractory counters so slots don't get overwritten constantly, and a ridge regression step that folds fast updates back into the transition matrix. exact version is in src/pssa.rs and src/gpu_batch.rs

an 8b moe with forward-only analytical gradients and HRM over KDA/CSA2 sounds wild, would def read it if you write it up. and yeah pretraining on consumer hardware is brutal, i'm hitting the same wall trying to get to ~50m