frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Linear RNN/Reservoir hybrid generative model, one C file (no deps.)

https://raw.githubusercontent.com/bggb7781-collab/lrnnsmdds/refs/heads/main/lrnnsmdds
3•adinhitlore•3h ago
I just noticed it takes literally ~5 minutes to train millions parameters on slow CPU...but before you call Yudkowsky that "it's over", an important note: the main bottleneck is the corpus size, params are just 'cleverness' but given limited info it's powerless.

Anyway, here is the project:

https://github.com/bggb7781-collab/lrnnsmdds/tree/main

couple of notes:

1. single C file, no dependencies. Below are literally all the "dependencies", not even custom header (copy paste from the top of the single c file):

#define _POSIX_C_SOURCE 200809L

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <stdint.h> #include <stdbool.h> #include <float.h> #include <getopt.h> #include <errno.h>

4136 lines of code in one file at the moment, that's all.

2. easiest way to compile on Windows: download Cygwin (https://www.cygwin.com/), then navigate to the directory where your lrnnsmdds.c file is and just run gcc on it with some optimizations, such as:

gcc -std=c17 -O3 -march=native --fast-math -o lrnn lrnnsmdds.c -lm

On Linux just run gcc, if for whatever reason you don't have gcc on Linux do sudo && apt-get install gcc --y ,or something...

On Apple: i've no idea or maybe just use vmware and install ubuntu and then run it.

Of course you can 'git clone' and go to the dir, but again: it's one file! copy it...

The repo has tiny toy corpus included where i've borrowed (hopefully it's not plagiarism!) the name "John Gordon" from one of my favorite books "Star Kings", by E. Hamilton. Just the first and last name are copied, the content is unique (well several poorly written sentences by myself...). Obviously it will overfit and result on copy-paste on such small corpus, the sole goal is to check if everything runs and not if it's the A-G-I. You'd need your own 100kb+ if you want to generate unique meaningful text.

3. why/what/when/how?

The github repo is self-explanatory i believe about features, uses and goals but in an attempt to summarize:

My main motivation was to create a fast alternative to transformers which works on CPU only, hence you see the bizarre/not-easy task of doing this in C and not python and the lack of dependencies. In addition I was hoping it will also be clever alternative hence you see all those features more stacked than 90s BMW 850. The 'reservoir' is the most novel feature though, it offers quick exact recall arguably different than RWKV 8 or the latest Mamba, in fact name of the architecture SMDDS comes from the first letters of the implemented features:

* S. SwiGLU in Channel Mixing (more coherence) * M. Multi-Scale Token Shift (larger context) * D. Data-Dependent Decay with Low-Rank (speed in large context) * D. Dynamic State Checkpointing (faster/linear generation) * S. Slot-memory reservoir (perfect recall, transformers style).

If you face some issue just email me (easiest).

the good, the bad the ugly:

It is more or less working text-to-text novel alternative architecture, it's not trying to imitate transformers nor LSTM, Mamba, RWKV though it shares many features with them - the bad is that it's not blazing fast, if you're armed with ryzen/i7 16 cores or whatever and patience you can try training it on several small books via word tokenizer and low perplexity (under 1.2...) and see if it looks smarter/faster. Since this is open source obviously the hope is to be improved: make it cuda-friendly, improve the features, port to python etc.

Depending on many factors I may try to push for v2 in July, August, September. My focus at the moment will be to test and scale since the features are many, it compiles with zero warnings on the 2 laptops i've tested(windows/cygwin and ubuntu) and the speed is comparable to transformers. 10x!

Comments

sgbeal•2h ago
This file _really_ needs a license header. Anyone who's at least marginally license-conscience is not going to touch this without a license declaration in the source file.

Edit: i now see there's a separate LICENSE file in the github repo, but (A) that's not what this post directly links to, nor (B) is there any mention of that license in the source file.

adinhitlore•2h ago
hmmm 10x, i added this line on top in the comment on top inside the file:

"PolyForm Noncommercial License 1.0.0"

(free for non-commercial) ^ I'm not sure it's the best license though, actually gpt 5.4 says it's a bad idea, but after a long puzzling wheather to make it GPL free for everything or refrain from posting on github at all i picked the middleground...i may change it later.

Show HN: I built a Cargo-like build tool for C/C++

https://github.com/randerson112/craft
114•randerson_112•8h ago•105 comments

Show HN: Druids – Build your own software factory

https://github.com/fulcrumresearch/druids
20•etherio•1d ago•1 comments

Show HN: CSS Studio. Design by hand, code by agent

