# Project submission: quantal — a BitNet b1.58 ternary inference stack + its provenance-grade training corpus (Cogito Ergo Summa Summarum)

**URL:** <https://devcommunity.amd.com/t/project-submission-quantal-a-bitnet-b1-58-ternary-inference-stack-its-provenance-grade-training-corpus-cogito-ergo-summa-summarum/859>\
**Category:** Showcase\
**Tags:** ai, performance, tutorial, gpu, developer-program\
**Created:** [August 18, 2026, 4:13pm UTC](https://devcommunity.amd.com/t/project-submission-quantal-a-bitnet-b1-58-ternary-inference-stack-its-provenance-grade-training-corpus-cogito-ergo-summa-summarum/859 "2026-08-18T16:13:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Lodri](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@Peter\_Lodri](https://devcommunity.amd.com/u/Peter_Lodri)\
**Post date:** [August 18, 2026, 4:13pm UTC](https://devcommunity.amd.com/t/project-submission-quantal-a-bitnet-b1-58-ternary-inference-stack-its-provenance-grade-training-corpus-cogito-ergo-summa-summarum/859/1 "2026-08-18T16:13:10Z")

</div>

```auto
Hi AMD AI Developer Program team,

I'm a solo developer building openly on the local-AI frontier. I'd like to submit my project for featuring — it's two halves of one system, both fully open source.

## 1. quantal — thresholded-ternary (BitNet b1.58) inference in MLX

A complete quantization + inference stack that compresses transformer weights to a {-1, 0, +1} ternary space:

- **2 bits/weight** — 989 MB quantal_model.safetensors for a 494M-parameter model (Qwen2.5-0.5B base, hidden 896, G=64 zero-state band). Live at `huggingface.co/PeetPedro/quantal-ternary`.
- **Codebook capsule with cryptographic provenance** : every run ships `index.json` declaring `checkpoint_sha256`, sizes, and per-matrix dims — so a shipped artifact can be audited against the declared source byte-for-byte. A third-party audit (Dipankar Das) verified the manifest and found one real defect (shipped weights ≠ declared checkpoint); we fixed the process, not the story: the capsule stays the authority, and a post-push hash gate now fails releases that don't match the manifest. Provenance is machine-readable the whole time.
- **Student model on the horizon** : `PeetPedro/quantal-classroom-1.6` — a Qwen3-1.7B student trained with 8+1 open-weight teachers (deepseek-pro pupil, faculty Qwen3-8B/14B), val_loss 1.6120, thresholded-ternary with a harness gate. The teacher-student loop and the "shipped means measured" ethos are the core of the project.
- **Live demo** : quantal runs in-browser at pocoo.vaked.dev/demos/quantal/ (embeddings.f16 + norms.f32 + ternary codebook, full matrix multiply on device).

## 2. THE CORPUS OF COGITO ERGO SUMMA SUMMARUM — the training data side

The quantal classroom needed a serious corpus, so I built one — and it became its own project:

- **The complete public output of GitHub user `standardgalactic`** : ~24k repositories (458 original repos + small/medium forks, everything ≤300 MB of actual content). Streamed to `huggingface.co/datasets/PeetPedro/cogitoergosumma-corpus` (public, `load_dataset`-compatible JSONL, ~18k repos processed and growing) plus a ~78 GB public HF bucket archive as the durable copy.
- **Every row is its own provenance capsule** : each JSONL record is `{id: "<repo>/<relative path>", text, source: "<repo>"}` — any sample traces back to the exact file it came from.
- **PII/secret scrubbing by construction** : regex + entropy-based redaction (emails, API keys, AWS keys, wallet addresses, bearer tokens) on every text before it lands in the corpus.
- **Infra you might like** : the build is a Python pipeline (2 clone/extract workers + batched uploader) that shards into `data/part<N>/` subdirectories to dodge HF's 10k-files-per-directory limit, with size caps, an LFS-monster skip-list, and an 8 GB disk guard. Code in the `MLX-QUANT` repo, `scripts/build_cogito_corpus.py`.

## Why this matters / community impact

- **2-bit frontier for everyone** : ternary quantization is the lowest-bandwidth path to local inference; the codebook + provenance-capsule pattern is a template any model repo can adopt.
- **Open training data with a provenance chain** : the corpus answers "where did this training token come from?" — the same question the capsule answers for weights. Auditability is a feature, not a checkbox.
- **Solo builder, open stack** : everything is public (HF models/datasets/bucket, MLX-QUANT repo, pocoo demo), no paywalled pieces.

I'd love to discuss the MI300X angle too — 192 GB unified memory is exactly the class of machine where a 2-bit model with a full training corpus gets interesting (ternary inference + 24k-repo corpus fit trivially).

Happy to provide a recorded demo, deeper technical writeup, or any additional detail. Thanks for considering it!

Best,
Péter Lodri

```

> **[PeetPedro (Peter Lodri)](https://huggingface.co/PeetPedro)**
>
> BitNet b1.58 Ternary Weight Quantization, Metal GPU SIMD Operators, Sovereign AI Systems
