mrsandip commited on
Commit
50f063a
·
verified ·
1 Parent(s): 07effa7

docs: readme v0.0.2 — gguf table

Browse files
Files changed (1) hide show
  1. README.md +35 -6
README.md CHANGED
@@ -15,25 +15,54 @@ datasets:
15
  metrics:
16
  - code_eval
17
  - perplexity
18
- version: 0.4.0-trained
19
  ---
20
 
21
  # Alfa Code - Multimodal Coding GGUF
22
 
23
- RTX 3050 4GB: use tiny-50M demo. 1B+ needs cloud 8xH100.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  ## 1. Data
26
  `python scripts/download_data.py --dataset code_small_test --max-rows 500`
27
  Output: `data/processed/train.jsonl` {modality,prompt,think,answer}
28
 
29
  ## 2. Tokenizer + Train
30
- `python scripts/train_tokenizer.py` -> `tokenizers/alfa-32k.json` (verified 47KB)
31
  `pip install torch --index-url https://download.pytorch.org/whl/cu121`
32
  `python scripts/train.py` -> `outputs/tiny-50M`
33
 
34
- ## 3. GGUF
35
- `git clone https://github.com/ggerganov/llama.cpp third_party/llama.cpp`
36
- `python scripts/convert_to_gguf.py --ckpt outputs/tiny-50M --quant Q4_K_M --out outputs/tiny-50M.gguf`
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  ## 4. UI (reasoning live->collapsed + image/file/video)
39
  `python app/ui.py` -> http://127.0.0.1:7860
 
15
  metrics:
16
  - code_eval
17
  - perplexity
18
+ version: 0.0.2
19
  ---
20
 
21
  # Alfa Code - Multimodal Coding GGUF
22
 
23
+ Llama-based code models, trained on Kaggle T4. Ready-to-run GGUF weights below.
24
+
25
+ ## Download (ready weights)
26
+
27
+ **GitHub release:** https://github.com/mrsandipmandal/alfa-code/releases/tag/v0.0.2
28
+ **HuggingFace:** https://huggingface.co/mrsandip/Alfa-Code/tree/main/gguf
29
+
30
+ | Model | Q8_0 (best) | Q4_0 (small) | Context |
31
+ |---|---|---|---|
32
+ | tiny-50M (56M) | tiny-50M-q8.gguf (60 MB) | tiny-50M-q4.gguf (32 MB) | 2048 |
33
+ | base-1B (1.1B) | base-1B-q8.gguf (1.19 GB) | base-1B-q4.gguf (632 MB) | 2048 |
34
+ | code-100k (1.39B) | ⏳ Kaggle upload pending | ⏳ | 8192 (YaRN → 131k) |
35
+
36
+ ```bash
37
+ llama-server -m base-1B-q4.gguf -c 2048
38
+ llama-server -m tiny-50M-q8.gguf -c 2048
39
+ ```
40
+
41
+ Tokenizer (32k BPE): `tokenizers/alfa-32k.json` — also in the v0.0.2 release assets.
42
 
43
  ## 1. Data
44
  `python scripts/download_data.py --dataset code_small_test --max-rows 500`
45
  Output: `data/processed/train.jsonl` {modality,prompt,think,answer}
46
 
47
  ## 2. Tokenizer + Train
48
+ `python scripts/train_tokenizer.py` -> `tokenizers/alfa-32k.json` (32000 vocab, ~419KB)
49
  `pip install torch --index-url https://download.pytorch.org/whl/cu121`
50
  `python scripts/train.py` -> `outputs/tiny-50M`
51
 
52
+ Scale-up (Colab T4, ~2-4h): 5000+ rows, chat tuning, 3-5 epochs:
53
+ `python scripts/download_data.py --dataset multimodal_mix --max-rows 5000 --overwrite`
54
+ `python scripts/download_data.py --dataset chat_qa --max-rows 2000` (appends Q&A rows)
55
+ `python scripts/train_hf.py --data data/processed/train.jsonl --out /content/outputs/tiny-50M --epochs 3 --config configs/tiny-50M.yaml --max-seq-len 2048 --batch-size 1`
56
+
57
+ 1B model (16GB+ GPU only, not RTX 3050 4GB): same commands with `--config configs/base-1B.yaml --out /content/outputs/base-1B` (1.12B params, ~2.2GB fp16).
58
+
59
+ ## 3. GGUF (no llama.cpp clone needed)
60
+ `pip install gguf safetensors torch transformers`
61
+ `python scripts/convert_to_gguf.py --ckpt outputs/tiny-50M --quant Q8_0` (Q8_0 ~55MB, Q4_0 ~32MB, F16 ~105MB)
62
+ K-quants (Q4_K_M) need standard dims + `llama-quantize` binary — not offered (intermediate 1376).
63
+
64
+ Run local (RTX 3050 4GB):
65
+ `llama-server -m outputs/tiny-50M.gguf -c 2048` or Ollama Modelfile (`FROM ./outputs/tiny-50M.gguf`).
66
 
67
  ## 4. UI (reasoning live->collapsed + image/file/video)
68
  `python app/ui.py` -> http://127.0.0.1:7860