Grok-1 · 0.1 BPW

Slice Desk

Locked

Do not reopen these

  • Rank

    r = 243. Expert up-projection, 0.1 BPW, both paths. A corner does not inherit it.

  • Store

    Quote the slice in front of you. Do not mix the formula with the Llama-ratio file size.

  • Init

    Init is not QAT. A bad relative L2 is the result.

  • Score

    No Grok perplexity exists. Do not invent one.

  • Loop

    Slice script only. First run has no weights.

  • Weights

    No checkpoint. Closed weights stay closed.

01 · The number

Rank for this matrix

Paths

Rounded rank

243

exact 242.595 · achieved 0.1002 BPW

Eq. 17

r = (b·N − 32·S) / (2·(S + 16))

N = 201,326,592 · S = 38,912

truncates to 242 at 0.0998 BPW. The script rounds.

FP16402.65 MB
INT8 weights201.33 MB
4-bit group 64106.95 MB
4-bit group 128103.81 MB
4-bit flat100.66 MB
LittleBit2.52 MB

Bars are linear in bytes. LittleBit is the short one. That is footprint, not quality. Group-128 is 41.2× this packed size on the formula.

02 · The model

What the public shapes add up to

xAI publishes 314B, 64 layers, hidden 6144, 8 experts, top-2, vocab 131072. The shape map — three matrices per expert, not two — adds to 316.49B. That matches a community BF16 card and its 633 GB pack. Official active-parameter count: not published.

  • Experts309.24B
  • Attention5.64B
  • Embed805.31M
  • Output head805.31M
  • Router3.15M
Shape total
316.49B
Shape active
84.56B
Official total
314B

Active here is full attention, the top 2 of 8 experts, embed, and an untied head. A community card says ~78B active and does not show the addends. Briefs that say ~86B are 2/8 of the official 314B plus attention. Keep all three. Do not average them.

  • FP16, shape count

    632.98 GB

    Calculated

    316.49B × 2 bytes. Matches the 633 GB community pack.

  • FP16, official 314B

    628.00 GB

    Record

    xAI’s published round number, not the shape addends.

  • Released int8 checkpoint

    318.00 GB

    Record

    Published pack size. This pass does not fetch it.

  • 4-bit group 128

    163.19 GB

    Calculated

    4 + 16/128. Storage only. Not a GPTQ quality claim.

  • 4-bit, no scales

    158.24 GB

    Calculated

    The 157 GB class of figure, on the shape count.

  • LittleBit nominal 0.1

    3.96 GB

    Calculated

    Eq. 16 on every weight. A formula, not a file. Not the Llama-ratio figure.

  • Active, nominal 0.1

    1.06 GB

    Calculated

    84.56B shape-active × 0.1 bit.

Parked · not in the brief

Llama-ratio sizes stay here so they are not lost and not used. Do not add them to the formula, and do not paste them next to the slice.

  • LittleBit, paper ratio

    20.42 GB

    Parked. FP16 ÷ 31 from Llama-2-13B. Not a Grok file. Not in the brief.

  • Active, paper ratio

    5.46 GB

    Parked with the row above. Not the slice.

03 · Where the briefs split

Read this before copying either script

Rank

150–200 is retired

Eq. 17 on the expert up-projection at 0.1 BPW, both paths, is 242.595. Round to 243. Truncating to 242 is still 0.0998 BPW. The guess in brief A is not.

The r = 32 trap

A corner is a new matrix

Brief B set r = 32 on a 4096² corner and called it about 0.1 BPW. Eq. 16 says 0.0469 BPW. The rank that actually targets 0.1 there is 86.

Store

The Llama ratio is parked

The slice quotes its own packed bytes against 4-bit on that same tensor. The full-model formula and the Llama-ratio file size are not that comparison. They do not go in the brief.

Init is not QAT

Sign backward is zero

A short Adam loop that calls .sign() in the forward does not train the binary factors. The paper’s backward is SmoothSign. That is QAT. This loop is init. Llama-2-7B has a QAT WikiText number. No Grok perplexity exists.

04 · Corner check

Same algebra, tiny matrix, this page

No weights are downloaded. This is a random corner so the group can see init lose to 4-bit before anyone spends a night on SVD. It is not the expert, and it is not QAT.

Floor for 160², both paths: 0.4263 BPW. Legal rank 4 (exact 3.81).

05 · Jobs

Six things. Then stop.

0/6

