# matheus-c-feitosa/lowbit-atlas architecture

> Architecture diagram of the GitHub repository matheus-c-feitosa/lowbit-atlas, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/matheus-c-feitosa/lowbit-atlas
- Repository: https://github.com/matheus-c-feitosa/lowbit-atlas

## Overview

This repository is a reproducible CPU benchmark and correctness study for low-bit LLM formats and runtimes. Its main workflow is to run measurements on supported CPUs, parse runtime logs into structured records, retain published results, and compare reruns against those results; separate analysis produces summary charts. The README documents the measurement and reproduction scope, while the sampled scripts show parsing, comparison, and chart generation. The run, measure, and build scripts and the methodology were not sampled, so their internal calls are not inferred.

Main entry points: [`scripts/run.sh`](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/run.sh) (Run measurements), [`scripts/compare.py`](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/compare.py) (Rerun comparison), [`scripts/chart.py`](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/chart.py) (Summary charts), [`results/bitnet-b1.58-2b-4t.json`](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/results/bitnet-b1.58-2b-4t.json) (BitNet measurements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_measurement["Measurement workflow"]
  node_run_scripts["Run measurements<br/>[run.sh]"]
  node_measure_scripts["Measure suite<br/>[measure.sh]"]
  node_build_scripts["Runtime builds<br/>[build.sh]"]
  node_shared_scripts["Shared helpers<br/>[common.sh]"]
  node_log_parser["Log parser<br/>[parse_log.py]"]
end

subgraph group_evidence["Results and methodology"]
  node_method["Methodology<br/>[METHOD.md]"]
  node_bitnet_results[("BitNet measurements")]
  node_bonsai_results[("Bonsai measurements<br/>[bonsai-1.7b.json]")]
  node_ternary_results[("27B measurements")]
  node_notebook["Reproduction notebook<br/>[reproduce.ipynb]"]
end

subgraph group_analysis["Analysis tools"]
  node_compare["Rerun comparison<br/>[compare.py]"]
  node_chart["Summary charts<br/>[chart.py]"]
end

node_researcher(("Researcher"))
node_runtime_tools["LLM runtimes"]

node_researcher -->|"starts rerun"| node_run_scripts
node_run_scripts -.->|"runs benchmarks"| node_runtime_tools
node_runtime_tools -.->|"produces logs"| node_log_parser
node_log_parser -.->|"emits JSON"| node_run_scripts
node_researcher -.->|"reproduces study"| node_notebook
node_run_scripts -->|"records measurements"| node_bitnet_results
node_run_scripts -->|"records measurements"| node_bonsai_results
node_run_scripts -->|"records measurements"| node_ternary_results
node_compare -->|"reads reference"| node_bitnet_results
node_compare -->|"reads reference"| node_bonsai_results
node_compare -->|"reads reference"| node_ternary_results
node_chart -->|"reads measures"| node_bitnet_results
node_chart -->|"reads measures"| node_bonsai_results
node_researcher -->|"checks rerun"| node_compare
node_researcher -->|"views findings"| node_chart

click node_run_scripts "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/run.sh"
click node_measure_scripts "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/measure.sh"
click node_build_scripts "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/build.sh"
click node_shared_scripts "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/common.sh"
click node_log_parser "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/parse_log.py"
click node_method "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/METHOD.md"
click node_bitnet_results "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/results/bitnet-b1.58-2b-4t.json"
click node_bonsai_results "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/results/bonsai-1.7b.json"
click node_ternary_results "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/results/ternary-bonsai-2-27b.json"
click node_notebook "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/notebooks/reproduce.ipynb"
click node_compare "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/compare.py"
click node_chart "https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/chart.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_run_scripts,node_measure_scripts,node_build_scripts,node_shared_scripts,node_log_parser toneBlue
class node_method,node_bitnet_results,node_bonsai_results,node_ternary_results,node_notebook toneAmber
class node_compare,node_chart toneMint
class node_researcher,node_runtime_tools toneIndigo
```

## Components

### Measurement workflow

- [Run measurements](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/run.sh): `scripts/run.sh`
- [Measure suite](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/measure.sh): `scripts/measure.sh`
- [Runtime builds](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/build.sh): `scripts/build.sh`
- [Shared helpers](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/common.sh): `scripts/common.sh`
- [Log parser](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/parse_log.py): `scripts/parse_log.py`

### Results and methodology

- [Methodology](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/METHOD.md): `METHOD.md`
- [BitNet measurements](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/results/bitnet-b1.58-2b-4t.json): `results/bitnet-b1.58-2b-4t.json`
- [Bonsai measurements](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/results/bonsai-1.7b.json): `results/bonsai-1.7b.json`
- [27B measurements](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/results/ternary-bonsai-2-27b.json): `results/ternary-bonsai-2-27b.json`
- [Reproduction notebook](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/notebooks/reproduce.ipynb): `notebooks/reproduce.ipynb`

### Analysis tools

- [Rerun comparison](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/compare.py): `scripts/compare.py`
- [Summary charts](https://github.com/matheus-c-feitosa/lowbit-atlas/blob/main/scripts/chart.py): `scripts/chart.py`

### Other components

- **Researcher**
- **LLM runtimes**

## Connections

- Researcher → Run measurements: starts rerun (evidence: `README.md`)
- Run measurements → LLM runtimes: runs benchmarks
- LLM runtimes → Log parser: produces logs
- Log parser → Run measurements: emits JSON
- Researcher → Reproduction notebook: reproduces study
- Run measurements → BitNet measurements: records measurements (evidence: `README.md`)
- Run measurements → Bonsai measurements: records measurements (evidence: `README.md`)
- Run measurements → 27B measurements: records measurements (evidence: `README.md`)
- Rerun comparison → BitNet measurements: reads reference (evidence: `scripts/compare.py`)
- Rerun comparison → Bonsai measurements: reads reference (evidence: `scripts/compare.py`)
- Rerun comparison → 27B measurements: reads reference (evidence: `scripts/compare.py`)
- Summary charts → BitNet measurements: reads measures (evidence: `scripts/chart.py`)
- Summary charts → Bonsai measurements: reads measures (evidence: `scripts/chart.py`)
- Researcher → Rerun comparison: checks rerun (evidence: `scripts/compare.py`)
- Researcher → Summary charts: views findings (evidence: `README.md`)
