# HarryR/z80ai

Z80-μLM is a 2-bit quantized language model small enough to run on an 8-bit Z80 processor. Train conversational models in Python, export them as CP/M .COM binaries, and chat with your vintage computer.

Repository: https://github.com/HarryR/z80ai
Canonical: https://ross.abutalabs.com/products/z80ai
Language: Python
License Family: other
Topics: chatbot, code-golf, cpm, language-model, machine-learning, nlp, quantization, retro, retrocomputing, tinyml, z80
Last push: 2026-04-29T13:43:15+00:00

## Health v2 (maintenance only)
Score: 51/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 79, release rhythm 34, longevity 18
- inputs: {"age_days": 255, "days_push": 126, "days_rel": 227, "gap_med": null, "n_releases_24m": 1}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1117, forks 50 (observed 2026-08-28T04:03:38.930183+00:00)

## What it is
Z80-μLM is a 2-bit quantized micro language model designed to run on 8-bit Z80 processors with only 64KB of RAM, exportable as ~40KB CP/M .COM binaries or ZX Spectrum .TAP files. It includes Python training tools with quantization-aware training and pre-built examples like a chatbot and a 20 Questions game.

## Use cases
- run a tiny language model on a vintage Z80 computer
- train a conversational chatbot in Python and export it as a CP/M .COM binary
- build a 20 Questions game for retro hardware
- experiment with extreme 2-bit weight quantization
- deploy a self-contained chatbot with no floating point on 64KB RAM
- generate training data for tiny models using Ollama or Claude API
- run a chatbot on a ZX Spectrum emulator

## When to choose
- you want to run a language model on retro Z80 hardware or emulators like CP/M or ZX Spectrum
- you need an extremely small, self-hosted chatbot binary with integer-only inference
- you want to learn quantization-aware training and tiny ML techniques
- you enjoy retrocomputing projects with a fun, personality-driven twist

## When to avoid
- you need a capable, production-quality language model or assistant
- you require modern NLP features like large context windows or fluent generation
- you need a licensed, well-supported library for commercial use (no license is specified)
- your target platform is not Z80-based

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, llm-inference, chatbot, serialization
- domain: machine-learning, chatbots, embedded-systems
- platform: python, cross-platform
- tags: tinyml, retrocomputing, z80, cpm, 2-bit-quantization, quantization-aware-training, code-golf, zx-spectrum, vintage-computing, quantization, natural-language-processing

## Member repositories
- HarryR/z80ai (main) score 51

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:38.930183+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:41:51.338456+00:00, confidence not recorded.
  - readme: https://github.com/HarryR/z80ai (fetched 2026-08-28T04:03:38.930183+00:00, sha 2db5028d226a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
