$ cat BOGO.md ## About - Integer-native training of transformer-based LLMs, as a PyTorch package with custom GPU kernels - Higher throughput than AdamW8bit on NVIDIA's Ada, Ampere, and Hopper GPUs, in about half its memory - Quality that matches or beats AdamW8bit on the same data, in fine-tuning and continued pretraining - Near half the cost per result: jobs that need several GPUs under AdamW8bit fit on fewer, cheaper GPUs - Full-parameter training that can write GGUF Q8_0 artifacts directly, with no post-training quantization ## Usage
One line changes in an ordinary PyTorch training loop. bogo.convert() turns the model's linear layers into BOGO layers in place, bogo.Optimizer() trains them, and the rest of the loop stays as it is. When training ends, bogo.export(model) puts standard weights back for save_pretrained().
import torch,-bitsandbytes+ bogo from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained( "meta-llama/Llama-3.1-8B", dtype=torch.bfloat16 ).cuda() # One-line change: -optimizer = bitsandbytes.optim.AdamW8bit(model.parameters(), lr=2e-5)+ optimizer = bogo.Optimizer(bogo.convert(model), lr=2e-5) for batch in loader: loss = model(**batch).loss loss.backward() optimizer.step() optimizer.zero_grad() # Standard weights back, saved as usual: + bogo.export(model)model.save_pretrained("out")
## Performance
Training speed on the same hardware, both optimizers compiled. Where both fit a given GPU, BOGO trains faster in less memory. On GPUs where AdamW8bit has to page its state to the host, BOGO runs the same model entirely on the card at more than twice the rate. Where AdamW8bit cannot run at all on a given GPU, BOGO still fits.
Maximum throughput
Tokens/sec · batch 8 · 1k window
- AdamW8bit
- 3,965 tok/s · 72.3 GB8B on one A100 80 GB card;
will not fit a 40 GB card - BOGO
- 5,854 tok/s · 50.2 GB8B on one A100 80 GB card;
5,349 on one 40 GB card
48% faster at 8B on an A100 at batch 8, AdamW8bit's fastest (58% at batch 4, 80% at batch 2); 47% at 8B on an H200, 50% at 3B on an L40S, 33% at 1B on an A10G.
Tokens per second in the steady state, after compilation.
Single card fit
One L40S · the fastest each runs
- AdamW8bit
- 1,470 tok/sLlama 3.1 8B, state paged to the host
- BOGO
- 5,242 tok/sLlama 3.1 8B, on the card
3.6× at 8B; above 8B only BOGO can run. AdamW8bit's 8B runs only with its state paged to host memory; the 12B and Moonlight 16B are out of memory even paged at micro-batch 1, and the 14B's weights and gradients alone exceed the card.
Each optimizer at its fastest configuration that fits.
At scale
Llama 3.1 70B · A100s, sharded
- AdamW8bit
- 3,140 tok/sneeds eight 80 GB cards
- BOGO
- 4,053 tok/son eight 40 GB cards
2.1× less per token. BOGO runs 29% faster on eight 40 GB A100s than AdamW8bit on the eight 80 GB A100s it needs, and the 40 GB cards cost 38% less an hour ($15.92 against $25.52 for eight, Lambda on-demand).
AdamW8bit sharded (FSDP) over eight 80 GB cards; BOGO row-sharded on eight cards.
How to read the performance data
Tokens per second (tok/s) is the training rate in the steady state: tokens processed per second once compilation is done, over the same FineWeb-Edu text. The first pane holds every setting equal across the two methods, on one host, so the difference is the optimizer. The other two compare each optimizer at its fastest configuration that fits the hardware: where AdamW8bit has to page its state, checkpoint, or cut the batch to fit, that is its rate. Memory is PyTorch's peak per card.
Sources: receipts 2026-11-10 (AdamW8bit's 12B on an L40S), 2026-11-13 (the 1B on an A10G; the 3B and 8B on an L40S; AdamW8bit's 70B on eight A100 80 GB), 2026-11-18 (BOGO's 3B and 8B on one L40S), 2026-11-20 (BOGO's 70B on eight A100 40 GB), 2026-11-22 (BOGO's 12B, 14B and Moonlight 16B on one L40S; AdamW8bit's Moonlight on an L40S), 2026-11-29 (the 8B on one A100 80 GB, one A100 40 GB and one H200).
## Quality
Scored by standard benchmarks and by held-out loss, models trained with BOGO match or beat AdamW8bit on every test we have run: ahead or level on both fine-tunes and continued pretraining. Both optimizers' learning rates swept for best results. Results shown are means over seeds.
Fine-tune a vision model
Gemma 4 12B · ChartQA · one epoch
- base
- 42.6%
- AdamW8bit
- 87.8% ± 1.1 · 5 seeds:89.2, 88.4, 86.6, 88.0, 86.6
- BOGO
- 88.0% ± 0.6 · 5 seeds:87.6, 87.4, 87.8, 88.8, 88.2
ChartQA test — 500 questions about charts, each answered from the image; the percentage answered correctly.
Relaxed match, greedy decoding.
Fine-tune a text model
Llama 3.1 8B · GSM8K · one epoch
- base
- 49.3%
- AdamW8bit
- 59.3% ± 1.1 · 5 seeds:58.8, 57.8, 60.0, 59.4, 60.5
- BOGO
- 61.0% ± 1.1 · 5 seeds:60.8, 61.9, 62.3, 59.8, 60.0
GSM8K test — 1,319 grade-school math word problems; the percentage of exactly correct final answers.
5-shot, scored by lm-evaluation-harness.
Continue pretraining
Llama 3.1 8B · fineweb-edu · 100M tok
- base
- 2.1836
- AdamW8bit
- 2.1300 ± 0.018 · 5 seeds:2.116, 2.118, 2.151, 2.148, 2.116
- BOGO
- 2.1307 ± 0.016 · 5 seeds:2.118, 2.121, 2.148, 2.149, 2.118
Held-out loss — how well the model predicts text it was not trained on, from the same source; lower is better.
LAMBADA, HellaSwag, ARC-Easy and PIQA: within one standard error of each other.
How to read the quality data
In each of the panes above, the three numbers (base, AdamW8bit, BOGO) are the results of the same test applied to the base model and to each method's fine-tuned checkpoints, trained on the same tokens in the same order. The big number is the mean over seeds, the small one beside it one standard deviation, with the seeds listed; each seed gives both methods the same sample order, so a seed is a paired comparison. Both methods' learning rates were swept and the best of each is shown. Where AdamW8bit and BOGO land within a seed's spread of each other, the test cannot tell the methods apart; on that test their results are equivalent.
On the 100M pretraining pane each seed also draws its own held-out slice, so most of the spread between seeds (0.016 to 0.018 of loss) is the slice, and the comparison to read is the paired one. BOGO minus AdamW8bit over the five seeds: +0.0013, +0.0026, −0.0029, +0.0010, +0.0015. The mean is 0.0007 with a standard error of 0.0009: under one standard error from zero, a twenty-fifth of the spread between seeds, 0.07% in perplexity.
Sources: receipts 2026-11-07 and 2026-11-14 (Gemma 4 ChartQA, one epoch, both methods swept, five seeds), 2026-11-08/09 and 2026-11-10/11 (GSM8K, five seeds), 2026-11-28/29 (both fine-tunes, BOGO's five seeds at its fastest L40S settings; Gemma, AdamW8bit's five seeds at 64 a step, its fastest), 2026-11-08, 2026-11-10/11 and 2026-11-12 (8B 100M, the sweeps and the paired seeds).
## Costs
The three jobs from the ## Quality section above, BOGO and AdamW8bit each run on the cheapest per-token hardware they fit, at settings that keep each method's best quality; steady-state rates, compile time excluded. BOGO's one L40S costs less per hour than the A100 80 GB AdamW8bit needs, and the result per dollar follows. Prices illustrative, at Hugging Face Jobs per-GPU rates (the At scale pane above uses Lambda's, which list 40 GB A100s).
Fine-tune a vision model
Gemma 4 12B · ChartQA · one epoch
- AdamW8bit
- $0.34 per M tok1 × A100 80 GB · 2,015 tok/s
- BOGO
- $0.20 per M tok1 × L40S 48 GB · 2,447 tok/s
1.7× less per token. AdamW8bit does not fit one L40S. On one H200, where both fit: 6,328 against 6,214 tok/s, level.
Steady-state rates, compile time excluded; Hugging Face Jobs prices. BOGO: one L40S, 48 a step. AdamW8bit: one A100 80 GB, 64 a step. Measured 2026-11-29/30.
Fine-tune a text model
Llama 3.1 8B · GSM8K · one epoch
- AdamW8bit
- $0.24 per M tok1 × A100 80 GB · 2,856 tok/s
- BOGO
- $0.13 per M tok1 × L40S 48 GB · 3,777 tok/s
1.8× less per token. On one H200, where both fit: 12,884 against 7,528 tok/s, 1.7× faster and cheaper.
Steady-state rates, compile time excluded; Hugging Face Jobs prices. BOGO: one L40S, 12 a step. AdamW8bit: one A100 80 GB, 32 a step, no checkpointing with MLP recompute (its fastest). Measured 2026-11-29/30.
Continue pretraining
Llama 3.1 8B · fineweb-edu · 100M tok
- AdamW8bit
- $0.17 per M tok1 × A100 80 GB · 3,981 tok/s
- BOGO
- $0.10 per M tok1 × L40S 48 GB · 5,129 tok/s
1.8× less per token. On one A100 80 GB, batch for batch: 5,854 against 3,965 tok/s, 1.5× faster and cheaper.
Steady-state rates, compile time excluded; Hugging Face Jobs prices. BOGO: one L40S, micro-batch 4 × 2. AdamW8bit: one A100 80 GB, micro-batch 8: the same 8 sequences a step. Measured 2026-11-29.
How to read the cost data
Each pane prices its ## Quality job: the method's steady-state tokens per second (compile time excluded) on the cheapest per-token card that runs it, times that card's hourly price, gives dollars per million tokens. AdamW8bit's 8B and 12B do not fit one L40S unpaged, so its cheapest card is one A100 80 GB; BOGO's is one L40S. Prices: Hugging Face Jobs, 2026-11-19 (L40S $1.80 an hour, A100 80 GB $2.50, H200 $5.00).
Sources: receipts 2026-11-29 and 2026-11-30 (Gemma 4 12B and Llama 3.1 8B fine-tunes on one L40S, one A100 80 GB and one H200; the Llama 3.1 8B pretraining rates on one L40S and one A100 80 GB).
## Value
The same 8B continued-pretraining run, priced as it progressed: held-out loss against the dollars spent, each optimizer on the cheapest per-token hardware it runs on. Five seeds, averaged; hover a curve to read both methods at any spend, and what the other method paid for the same loss.
Loss against dollars
Llama 3.1 8B · fineweb-edu · 100M tok · AdamW8bit on 1 × A100 80 GB, BOGO on 1 × L40S
Dollars — the run's tokens at each method's measured rate on its card, times the card's Hugging Face Jobs price (L40S $1.80 an hour, A100 $2.50 a card-hour; Hugging Face's A100 is the 80 GB card).
Rates: AdamW8bit 3,981 tok/s on one A100 80 GB (at micro-batch 8, the run's 8 sequences a step), BOGO 5,129 on one L40S (at the run's micro-batch 4), measured 2026-11-18 and 2026-11-29. The other card choices are in the table.
The last 0.0007 of loss
What AdamW8bit's final costs
At BOGO's whole spend, $10, AdamW8bit stands at 2.1329 — 0.0022 of loss behind BOGO's 2.1307, 0.22% in perplexity.
AdamW8bit matches BOGO's 100M result for 1.6× the money, then spends about $2 more for its own final — 0.0007 of loss, 0.07% in perplexity: for a difference under one standard error of the paired comparison (0.0009), a cost 1.8x BOGO's whole run.
Composite of the five seeds; the per-seed pairs are on the pretraining pane above.
The table: tokens, hours and dollars to a loss
Tokens from the composite curves (the five seeds averaged at each evaluation; the first point at or below the loss, interpolated); hours and dollars from each method's measured rate on the card — AdamW8bit on 1 × A100 80 GB 3,981 tok/s (at micro-batch 8, the run's batch), on 1 × L40S paged 1,040 (at the run's micro-batch 4; 1,470 at micro-batch 8, a different batch from the curves'); BOGO on 1 × A100 40 GB 5,057, on 1 × L40S 5,129, both at the run's micro-batch 4, measured 2026-11-18 and 2026-11-29. Priced at Hugging Face Jobs rates, 2026-11-19.
| held-out loss | tokens (M) | hours on A100 | $ on A100 | $ on L40S | ||||
|---|---|---|---|---|---|---|---|---|
| AdamW8bit | BOGO | AdamW8bit | BOGO | AdamW8bit | BOGO | AdamW8bit | BOGO | |
| 2.1360 | 18 | 12 | 1.3 | 0.7 | $3.1 | $1.7 | $8.8 | $1.2 |
| 2.1340 | 37 | 28 | 2.6 | 1.6 | $6.5 | $3.9 | $17.7 | $2.8 |
| 2.1330 | 53 | 39 | 3.7 | 2.1 | $9.2 | $5.3 | $25.6 | $3.8 |
| 2.1320 | 76 | 58 | 5.3 | 3.2 | $13.3 | $8.0 | $36.4 | $5.7 |
| 2.1310 | 87 | 92 | 6.1 | 5.0 | $15.2 | $12.6 | $41.8 | $8.9 |
| 2.1307 BOGO's 100M final | 90 | 100 | 6.3 | 5.5 | $15.7 | $13.8 | $43.0 | $9.7 |
| 2.1300 AdamW8bit's 100M final | 100 | — | 7.0 | — | $17.4 | — | $48.1 | — |
A dash: the curve never reaches that loss within its 100M tokens. The two 100M finals come after each run's own decay; the mid-run rows compare the curves at the same loss before either has decayed. Tokens from the paired curves (the first eval at or below the loss, interpolated); the A100 rows are one card each (BOGO's measured on a 40 GB card); the L40S rows the same tokens at each method's L40S rate.
## Deployment
BOGO exports standard Safetensors, or trains directly to GGUF. At the end of a run the trainer can write the model as GGUF Q8_0, with exactly the weights as trained: no post-training quantization, no calibration set, and therefore no second evaluation to see what quantizing cost.
# AdamW8bit: floating-point weights train → save bf16 → convert to GGUF → quantize to Q8_0 → evaluate again → serve # BOGO: the trained weights are the Q8_0 file train → save Q8_0 GGUF → serve
- The served weights are the evaluated ones: the saved Q8_0 file and a bf16 export match element for element - No quantization recipe to choose, tune or keep per model, and no calibration data to curate - llama.cpp serves the BOGO Q8_0 GGUF file as is, vision included - No quality degradation: ChartQA (1M-token run) scores 85.0 from the Q8_0 file and 84.8 from bf16 in llama.cpp - Llama 3.x, Gemma 4 and Qwen3-VL today; Moonlight next
## Status - Patent pending; utility application filed 2026-10-30 - Dense and MoE MVP on Ada (L40S), Ampere (A100, A10G), and Hopper (H200) - Blackwell (B200) planned - Demos on request, each on one L40S: Llama 3.1 8B, Qwen3-VL 8B, Gemma 4 12B and Moonlight 16B-A3B ## Contact Email contact@algorithm-intelligence.ai to discuss these results or a pilot project. (c) 2026 Algorithm Intelligence LLC / Joseph Santaniello $ ls --hyperlink=auto reports/ BOGO-Evaluation-Report-Gemma4-12B-ChartQA.pdf BOGO-Evaluation-Report-Llama3.1-8B-GSM8K.pdf BOGO-Evaluation-Report-Moonlight-16B-PubMedQA.pdf BOGO-Evaluation-Report-Qwen3-VL-8B-ChartQA.pdf
$ !42 echo "Pretty good results, right?" | claudesay ___________________________ / As measured, yes. \ \ Can be confirmed anytime. / --------------------------- \ \ \ | / \ . \ | / . '. \ | / .' ----- ( o_o ) ----- .' / | \ '. ' / | \ ' / | \
$