Documentation for the Petal project: small language models (~40M and ~150M on the
32k tokenizer lineage; the next release is Petal 1, petal-1-150M, trained by
Chloris) designed, trained and run from
scratch, with the tools built around them. The earlier 1.0 generation (34M/70M) is
kept in an
archive section of the Petal pages.
This repository is the central place for everything that spans several repositories or that does not belong in a README. Each code repository keeps a short README with a quickstart and points here for the details.
┌──────────────────────────────────────────────────────────┐
│ Petal + petal-eval (same repository) │
│ training from scratch (PyTorch, CUDA) │
│ tokenizer → data → pretrain → sft → HF export │
│ + evaluation: protocol v3, scores + reports │
└───────────────┬───────────────────────────┬──────────────┘
│ │
models (.pt, tok.json) model metadata
│ │
┌───────────▼───────────┐ ┌───────────▼───────────┐
│ Petal-CLI │ │ web/ │
│ local chat / run │ │ browser → Go API → │
│ (Go + Python) │ │ provider (fake) │
└───────────────────────┘ └───────────────────────┘
- Petal — the training repository. Everything is implemented
from scratch: BPE tokenizer, data preparation, the transformer decoder architecture,
pretraining, the format stage, supervised fine-tuning, chat, and export to Hugging
Face format. Evaluation is integrated in
src/petal/eval/. - Petal-CLI — the local CLI.
petal chat,petal runandpetal modelstalk to a model on your machine through a small Python engine. No account, no API key, no remote inference. - web — the browser chat UI. A SvelteKit frontend and a Go SSE
API in one independent git repository (
GautierPicon/web). No inference backend is connected yet: see Inference.
The repositories are siblings on disk:
├── Petal/ (source repository: github.com/Chloris-Lab/Petal)
├── Petal-CLI/ (source repository: github.com/Chloris-Lab/Petal-CLI)
├── web/ (source repository: github.com/GautierPicon/web)
└── Documentation/ (this repository)
web/ is independent of the lab repositories: no shared code, no path dependency, and
no inference wired up yet. Its quickstart lives in its own README; the details live in
the pages under web/.
- I want to chat with a model locally → Petal-CLI, then usage. Works with the checkpoints already in Petal.
- I want to understand the models → Petal architecture.
- I want to train / continue training → Petal training and cloud GPU.
- I want to evaluate a model → Evaluation, its workflow and the protocol.
- I want to use the web chat → web, then architecture and inference for what is not connected yet.
- Documentation is plain Markdown. It is meant to be served by Starlight later; keep the hierarchy simple.
- Links between categories are relative (
../Petal/...), so the pages render both in a local checkout and in a future site build. - The code repositories are the source of truth for their own code. When a page describes behaviour that lives in code, it points to the exact file. If you change the code and the page becomes wrong, fix the page in the same session.
- Code repositories keep only: role, prerequisites, quickstart, link here. The web repository follows the same rule: its README is the quickstart, this hub holds the detail pages.
| Category | What it documents |
|---|---|
| Petal | Model architecture, training pipeline, checkpoints, data, export, evaluation |
| Petal-CLI | CLI usage, inference engine, model storage, configuration file |
| web | Browser UI, Go API, SSE contract, local storage, inference provider |