惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Recent Announcements
Recent Announcements
雷峰网
雷峰网
The GitHub Blog
The GitHub Blog
罗磊的独立博客
月光博客
月光博客
J
Java Code Geeks
A
About on SuperTechFans
Microsoft Security Blog
Microsoft Security Blog
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
U
Unit 42
C
Check Point Blog
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志
MyScale Blog
MyScale Blog

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
Visualizing tiny LLMs, in parameter golf
lsb · 2026-05-15 · via Hacker News: Show HN

How does a 16MB LLM behave?

There’s a Parameter Golf competition, where people are competing to train various LLMs that fit in 16MB; like code golf, but for parameters of an arbitrary ML model. (I’d entered a diffusion language model.)

The output of the language model is a probability distribution, and people use this probability distribution for a generative sense as well as a discriminative sense.

We can make a small multiple of various entries in the 16MB parameter golf, and compare them to each other as well as to other known benchmarks. This is an exploration of two parameter golf entries, one larger LLM from last year, and a common compressor drafted into service as a generative model as well.

Try it out!

visualization of bpb computation for parameter golf models

visualization of generation computation for parameter golf models

Four Golfers

gzip

One golf participant is gzip, which compresses text based on 1970s-era cutting edge research: compress a repeated phrase into a back-pointer and a length, and compress all of this the repeated and non-repeated phrases with a basic statistical compressor representing letters in English like ‘e’ in fewer bits than ‘z’.

Using gzip to compute the bits per byte for a particular text is straightforward. Run the text through a character at a time, and see how many bytes come out.

Using gzip for generative purposes is tricky! We can compile some potential continuations of text, like in an LLM, create some statistical distribution for probability of each, and sample from this probability distribution. The text is not brilliant, but it is a minimum baseline of taking a coarse probability model of sample text, and using it generatively.

Auto-regressive baseline

This is a 16MB LLM that was the provided starting point for further LLM development, the default train_gpt.py in the repository, very similar to the modded-nanogpt techniques. It runs in 8-bit precision, 16M parameters, one token after another like most popular LLMs.

Masked Diffusion Language Model

This is an ✨original✨ adventure making a minuscule masked diffusion language model. We’d started with a similar architecture to the autoregressive architecture, with a few tweaks to improve performance (like a lower learning rate, and using fp8e4m3 precision instead of int8).

We had a variety of architectural variations, and a variety of bit-precision variations, trying several variations to see what trains the best in 3-minute 1-H100 “scout” runs, before slightly longer runs, and then several long 8-H100 runs.

Larger models running with more steps, initially, performed worse than smaller models running on more training steps. Also, we can take significantly longer for more diffusion steps, which increased quality. Once we extended from 3-minute runs to 10-minute runs, we found that depth of models mattered more than embedding size after a sufficient training budget. We had a few dead ends with low-bitrate quantization (int4/int2/quantization-aware training was less efficient than just training on more data, for a given time budget) and ended up using fp8e4m3 for storage and bf16 for work; different compression methods didn’t help much due to the high-entropy weights.

We also used a variety of evaluation methodologies, including negative evidence lower bound as well as autoregressive mode with the chain rule, and different diffusion strategies. Even training for multiple epochs on all of fineweb did not produce results that bested the autoregressive model.

We reached our tiny research budget for this little experiment on several productive and unproductive threads. Getting better results than the autoregressive baseline (which benefits from lots of the rest of the field doing research) is going to wait for another day. After training for a significantly longer time, the diffusion model gets almost as good, and that is the non-record result.

More research is needed to evaluate the comparative value of small diffusion models versus small auto-regressive models. Often, small models are less general purpose, and even a basic 135M parameter model can work well for a variety of tasks.

SmolLM2-135M-Instruct

This is a small powerful model from Huggingface. There are multiple sizes of SmolLM2 (135M, 360M, 1.7B parameters). Unlike the parameter golf training data, which only uses fineweb, this uses more datasets with greater diversity.

SmolLM2 ties the weights of the token embedding and the language modeling head, and we take special pains to ensure that the quantized token embeddings are identical to the quantized language model head (using tricks to ensure that the protobuf data of both quantized weights overlap, even though they are used in different operators), to get the model down from the 110MB publicly to a 70MB bundle. We also take special pains to ensure that the version of the onnx runtime has the common but outside-the-ONNX-standard 4-bit quantized gather.

(This problem, to quantize an LLM to 4-bit precision, and to ensure that the weight count is what we expect it to be, is exactly the sort of well-scoped problem for a coding agent to tackle for half an hour.)

First course: entropy measurement

This is the main way that the parameter golf is scored: measuring entropy on Fineweb.

We can see, broadly speaking, that gzip starts from zero, and needs to learn all sorts of details about English, while processing the default text, and SmolLM2 has the most number of weights and the lowest entropy, it can predict what is going to be said the best.

Notably, SmolLM2 inference uses a kv cache to reuse attention computations from token to token, so on a desktop the inference for the 135M parameter model actually runs faster than for the 16M model without this kv cache, especially while at the outer ends of the 1024-token context window.

We’re training the diffusion model with a pretty basic objective and diffusion training schedules are still an active research area, like BERT masked training strategies.

Second course: generation

This is more frivolous 🙂 but tries to give a comparative sense of how using the tiny language models works in the common use case of text generation.

Without any external data and with a few kilobyte context window, gzip will have no interesting probability distribution to generate text from, hence why it is mostly repetitive garbage.

The auto-regressive and diffusion language models are both understandable as English but do not produce useful text. SmolLM2, in 80MB, produces more useful text. As before, the more text we generate, the more we rely on the attention cache in the autoregressive models compared to the diffusion model: note that we are decoding the most likely token in the window, and this may change the attention on previous tokens that are still masked.

Let me know what you think!

This project entailed everything from architecture design to training to visualization to fit a few tiny language models into a ~150MB page. It’s exciting to see new architectures for LLMs and working on many tiny experiments quickly is an interesting and productive way forward, especially with tiny language models. Let me know what you think!