Restrictated commited on
Commit
61cdec9
·
verified ·
1 Parent(s): 66e3bbc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -113
README.md CHANGED
@@ -1,53 +1,53 @@
1
- # AXL — Architecture eXperimental Lab
2
-
3
- **27 CPU-Optimized Code Generation Models** by [Koinic](https://koinic.ai)
4
-
5
- All models are trained from scratch on consumer hardware (AMD Ryzen 5 5600G, 16GB RAM). No GPU required.
6
-
7
- ## Models
8
-
9
- ### Lion-Optimized (Recommended)
10
-
11
- | Model | Params | PPL | GGUF (F16) | GGUF (Q4_K_M) |
12
- |-------|--------|-----|-----------|---------------|
13
- | [AXL-Code-1B-Lion](AXL-Code-1B-Lion) | 318M | **1.90** | 606 MB | 188 MB |
14
- | [AXL-Reasoning-Lion](AXL-Reasoning-Lion) | 70M | **1.03** | 134 MB | 44 MB |
15
- | [AXL-Refactor-Lion](AXL-Refactor-Lion) | 19.1M | 1.02 | 37 MB | 12 MB |
16
- | [AXL-TestGen-Lion](AXL-TestGen-Lion) | 15.2M | 1.02 | 30 MB | 18 MB |
17
- | [AXL-Chat-Lion](AXL-Chat-Lion) | 9.9M | 1.03 | 19 MB | 7 MB |
18
- | [AXL-Micro-Lion](AXL-Micro-Lion) | 12.8M | 1.04 | 25 MB | 15 MB |
19
- | [AXL-Secure-Lion](AXL-Secure-Lion) | 11.7M | 1.03 | 23 MB | 8 MB |
20
- | [AXL-Docs-Lion](AXL-Docs-Lion) | 9.9M | 1.01 | 19 MB | 7 MB |
21
- | [AXL-Comment-Lion](AXL-Comment-Lion) | 7.2M | 1.02 | 14 MB | 5 MB |
22
-
23
- ### SGD Models
24
-
25
- | Model | Params | PPL | Focus |
26
- |-------|--------|-----|-------|
27
- | [AXL-Micro-600K](AXL-Micro-600K) | 600K | 63.08 | Demo |
28
- | [AXL-Micro-8M](AXL-Micro-8M) | 12.8M | 3.13 | Code gen |
29
- | [AXL-Coder-15M](AXL-Coder-15M) | 26.0M | 5.97 | Agentic |
30
- | [AXL-Debugger-8M](AXL-Debugger-8M) | 14.1M | 6.60 | Bug fixing |
31
- | [AXL-Fixer-12M](AXL-Fixer-12M) | 20.9M | 5.90 | Debug |
32
- | [AXL-Reasoning-70M](AXL-Reasoning-70M) | 70M | 1.93 | CoT |
33
- | [AXL-300M](AXL-300M) | 322M | 5.98 | Flagship |
34
- | [AXL-Chat-10M](AXL-Chat-10M) | 9.9M | 1.02 | Dialogue |
35
- | [AXL-TestGen-15M](AXL-TestGen-15M) | 15.2M | 1.01 | Test gen |
36
- | [AXL-Refactor-20M](AXL-Refactor-20M) | 19.1M | 1.01 | Refactoring |
37
- | [AXL-Docs-8M](AXL-Docs-8M) | 9.9M | 1.03 | Docstrings |
38
- | [AXL-Comment-5M](AXL-Comment-5M) | 7.2M | 1.01 | Comments |
39
- | [AXL-Secure-10M](AXL-Secure-10M) | 11.7M | 1.01 | Security |
40
-
41
- ### Specialized Models
42
-
43
- | Model | Params | PPL | Focus |
44
- |-------|--------|-----|-------|
45
- | [AXL-Code-1B](AXL-Code-1B) | 318M | 31.22 | Code gen (SGD) |
46
- | [AXL-Chat-Pro](AXL-Chat-Pro) | 12.8M | 3.42 | Advanced chat |
47
- | [AXL-Translate](AXL-Translate) | 15.2M | 1.86 | Code translation |
48
- | [AXL-Vision-0.8M](AXL-Vision-0.8M) | 1M | — | Vision encoder |
49
- | [AXL-Vision-v2](AXL-Vision-v2) | 4.1M | — | UI vision |
50
-
51
  ## Quick Start
52
 
53
  ### Python API Server (Full Quality - Recommended)
@@ -56,69 +56,8 @@ pip install -e .
56
  python AXL/API/serve_model.py --model AXL-Micro-Lion/ --port 8880
57
 
58
  # OpenAI-compatible endpoint:
59
- curl http://localhost:8880/v1/completions \
60
  -H "Content-Type: application/json" \
61
  -d '{"prompt": "def fibonacci(n):", "max_tokens": 100}'
62
 
63
- # Works with Continue.dev, LlamaIndex, LangChain, Cursor
64
- ```
65
-
66
- ### With Ollama (Degraded Quality)
67
- > **Warning:** GGUF files for Ollama use only the fine-scale encoder (1/3 of the AXL architecture). The reported PPL values apply to the full multi-scale model. Use the Python API above for full quality.
68
-
69
- ```bash
70
- cd AXL-Micro-Lion
71
- ollama create axl-micro-lion -f Modelfile
72
- ollama run axl-micro-lion "def fibonacci(n):"
73
- ```
74
-
75
- ### With Python (Direct Inference)
76
- ```python
77
- import torch
78
- from multiscale_transformer.model.config import load_config, ModelConfig
79
- from multiscale_transformer.model.model import MultiScaleTransformer
80
- from multiscale_transformer.training.tokenizer import ByteTokenizer
81
-
82
- config = load_config("AXL-Micro-Lion/config.json")
83
- model = MultiScaleTransformer(config)
84
- ckpt = torch.load("AXL-Micro-Lion/axl_micro_lion.pt", map_location="cpu")
85
- model.load_state_dict(ckpt["model_state_dict"])
86
- model.eval()
87
-
88
- tokenizer = ByteTokenizer()
89
- ids = torch.tensor([tokenizer.encode("def hello():")], dtype=torch.long)
90
- out = model.generate(ids, max_new_tokens=50, temperature=0.8, top_k=40)
91
- print(tokenizer.decode(out[0].tolist()))
92
- ```
93
-
94
- ## Architecture
95
-
96
- AXL processes token sequences at three parallel resolution scales:
97
- - **Fine (1x)**: All tokens. Attention cost: O(N^2 d)
98
- - **Medium (2x)**: Grouped in pairs. Cost: O(N^2 d/4)
99
- - **Coarse (4x)**: Grouped in quadruplets. Cost: O(N^2 d/16)
100
-
101
- Cross-scale attention connects all scale pairs. Adaptive gating fusion combines representations.
102
-
103
- **Lion optimizer**: Sign-based momentum, 20x faster convergence than SGD, 50% less memory than AdamW.
104
-
105
- **Byte-level tokenizer**: 258 vocab (256 bytes + BOS + EOS). No vocabulary training. Works with any programming language.
106
-
107
- ## Training Cost
108
-
109
- | Model | Time | Cost (USD) |
110
- |-------|------|-----------|
111
- | AXL-Comment-Lion | 2 min | $0.0004 |
112
- | AXL-Code-1B-Lion | 20 min | $0.004 |
113
- | All 9 Lion models | 49 min | $0.010 |
114
-
115
- Based on AMD Ryzen 5 5600G (100W system, $0.12/kWh).
116
-
117
- ## Papers
118
-
119
- - [Research Paper (PDF)](paper_axl.pdf)
120
- - [Research Paper (LaTeX)](paper_axl.tex)
121
-
122
- ## Code
123
-
124
- Full training code: [GitHub](https://github.com/koinic/axl)
 
1
+ # AXL — Architecture eXperimental Lab
2
+
3
+ **27 CPU-Optimized Code Generation Models** by [Cubic](https://cubic.net)
4
+
5
+ All models are trained from scratch on consumer hardware (AMD Ryzen 5 5600G, 16GB RAM). No GPU required.
6
+
7
+ ## Models
8
+
9
+ ### Lion-Optimized (Recommended)
10
+
11
+ | Model | Params | PPL | GGUF (F16) | GGUF (Q4_K_M) |
12
+ |-------|--------|-----|-----------|---------------|
13
+ | [AXL-Code-1B-Lion](AXL-Code-1B-Lion) | 318M | **1.90** | 606 MB | 188 MB |
14
+ | [AXL-Reasoning-Lion](AXL-Reasoning-Lion) | 70M | **1.03** | 134 MB | 44 MB |
15
+ | [AXL-Refactor-Lion](AXL-Refactor-Lion) | 19.1M | 1.02 | 37 MB | 12 MB |
16
+ | [AXL-TestGen-Lion](AXL-TestGen-Lion) | 15.2M | 1.02 | 30 MB | 18 MB |
17
+ | [AXL-Chat-Lion](AXL-Chat-Lion) | 9.9M | 1.03 | 19 MB | 7 MB |
18
+ | [AXL-Micro-Lion](AXL-Micro-Lion) | 12.8M | 1.04 | 25 MB | 15 MB |
19
+ | [AXL-Secure-Lion](AXL-Secure-Lion) | 11.7M | 1.03 | 23 MB | 8 MB |
20
+ | [AXL-Docs-Lion](AXL-Docs-Lion) | 9.9M | 1.01 | 19 MB | 7 MB |
21
+ | [AXL-Comment-Lion](AXL-Comment-Lion) | 7.2M | 1.02 | 14 MB | 5 MB |
22
+
23
+ ### SGD Models
24
+
25
+ | Model | Params | PPL | Focus |
26
+ |-------|--------|-----|-------|
27
+ | [AXL-Micro-600K](AXL-Micro-600K) | 600K | 63.08 | Demo |
28
+ | [AXL-Micro-8M](AXL-Micro-8M) | 12.8M | 3.13 | Code gen |
29
+ | [AXL-Coder-15M](AXL-Coder-15M) | 26.0M | 5.97 | Agentic |
30
+ | [AXL-Debugger-8M](AXL-Debugger-8M) | 14.1M | 6.60 | Bug fixing |
31
+ | [AXL-Fixer-12M](AXL-Fixer-12M) | 20.9M | 5.90 | Debug |
32
+ | [AXL-Reasoning-70M](AXL-Reasoning-70M) | 70M | 1.93 | CoT |
33
+ | [AXL-300M](AXL-300M) | 322M | 5.98 | Flagship |
34
+ | [AXL-Chat-10M](AXL-Chat-10M) | 9.9M | 1.02 | Dialogue |
35
+ | [AXL-TestGen-15M](AXL-TestGen-15M) | 15.2M | 1.01 | Test gen |
36
+ | [AXL-Refactor-20M](AXL-Refactor-20M) | 19.1M | 1.01 | Refactoring |
37
+ | [AXL-Docs-8M](AXL-Docs-8M) | 9.9M | 1.03 | Docstrings |
38
+ | [AXL-Comment-5M](AXL-Comment-5M) | 7.2M | 1.01 | Comments |
39
+ | [AXL-Secure-10M](AXL-Secure-10M) | 11.7M | 1.01 | Security |
40
+
41
+ ### Specialized Models
42
+
43
+ | Model | Params | PPL | Focus |
44
+ |-------|--------|-----|-------|
45
+ | [AXL-Code-1B](AXL-Code-1B) | 318M | 31.22 | Code gen (SGD) |
46
+ | [AXL-Chat-Pro](AXL-Chat-Pro) | 12.8M | 3.42 | Advanced chat |
47
+ | [AXL-Translate](AXL-Translate) | 15.2M | 1.86 | Code translation |
48
+ | [AXL-Vision-0.8M](AXL-Vision-0.8M) | 1M | — | Vision encoder |
49
+ | [AXL-Vision-v2](AXL-Vision-v2) | 4.1M | — | UI vision |
50
+
51
  ## Quick Start
52
 
53
  ### Python API Server (Full Quality - Recommended)
 
56
  python AXL/API/serve_model.py --model AXL-Micro-Lion/ --port 8880
57
 
58
  # OpenAI-compatible endpoint:
59
+ curl \
60
  -H "Content-Type: application/json" \
61
  -d '{"prompt": "def fibonacci(n):", "max_tokens": 100}'
62
 
63
+ # Works with Continue.dev, LlamaIndex, LangChain, Cursor