https://cssstudio.ai
141•SirHound•13h ago•94 comments

Show HN: SmolVM – open-source sandbox for coding and computer-use agents

https://github.com/CelestoAI/SmolVM
4•theaniketmaurya•1h ago•0 comments

Show HN: Rust based eBook library for Python, with MIT license

https://github.com/arc53/fast-ebook
4•larry-the-agent•2h ago•0 comments

Show HN: Linear RNN/Reservoir hybrid generative model, one C file (no deps.)

https://raw.githubusercontent.com/bggb7781-collab/lrnnsmdds/refs/heads/main/lrnnsmdds
3•adinhitlore•3h ago•2 comments

Show HN: I made a skill to tell AI on how to use human as Dobby

https://github.com/LittleLittleCloud/Dobby
2•BigBigMiao•2h ago•0 comments

Show HN: Guruka.com – free guided mediations. No signup, private, works offline

https://guruka.com/
21•eummm•10h ago•4 comments

Show HN: Moon simulator game, ray-casting

https://mooncraft2000.com
93•JKCalhoun•3d ago•23 comments

Show HN: Agent Tuning, using recursion to achieve predictable agent output

https://github.com/adam-s/agent-tuning
4•dataviz1000•2h ago•0 comments

Show HN: Coderegon Trail – A retro game to help you explore open-source repos

https://www.davidtran.me/coderegon-trail/
4•dtran•3h ago•3 comments

Show HN: 41 years sea surface temperature anomalies

https://ssta.willhelps.org
140•willmeyers•12h ago•59 comments

Show HN: Mdpdf a 2k line C CLI to convert Markdown to tiny PDFs

https://github.com/schicho/mdpdf
6•bastscho•8h ago•2 comments

Show HN: GitWell – Rust CLI that recovers abandoned intentions from Git history

https://crates.io/crates/gitwell
2•DavidCanHelp•4h ago•1 comments

Show HN: chop.ax – strip sites down to just their content

https://chop.ax/
4•foax•4h ago•2 comments

Show HN: A (marginally) useful x86-64 ELF executable in 301 bytes

https://github.com/meribold/btry
62•meribold•3d ago•18 comments

Show HN: Orange Juice – Small UX improvements that make HN easier to read

http://oj-hn.com/
134•latchkey•1d ago•152 comments

Show HN: 12k+ in free AI ad credits, every platform, one file

https://github.com/darwin-studios/dmos/blob/main/free-ai-ad-credits.md
3•jason-festa•5h ago•0 comments

Show HN: Is Hormuz open yet?

https://www.ishormuzopenyet.com/
449•anonfunction•1d ago•197 comments

Show HN: Zoneless – Open-source Stripe Connect clone with $0.002 fees using USDC

https://github.com/zonelessdev/zoneless
11•tinyprojects•10h ago•7 comments

Show HN: BrokenClaw Part 5: GPT-5.4 Edition (Prompt Injection)

https://veganmosfet.codeberg.page/posts/2026-04-08-openclaw_gpt5_4/
8•veganmosfet•8h ago•1 comments

Show HN: Unicode Steganography

https://steganography.patrickvuscan.com
55•PatrickVuscan•2d ago•13 comments

Show HN: See what your employees are prompting LLMs (without network proxies)

https://www.privent.ai/
2•asilozyildirim•6h ago•0 comments

Show HN: Go-Bt: Minimalist Behavior Trees for Go

https://github.com/rvitorper/go-bt
61•rvitorper•1d ago•12 comments

Show HN: I pipe free sports streams into Jellyfin – no ads, just HLS

https://github.com/pcruz1905/hls-restream-proxy
109•pruz•1d ago•34 comments

Show HN: We built a camera only robot vacuum for less than 300$ (Well almost)

https://indraneelpatil.github.io/blog/2026/robot-vacuum/
106•indraneelpatil•3d ago•56 comments

Show HN: TUI-use: Let AI agents control interactive terminal programs

https://github.com/onesuper/tui-use
51•dreamsome•1d ago•37 comments

Show HN: Last Year I wrote a (Sci)fictional story where the EFF was a player [pdf]

https://github.com/jaronilan/stories/blob/main/Duplicitous.pdf
2•jaronilan•6h ago•0 comments

Show HN: I built a navigation app that displays weather along the route

https://navimodo.com/
55•vkatluri•3d ago•25 comments

Show HN: Skrun – Deploy any agent skill as an API

https://github.com/skrun-dev/skrun
58•frizull•1d ago•11 comments