Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (36 loc) · 1.43 KB
/
Copy pathMakefile
File metadata and controls
52 lines (36 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: install install-dev data prep prep-small train-local gguf ollama-import fixtures test lint bench api serve-docs docker-up clean
install:
pip install -e ".[train]"
install-dev:
pip install -e ".[dev]"
install-local:
pip install -e ".[local,dev]"
pip install --force-reinstall --no-deps torch --index-url https://download.pytorch.org/whl/cu124
pip install --quiet bitsandbytes
data:
python scripts/download_dataset.py
prep:
python -m zeroerr.data.prep -i data/raw/spider_train.jsonl -o data/chatml/train.jsonl --per-bucket 2000 --with-repairs --val-fraction 0.1
prep-small:
python -m zeroerr.data.prep -i data/raw/spider_train.jsonl -o data/chatml/train_local.jsonl --per-bucket 600 --with-repairs
train-local:
python scripts/train_local.py --data data/chatml/train_local.jsonl --model 1.5b --out checkpoints/zeroerr-1.5b-merged
gguf:
python scripts/convert_gguf.py --input checkpoints/zeroerr-1.5b-merged --output gguf/zeroerr-1.5b-q8_0.gguf --ftype q8_0
ollama-import:
bash scripts/setup_ollama.sh gguf/zeroerr-1.5b-q8_0.gguf
fixtures:
python -m eval.fixtures.build
test:
pytest tests/ -v
lint:
ruff check src tests eval | true
ruff format --check src tests eval | true
bench:
python eval/run_benchmark.py --split dev
api:
uvicorn zeroerr.api.main:app --host 0.0.0.0 --port 8000 --reload
docker-up:
docker compose -f docker/docker-compose.yml up --build
clean:
@rm -rf .pytest_cache .ruff_cache build dist **/__pycache__