St

Static-allocation MLP inference in ANSI C using a 2-slot ring buffer

Hacker News

Static-allocation MLP inference in ANSI C using a 2-slot ring buffer

I've been experimenting since 2019 with ways to minimize RAM usage for tiny MLP inference on microcontrollers. [0] This project is the result of that exploration: a fully static-allocation approach to MLP inference in ANSI C, using a simple 2-slot ring buffer to keep memory usage predictable and extremely low, while at the same time fast. I believe this is close to the practical lower bound for RAM usage in general-purpose CPU MLP inference without sacrificing speed or introducing runtime complexity. A more aggressive approach I've previously used is allocating and freeing memory per layer-to-layer pair during inference, but that introduces overhead and fragmentation if not used carefully. [1] Curious how it compares to other minimal inference implementations people have seen (or built). Feedback and edge cases welcome. Hope you like it. Have fun. <3 [0]: https://github.com/GiorgosXou/NeuralNetworks#-research [1]: look for REDUCE_RAM_DELETE_OUTPUTS in the source of [0]

Share card

Actual performance

4points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: tiny, using · Missing: mac, agents, macos
89%89% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: io · Missing: https docs, excited, just released
67%67% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
55%55% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRFits verified-revenue profile · Strong signals: way · Missing: mobile apps, ios, personal
51%51% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
40%40% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
18%18% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: introduce · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

St
Static photoessay generator using gulp49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Static photoessay generator using gulp

Hacker News5
Be
Bert NLP inference in browser using WebAssembly-SIMD72%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Bert NLP inference in browser using WebAssembly-SIMD

Hacker News2
St
Static StackOverflow59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Static StackOverflow

Hacker News1
Xr
Xr0 is a Static Debugger for C64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Xr0 is a Static Debugger for C

Hacker News36
By
Bypassing Transformer Softmax via Static Contraction54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Bypassing Transformer Softmax via Static Contraction

Hacker News7
St
Static-Weber58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Static-Weber

Hacker News3
St
Static Weber58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Static Weber

Hacker News1
St
Static Tic Tac Toe with AI40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Static Tic Tac Toe with AI

Hacker News3
Eu
Euro 2016 predictions using Bayesian inference60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Euro 2016 predictions using Bayesian inference

Hacker News79
DI
DIY (static) 'Revolights' using EL-Tubes54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

DIY (static) 'Revolights' using EL-Tubes

Hacker News1