Thanks for considering a contribution. This repo has two distinct parts — an
offline training pipeline (src/distill) and an online serving stack
(services/api, services/web). Most contributions touch one of them.
The package supports Python 3.12+ and CI runs on Python 3.12. The documented Windows GPU training profile was developed with Python 3.14 and a compatible PyTorch nightly on an RTX 3060 6GB; choose the PyTorch build that matches your OS, Python, and CUDA versions. Serving only needs Docker.
pip install -e .[train,dev] trl
set PYTHONPATH=srctrl is currently required directly by src/distill/train.py but is not yet
declared in the train extra.
Web client (generated from the committed OpenAPI contract):
cd services/web
pnpm install
pnpm run generate-client # regenerates src/api/schema.d.ts from docs/openapi.yaml-
Lint + tests must pass:
ruff check src/ tests/ services/api/ python -m pytest tests/ -q cd services/api && python -m pytest tests/ -q cd services/web && pnpm test && pnpm build
-
If you changed the API contract (
docs/openapi.yaml), regenerate the client and commit the diff so CI'sgit diff --exit-code src/api/schema.d.tsstays green:cd services/web pnpm run generate-client pnpm build -
Never commit secrets.
.envis gitignored — copy.env.exampleto.envlocally and fill in your 9Router key there. Do not paste real API keys, tokens, or teacher outputs containing private data. -
Model artifacts are not in git.
checkpoints/,*.safetensors,*.gguf, anddata/raw/+data/processed/are gitignored (too heavy). Share artifacts out-of-band or via GitHub Releases.
- Use Conventional Commits:
feat:,fix:,docs:,refactor:,test:,chore:. - Keep commits focused; no AI references in commit messages.
- Reference evaluation versions explicitly (e.g.
feat(distill): ...with the--label vXin the report) so results are traceable.
Perplexity is only comparable at an identical truncation cap — always report the
cap alongside the number (see plans/reports/evaluation-v0.5.md for the
protocol). Never compare a cap-512 figure against a cap-2048 figure.
When you retrain, record: dataset version, split sizes, chat template, LoRA config, best validation loss, and held-out PPL at 512/1024/2048.
Open an issue with the bug or feature template. For security matters, see
SECURITY.md — do not file public issues for vulnerabilities.