Memory ration book · series 2026 · rambudget 0.1.0

RAM Famine

Memory is rationed now. Before a model asks for its share, count what it needs — every parameter, every byte of cache — exactly.

Window 1

Allocation

Back to the windows

Fill in the form. Pick a starting shape or paste a model's config.json; the slip on the right counts every part. Nothing is sent anywhere — the counting happens in this page.

1. The model

2. How it is stored
3. How it is used
Allocation slipNo. —

The allocation, part by part

      Window 2

      The queue

      Back to the windows

      Every device in the queue gets an answer for the allocation above: granted or refused, the share of its memory it would take, and the longest context that fits there.

      Memory the model may use

        The share a device lets one model use is your assumption, not a measurement; framework overhead is only counted if you entered it at Window 1.

        Window 3

        The famine, counted in phones

        Back to the windows

        Memory that goes into AI servers is memory that does not go into phones. Pick an accelerator and how many; each mark below is one 12 GB phone's worth of memory.

        Window 4

        Bulletin No. 1

        Back to the windows

        Issued by the memory ration office · 14 October 2026 · rambudget 0.1.0

        Counting a Model's Memory Exactly

        Parameters, weights and the key-value cache from a model's shape, checked against the library that builds the models

        1. Summary

          rambudget counts the memory a decoder-only language model needs from its shape: every parameter, the bytes of the weights in a chosen number format, and the key-value cache for a context and a batch. What it cannot know — framework overhead, working memory — is an input, not a guess. Its counts were compared with models built by the transformers library: 600 of 600 parameter counts and 48 of 48 cache sizes are equal.

        2. Background

          On 9 October 2026 MacRumors, citing Nikkei Asia, reported that Apple had asked suppliers to cut component orders for the iPhone 18 Pro for October by at least 15% after lower-than-expected demand [1]. The phones start at $1,199 and $1,299, $100 more than the models they replace; Apple has publicly blamed AI-driven memory chip costs for price rises across its line-up. The Pro models keep 12 GB of RAM; a rumour said 16 GB had been planned and dropped over cost [1].

          Not connected. rambudget, this site and $RAMFAM have no connection with Apple, Nikkei Asia, MacRumors or any company that makes memory or AI models, and none of them has seen this bulletin.

        3. The count

          For each family the parameters are the embedding (and learned positions where the family has them), the attention projections per layer — fewer key-value heads shrink the keys and values — the feed-forward matrices (three for gated families, × experts for mixtures, plus the router), the norms, and the output layer unless it is tied to the embedding. Weights are priced per format; 8- and 4-bit formats carry their scales, and keep embeddings and norms at 16 bits unless told otherwise. The cache is 2 × layers × key-value heads × head size × bytes for every token of every sequence; a sliding window keeps only the last window − 1 tokens.

        4. The check

          A script builds random models of all six families with the transformers library itself, on its "meta" device so they take no memory, and counts their parameters; it also runs 48 tiny models on a CPU and measures the cache they keep. The first run found two real errors in rambudget, both fixed before release: gemma's head size defaults to 256 rather than width ÷ heads (and its output projection takes a bias), and a sliding window keeps window − 1 tokens, not window.

          Table 1. rambudget against models built by transformers 5.19.0.
          RunParameter counts equalCache sizes equal
          First run520 of 60039 of 48
          After the fixes600 of 60048 of 48

        5. Shapes you may know

          The counts of the starting shapes equal the counts published for the public models they describe, to the parameter.

          Table 2. The starting shapes.
          ShapeParametersbf16int4Cache per token
        6. Limits

          Six families of decoder-only transformers; other shapes are not counted. Device sizes are treated as GiB. The share of a device's memory one model may use, and the overhead, are yours to set. Quantized files vary by a few percent with the method.

        7. References

          1. T. Hardwick, MacRumors, 9 October 2026: iPhone 18 Pro orders reportedly cut after a price rise dampens demand (citing Nikkei Asia). macrumors.com
          2. rambudget 0.1.0, the library on this page (MIT), and its check/ folder.

        By order of the ration office · post on the board · do not remove

        Window 5

        Ration card · $RAMFAM

        Back to the windows
        Ration cardHolder: anyone

        RAM Famine $RAMFAM

        Card number (contract address)

        FZu9nxS72VUGqCzdezNbPNfbAduMpnoPfY3dUg8pump

        Valid at

        Supply
        1,000,000,000
        Tax
        0%
        Site
        v1.0

        Today's rations

        • Price—
        • Market cap—
        • Volume, 24 h—
        • Liquidity—
        • Change, 24 h—

        Chalking up today's figures.

        Posting the chart…
        Posted notice · $RAMFAM · 1-second candlesOpen the chart
        Window 6

        The register

        Back to the windows

        rambudget 0.1.0: one file, no dependencies, Node 18 and later and every modern browser. MIT licence. Every file of the repository is entered in the register with its folio, size and SHA-256.

        The repository
        FolioEntrySizeSHA-256

        Downloads

        Quick start

        const B = require("./rambudget.js");
        const cfg = require("./config.json");          // as it is
        B.params(cfg).total;
        B.budget(cfg, { format: "int4", context: 8192 }).total;
        B.fits(B.budget(cfg).total, { usable: 0.5 });
        B.maxContext(cfg, 12, { format: "int4" }).tokens;
        node bin/rambudget.js plan --config config.json --format int4
        node bin/rambudget.js fit --shape gqa-8b --usable 0.5
        node check/compare.js
        npm test

        The API

        rambudget functions