PSSA: A non-transformer language model written from scratch in Rust
Thread
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
PSSA: A non-transformer language model written from scratch in Rust
Loading the complete thread in the background. This saved snapshot is available now. Refresh
Unofficial Hacker News client; not affiliated with Y Combinator.
octoberfranklin · · focus · HN ↗
mllev15 · · focus · HN ↗
purple-leafy · · focus · HN ↗
Why did you choose Rust? Why does that matter?
Nothing wrong with Rust. Lots wrong with the bandwagon that “in Rust” somehow adds value.
anon291 · · focus · HN ↗
sparticle62 · · focus · HN ↗
[dead]
echelon · · focus · HN ↗
janalsncm · · focus · HN ↗
IshKebab · · focus · HN ↗
He could have said "... not written in Python" - would that have been acceptable?
purple-leafy · · focus · HN ↗
A non transformer language model written from scratch is more interesting than
“I did X in Python/Rust/Flavour-of-the-month-thing”
IshKebab · · focus · HN ↗
skeledrew · · focus · HN ↗
There are a few layers of irony here, but see uv.
- <a href="https://docs.astral.sh/uv/" rel="nofollow">https://docs.astral.sh/uv/
anon291 · · focus · HN ↗
sparticle62 · · focus · HN ↗
[dead]
throwaway_7274 · · focus · HN ↗
janalsncm · · focus · HN ↗
You can test the whole thing for free on a GPU with Google Colab. Test both the transformer and your new architecture on a larger dataset. Something that maxes out the GPU for an hour each run.
Also, the readme mentions keeping the same optimizer schedule which sounds nice at first but they are completely different architectures. The loss is high on the transformer, did you try raising the learning rate on it?
In general I’m interested in parameter efficient architectures. I don’t think transformers are optimal, and indeed many improvements have been made to vanilla transformers. But if you have an idea for something better you need to show it.
alightsoul · · focus · HN ↗
janalsncm · · focus · HN ↗
nicman23 · · focus · HN ↗
lunchbucket · · focus · HN ↗
skeledrew · · focus · HN ↗
yjftsjthsd-h · · focus · HN ↗
IshKebab · · focus · HN ↗
That said I don't know what's wrong with using a Rust AI framework like Candle.
intoXbox · · focus · HN ↗
tomtom1337 · · focus · HN ↗
GPU support should really be a optional extra eg `torch[gpu]` or `torch[nvidia]`.
coredog64 · · focus · HN ↗
jeroenhd · · focus · HN ↗
The Rust compile cycle will probably generate a gigabyte of files locally as well, but at least they can be `rm`'d out of `target/` once it's done.
It should be said that for this project that's entirely irrelevant of course, but seeing PyTorch has made me skip over projects on the HN homepage before and probably will again in the future.
pseudocomposer · · focus · HN ↗
Yes, it got better with 3.8 or whatever version added type annotations. But making so much of ML depending on Python has made it distasteful to a lot of devs who would otherwise have contributed more to it.
We really need to move all AI/ML research off PyTorch to Candle or… just anything that isn’t Python or another old-gen, broken language like it.
kasumispencer2 · · focus · HN ↗
a19486 · · focus · HN ↗
Marcuss2 · · focus · HN ↗
saglogog · · focus · HN ↗
skeledrew · · focus · HN ↗
prospero_ · · focus · HN ↗
kasumispencer2 · · focus · HN ↗
Edit: the claimed reason of "updates" also seems to not exist in code. If the author is going to use LLM for this, the very least they can do is to ask it to check properly before publishing.
hashar · · focus · HN ↗
> The implementation language is a detail, and a Python port is welcome.
I guess the post title could have dropped "in rust"
meredithbloom · · focus · HN ↗
Weird turn of phrase very typical of AI.
JPLeRouzic · · focus · HN ↗
For what I understand PSSA belongs to a line of research for LLMs with scalable architecture because you don't need to load the full KV in memory to generate a single token:
[0] <a href="https://aclanthology.org/2023.findings-emnlp.936/" rel="nofollow">https://aclanthology.org/2023.findings-emnlp.936/
<a href="https://arxiv.org/abs/2503.00392" rel="nofollow">https://arxiv.org/abs/2503.00392
<a href="https://papers.nips.cc/paper_files/paper/2023/hash/6ceefa7b15572587b78ecfcebb2827f8-Abstract-Conference.html" rel="nofollow">https://papers.nips.cc/paper_files/paper/2023/hash/6ceefa7b1...
janalsncm · · focus · HN ↗
deterministic · · focus · HN ↗