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
2•adinhitlore•1h 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•1h 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•54m 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.

Scientists invented a fake disease. AI told people it was real

https://www.nature.com/articles/d41586-026-01100-y
1•DrewADesign•16m ago•1 comments

Show HN: We scored 495 real SoC 2 audit reports – nearly all got a D or F

https://soc2quality.trenta.ai
1•rituraj_tiwari•20m ago•0 comments

Trinity-Large-Thinking: Scaling an Open Source Frontier Agent

https://www.arcee.ai/blog/trinity-large-thinking
1•somethingsome•22m ago•0 comments

Soul.md – A Meditation on AI Identity

https://soul.md/
1•znpy•22m ago•0 comments

GoScrapy: New Fast Web Scraping with Go (Built for Concurrency)

https://github.com/tech-engine/goscrapy
1•stonework•25m ago•0 comments

Mexico's President Sheinbaum Decrees Universal Healthcare for 120M

https://thedeepdive.ca/mexicos-president-sheinbaum-decrees-universal-healthcare-for-120-million/
2•testing22321•25m ago•0 comments

Show HN: AnimTOON – AI that animates SVGs with 3-4x fewer tokens than OmniLottie

https://github.com/srk0102/AnimTOON
2•srk0102•25m ago•0 comments

Open Source Alternative to Claude Managed Agents

https://agents.opencomputer.dev
3•iacguy•26m ago•1 comments

Bespoke OLAP: Using AI to Synthesize Workload-Specific DBMS Engines from Scratch

https://ucbskyadrs.github.io/blog/bespoke-olap/
1•matt_d•27m ago•0 comments

You know what I haven't ever seen? a good blogpost from an AI

1•wrqvrwvq•29m ago•0 comments

PC Repair OKC

https://okcitpros.com/
1•Veritaco•30m ago•1 comments

Automatic U.S. military draft registration planned by December, filing shows

https://www.cnbc.com/2026/04/09/military-draft-registration-automatic-iran-war.html
4•MilnerRoute•32m ago•1 comments

What makes search hard in production

https://www.searchplex.net/blog/what-makes-search-hard
1•eskimo87•34m ago•0 comments

Understanding Agents: Code Coverage for Coding Agents

https://blog.asymmetric.re/understanding-agents-code-coverage-for-coding-agents/
2•matt_d•34m ago•0 comments

Train Your Judgement

https://emilkowal.ski/ui/train-your-judgement
2•cristinacordova•37m ago•0 comments

Workflows in Your ADE

https://reliantlabs.io/
4•steeling1•40m ago•2 comments

SMS delivery is not deterministic: routing defines behavior

https://blog.bridgexapi.io/you-dont-control-sms-delivery-you-control-routing
1•Bridgexapi•44m ago•5 comments

Tell HN: I will pay money for a YouTube front end that stops the "Rec Roulette"

1•frmersdog•46m ago•0 comments

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

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

How bonds ended the Civil War - and led to the rise of J.P. Morgan

https://www.barrons.com/articles/investment-banking-jpmorgan-cooke-economy-04f59e12
3•hhs•52m ago•0 comments

1.9B year old bedrock will soon house first permanent nuclear waste site

https://apnews.com/article/finland-nuclear-waste-disposal-storage-d1a110758e2bd087a9cee43f56f1a05b
3•voxadam•53m ago•0 comments

Ask HN: What would you do with an AI model capable of continuous learning?

4•jballanc•55m ago•2 comments

Layovers Fyi

https://www.layovers.fyi/
4•gsdv•57m ago•1 comments

Any Open Source projects in need of documentation writer?

9•tree666•57m ago•6 comments

Ghost Jobs Tracker

https://ghostjobs.vercel.app/
3•ddmichael•57m ago•1 comments

Prototyping turned into an excuse for not thinking

https://unsung.aresluna.org/prototyping-turned-into-an-excuse-for-not-thinking/
2•latexr•1h ago•0 comments

Ask HN: What should I re-skill in?

3•TbobbyZ•1h ago•2 comments

The internet is deciding what to forget

https://www.ft.com/content/e1c3fd8e-b7c7-4582-a63b-f7b1a2f2bc93
3•hhs•1h ago•0 comments

Cyphernetes – Cypher for Kubernetes

https://cyphernet.es/docs/language
2•fatliverfreddy•1h ago•0 comments

Show HN: 65K synthetic personas project 136 English council elections

https://github.com/Kronaxis/kpm1-election-projections
3•JasonDuke•1h ago•0 comments