Checks stay in this browser. Send the link, not the checkmarks. The chat still needs the two error numbers.

  1. r = 243 stays locked

    Expert up-projection, 0.1 BPW, both paths. Eq. 17 is 242.595, rounded. A corner gets its own rank. Nobody pastes 243 onto a smaller matrix.

  2. Init is not QAT

    Dual-SVID on the slice is an initialization. Relative L2 will lose to 4-bit. Do not call that a failed quant, and do not run SmoothSign or five epochs on this box.

  3. No Grok perplexity exists

    Llama-2-7B at 0.1 after QAT is a paper number. There is no WikiText, no C4, no other score for a LittleBit Grok-1. Leave the blank blank.

  4. Slice script only

    python littlebit_slice.py with no weights. The print carries the expert rank and the error on the synthetic tensor. That is the whole loop.

  5. No checkpoint

    Do not download the 318 GB int8 pack, a BF16 shard, or a community conversion. The script does not need them.

  6. Closed weights stay closed

    Public Grok-1 shapes are the record. Later or unreleased Grok weights are not this job. Do not go looking for a private file.

06 · The script

Slice script only

No checkpoint. The run is a 256² synthetic at 0.5 BPW, and the print still carries expert r = 243. Init is not QAT. If the target sits under the scale floor, the script stops instead of inventing a result.

#!/usr/bin/env python3
"""Slice Desk — LittleBit init on one synthetic matrix.

LOCKED
- Expert up-projection reference rank is 243. Do not paste it onto this tensor.
- Init is not QAT. Do not add an optimizer.
- No Grok perplexity exists. Do not print one.
- This file is the whole loop. Do not download a checkpoint.
- Closed weights stay closed.
"""
import argparse
import json
import time
import torch


def bits(dout, din, r, paths=2):
    span = dout + din
    return paths * (r * span + 16 * (span + r))


def rank_for(bpw, dout, din, paths=2):
    n = dout * din
    span = dout + din
    exact = (bpw * n - paths * 16 * span) / (paths * (span + 16))
    floor_bpw = bits(dout, din, 1, paths) / n
    feasible = exact >= 1
    r = max(1, int(round(exact))) if feasible else 1
    return exact, r, floor_bpw, feasible


def dual_svid(W, r):
    # Truncated SVD, sign factors, rank-1 magnitude scales. Eq. 6-8.
    U, S, Vh = torch.linalg.svd(W.float(), full_matrices=False)
    r = min(int(r), int(S.numel()))
    root = S[:r].sqrt()
    Uf = U[:, :r] * root
    Vf = Vh[:r, :].T * root
    Us = torch.sign(Uf)
    Vs = torch.sign(Vf)
    Us = torch.where(Us == 0, torch.ones_like(Us), Us)
    Vs = torch.where(Vs == 0, torch.ones_like(Vs), Vs)

    def rank1(M):
        u, s, vh = torch.linalg.svd(M.abs(), full_matrices=False)
        return u[:, 0] * s[0].sqrt(), vh[0] * s[0].sqrt()

    h, lu = rank1(Uf)
    g, lv = rank1(Vf)
    return Us, Vs, h, g, (lu * lv)


def reconstruct(Us, Vs, h, g, l):
    # diag(h) Us diag(l) Vs^T diag(g), without building the diagonal matrices.
    mid = (Vs * l) @ Us.T
    return h[:, None] * mid.T * g[None, :]


def both_paths(W, r):
    pri_f = dual_svid(W, r)
    pri = reconstruct(*pri_f)
    res_f = dual_svid(W - pri, r)
    hat = pri + reconstruct(*res_f)
    return hat, pri_f, res_f


def forward(X, Us, Vs, h, g, l):
    # Y = (((X * g) @ V_sign) * l) @ U_sign.T * h
    z = (X * g) @ Vs
    z = z * l
    return (z @ Us.T) * h


def quant4(W, group=128):
    # Group absmax proxy. 16 code points stand in for NF4. Not GPTQ.
    flat = W.reshape(-1)
    pad = (group - flat.numel() % group) % group
    x = torch.nn.functional.pad(flat, (0, pad)).view(-1, group)
    scale = x.abs().amax(1, keepdim=True).clamp_min(1e-8)
    q = (x / scale * 7).round().clamp(-8, 7)
    hat = (q / 7) * scale
    return hat.reshape(-1)[: flat.numel()].reshape(W.shape)


def rel(a, b):
    return (a - b).norm() / b.norm().clamp_min(1e-12)


def main():
    p = argparse.ArgumentParser()
    p.add_argument("--rows", type=int, default=256)
    p.add_argument("--cols", type=int, default=256)
    p.add_argument("--bpw", type=float, default=0.5)
    p.add_argument("--seed", type=int, default=0)
    p.add_argument("--seq", type=int, default=64)
    args = p.parse_args()

    ref_exact, ref_r, _, _ = rank_for(0.1, 32768, 6144)
    ref = {
        "expert_up_shape": [32768, 6144],
        "expert_up_r_exact": round(ref_exact, 4),
        "expert_up_r": ref_r,
        "expert_up_mb": round(bits(32768, 6144, ref_r) / 8 / 1e6, 3),
        "expert_up_note": "Locked reference. r is 243. This run does not load that matrix.",
    }

    g = torch.Generator().manual_seed(args.seed)
    W = torch.randn(args.rows, args.cols, generator=g)
    src = "synthetic %dx%d seed %d" % (args.rows, args.cols, args.seed)

    dout, din = int(W.shape[0]), int(W.shape[1])
    exact, r, floor_bpw, ok = rank_for(args.bpw, dout, din)
    report = {"source": src, "shape": [dout, din], **ref}
    if not ok:
        report.update({
            "stopped": True,
            "reason": "target BPW is below the fp16-scale floor for this shape",
            "floor_bpw": round(floor_bpw, 4),
            "target_bpw": args.bpw,
        })
        print(json.dumps(report, indent=2))
        return

    try:
        t0 = time.perf_counter()
        hat, pri, res = both_paths(W, r)
        fit_s = time.perf_counter() - t0
    except RuntimeError as exc:
        report.update({"stopped": True, "reason": "svd failed: %s" % exc})
        print(json.dumps(report, indent=2))
        return

    q = quant4(W)
    X = torch.randn(args.seq, din)

    def timed(fn, n=8):
        for _ in range(2):
            fn()
        t = time.perf_counter()
        for _ in range(n):
            fn()
        return (time.perf_counter() - t) / n

    little = timed(lambda: forward(X, *pri) + forward(X, *res))
    dense = timed(lambda: X @ W.T)
    report.update({
        "stopped": False,
        "bpw_target": args.bpw,
        "r_exact": round(exact, 4),
        "r": r,
        "bpw_achieved": round(bits(dout, din, r) / W.numel(), 6),
        "floor_bpw": round(floor_bpw, 4),
        "littlebit_mb": round(bits(dout, din, r) / 8 / 1e6, 4),
        "fp16_mb": round(W.numel() * 2 / 1e6, 3),
        "g4_group128_mb": round(W.numel() * 4.125 / 8 / 1e6, 3),
        "littlebit_rel_l2": round(rel(hat, W).item(), 6),
        "g4_rel_l2": round(rel(q, W).item(), 6),
        "init_seconds": round(fit_s, 3),
        "seq": args.seq,
        "littlebit_forward_ms": round(little * 1e3, 2),
        "fp32_forward_ms": round(dense * 1e3, 2),
        "note": "Init only, both paths, dense sign matmul. Not QAT. Not the 11.6x kernel claim.",
    })
    print(json.dumps(report, indent=2))


if __name__ == "__main__":
    main()

07 · The brief

Paste this in the chat

It follows the matrix on the rank panel. Change the shape up top and the brief changes with it. The expert line stays put, so a corner cannot steal r = 243.

SLICE DESK — group brief
LOCKED
r = 243 on the expert up-projection (0.1 BPW, both paths). Do not paste 243 onto a corner.
Init is not QAT.
No Grok perplexity exists.
Slice script only. No checkpoint.
Closed weights stay closed.
Do not mix the slice store with the Llama-ratio file size. That figure is parked on the desk and is not in this brief.

This tensor: 32768 × 6144
Target 0.1000 BPW · both paths (Eq. 17)
Exact rank 242.595 → use r = 243
Achieved 0.1002 BPW · packed 2.52 MB
FP16 402.65 MB · 4-bit group-128 103.81 MB

Expert up-projection, reference only. Do not reuse this rank on a corner.
32768 × 6144 at 0.1, both paths → r = 243 (exact 242.595)
Packed 2.52 MB. That is the expert slice, not a full-model file.

Settled
- Brief A guessed rank 150–200. Eq. 17 is 242.6. Round to 243.
- Brief B set r=32 on 4096² and called it ~0.1. It is 0.0469. Honest rank is 86.
- 4-bit on this same tensor is the only size comparison that ships with the run.
- Each expert is three matrices (up, gate, down), not one.
- A short Adam loop through .sign() does not train the binary factors. The paper uses SmoothSign. That is QAT. This is not.

Loop
python littlebit_slice.py
No weights. Synthetic 256² at 0.5 BPW. The print still carries expert r = 243.
4-bit should win on relative L2. That is init, not a bug, and not a perplexity.
Stop.