Text Generation
Transformers
GGUF
PyTorch
code
multiscale_transformer
code-generation
multi-scale-transformer
cpu-optimized
cubic
llama
byte-level
conversational
Eval Results (legacy)
Instructions to use CubicLabs/AXL-Chat-10M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CubicLabs/AXL-Chat-10M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CubicLabs/AXL-Chat-10M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("CubicLabs/AXL-Chat-10M", dtype="auto") - llama-cpp-python
How to use CubicLabs/AXL-Chat-10M with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="CubicLabs/AXL-Chat-10M", filename="axl-chat-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use CubicLabs/AXL-Chat-10M with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf CubicLabs/AXL-Chat-10M:Q4_K_M # Run inference directly in the terminal: llama cli -hf CubicLabs/AXL-Chat-10M:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf CubicLabs/AXL-Chat-10M:Q4_K_M # Run inference directly in the terminal: llama cli -hf CubicLabs/AXL-Chat-10M:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf CubicLabs/AXL-Chat-10M:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf CubicLabs/AXL-Chat-10M:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf CubicLabs/AXL-Chat-10M:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf CubicLabs/AXL-Chat-10M:Q4_K_M
Use Docker
docker model run hf.co/CubicLabs/AXL-Chat-10M:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use CubicLabs/AXL-Chat-10M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CubicLabs/AXL-Chat-10M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CubicLabs/AXL-Chat-10M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CubicLabs/AXL-Chat-10M:Q4_K_M
- SGLang
How to use CubicLabs/AXL-Chat-10M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "CubicLabs/AXL-Chat-10M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CubicLabs/AXL-Chat-10M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "CubicLabs/AXL-Chat-10M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CubicLabs/AXL-Chat-10M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use CubicLabs/AXL-Chat-10M with Ollama:
ollama run hf.co/CubicLabs/AXL-Chat-10M:Q4_K_M
- Unsloth Studio
How to use CubicLabs/AXL-Chat-10M with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CubicLabs/AXL-Chat-10M to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CubicLabs/AXL-Chat-10M to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CubicLabs/AXL-Chat-10M to start chatting
- Atomic Chat new
- Docker Model Runner
How to use CubicLabs/AXL-Chat-10M with Docker Model Runner:
docker model run hf.co/CubicLabs/AXL-Chat-10M:Q4_K_M
- Lemonade
How to use CubicLabs/AXL-Chat-10M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CubicLabs/AXL-Chat-10M:Q4_K_M
Run and chat with the model
lemonade run user.AXL-Chat-10M-Q4_K_M
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,7 +6,7 @@ tags:
|
|
| 6 |
- code-generation
|
| 7 |
- multi-scale-transformer
|
| 8 |
- cpu-optimized
|
| 9 |
-
-
|
| 10 |
- pytorch
|
| 11 |
- llama
|
| 12 |
- gguf
|
|
@@ -15,7 +15,7 @@ tags:
|
|
| 15 |
pipeline_tag: text-generation
|
| 16 |
library_name: transformers
|
| 17 |
datasets:
|
| 18 |
-
-
|
| 19 |
widget:
|
| 20 |
- text: "User: How do I read a CSV in Python?\nAssistant:"
|
| 21 |
model-index:
|
|
@@ -31,13 +31,13 @@ model-index:
|
|
| 31 |
|
| 32 |
# AXL-Chat-10M
|
| 33 |
|
| 34 |
-
Conversational AI. 9.9M params. PPL 1.02. Context 512 bytes. Part of the AXL model family by [
|
| 35 |
|
| 36 |
## Model Details
|
| 37 |
|
| 38 |
| Property | Value |
|
| 39 |
|----------|-------|
|
| 40 |
-
| Developed by | [
|
| 41 |
| Architecture | Multi-Scale Transformer |
|
| 42 |
| Parameters | 10M |
|
| 43 |
| Optimizer | Lion |
|
|
@@ -52,8 +52,8 @@ Conversational AI. 9.9M params. PPL 1.02. Context 512 bytes. Part of the AXL mod
|
|
| 52 |
|
| 53 |
### Sources
|
| 54 |
|
| 55 |
-
- **Repository:**
|
| 56 |
-
- **Organization:**
|
| 57 |
|
| 58 |
## Uses
|
| 59 |
|
|
@@ -61,7 +61,7 @@ Conversational AI. 9.9M params. PPL 1.02. Context 512 bytes. Part of the AXL mod
|
|
| 61 |
|
| 62 |
Conversational AI for programming Q&A.
|
| 63 |
|
| 64 |
-
|
| 65 |
import torch
|
| 66 |
from multiscale_transformer.model.model import MultiScaleTransformer
|
| 67 |
from multiscale_transformer.training.tokenizer import ByteTokenizer
|
|
@@ -74,7 +74,6 @@ ids = torch.tensor([tokenizer.encode("def hello():")], dtype=torch.long)
|
|
| 74 |
with torch.no_grad():
|
| 75 |
out = model.generate(ids, max_new_tokens=50, temperature=0.8)
|
| 76 |
print(tokenizer.decode(out[0].tolist()))
|
| 77 |
-
```
|
| 78 |
|
| 79 |
### Out-of-Scope Use
|
| 80 |
|
|
@@ -100,14 +99,6 @@ Retrained with Lion on 10MB chat pairs. 216 steps in 10 min. Covers code Q&A, ge
|
|
| 100 |
|
| 101 |
Byte-level tokenization with vocabulary size 258 (256 bytes + BOS + EOS). No vocabulary training required.
|
| 102 |
|
| 103 |
-
### Speeds, Sizes, Times
|
| 104 |
-
|
| 105 |
-
| Metric | Value |
|
| 106 |
-
|--------|-------|
|
| 107 |
-
| Training Steps | 216 |
|
| 108 |
-
| Training Time | 10 min |
|
| 109 |
-
| Final Loss | 0.3650 |
|
| 110 |
-
|
| 111 |
## Evaluation
|
| 112 |
|
| 113 |
### Metrics
|
|
@@ -116,61 +107,36 @@ Perplexity on held-out Python code using byte-level tokenization.
|
|
| 116 |
|
| 117 |
### Results
|
| 118 |
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
| Training Steps | 216 |
|
| 124 |
-
| Training Time | 10 min |
|
| 125 |
-
|
| 126 |
-
**Summary:** Good for code explanation and Q&A.
|
| 127 |
|
| 128 |
## Environmental Impact
|
| 129 |
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
| Carbon Emitted | 0.0070 kg CO2 |
|
| 135 |
-
| Cloud Provider | None (local CPU) |
|
| 136 |
-
|
| 137 |
-
## Technical Specifications
|
| 138 |
-
|
| 139 |
-
### Model Architecture
|
| 140 |
-
|
| 141 |
-
Multi-Scale Transformer with three parallel encoder stacks at resolution scales 1x, 2x, and 4x. Cross-scale attention connects all scale pairs. Adaptive gating fusion. SwiGLU feed-forward. RoPE positional encoding.
|
| 142 |
-
|
| 143 |
-
### Compute Infrastructure
|
| 144 |
-
|
| 145 |
-
| Property | Value |
|
| 146 |
-
|----------|-------|
|
| 147 |
-
| Hardware | AMD Ryzen 5 5600G (6 cores, 12 threads) |
|
| 148 |
-
| RAM | 16 GB |
|
| 149 |
-
| GPU | None (CPU-only) |
|
| 150 |
|
| 151 |
## Citation
|
| 152 |
|
| 153 |
-
```bibtex
|
| 154 |
@misc{axl_2026,
|
| 155 |
title={AXL: AXL-Chat-10M - Multi-Scale Transformer for CPU Code Generation},
|
| 156 |
-
author={
|
| 157 |
year={2026},
|
| 158 |
-
url={https://huggingface.co/
|
| 159 |
}
|
| 160 |
-
```
|
| 161 |
|
| 162 |
## How to Get Started
|
| 163 |
|
| 164 |
### With Ollama
|
| 165 |
|
| 166 |
-
```bash
|
| 167 |
ollama create axl-chat-10m -f Modelfile
|
| 168 |
ollama run axl-chat-10m "def fibonacci():"
|
| 169 |
-
```
|
| 170 |
|
| 171 |
### With Python
|
| 172 |
|
| 173 |
-
```python
|
| 174 |
import torch
|
| 175 |
from multiscale_transformer.model.config import load_config
|
| 176 |
from multiscale_transformer.model.model import MultiScaleTransformer
|
|
@@ -185,5 +151,4 @@ prompt = "def fibonacci():"
|
|
| 185 |
ids = torch.tensor([tokenizer.encode(prompt)], dtype=torch.long)
|
| 186 |
with torch.no_grad():
|
| 187 |
out = model.generate(ids, max_new_tokens=100, temperature=0.8, top_k=40)
|
| 188 |
-
print(tokenizer.decode(out[0].tolist()))
|
| 189 |
-
```
|
|
|
|
| 6 |
- code-generation
|
| 7 |
- multi-scale-transformer
|
| 8 |
- cpu-optimized
|
| 9 |
+
- cubic
|
| 10 |
- pytorch
|
| 11 |
- llama
|
| 12 |
- gguf
|
|
|
|
| 15 |
pipeline_tag: text-generation
|
| 16 |
library_name: transformers
|
| 17 |
datasets:
|
| 18 |
+
- cubic/axl-chat-pairs
|
| 19 |
widget:
|
| 20 |
- text: "User: How do I read a CSV in Python?\nAssistant:"
|
| 21 |
model-index:
|
|
|
|
| 31 |
|
| 32 |
# AXL-Chat-10M
|
| 33 |
|
| 34 |
+
Conversational AI. 9.9M params. PPL 1.02. Context 512 bytes. Part of the AXL model family by [CubicLabs](https://huggingface.co/CubicLabs).
|
| 35 |
|
| 36 |
## Model Details
|
| 37 |
|
| 38 |
| Property | Value |
|
| 39 |
|----------|-------|
|
| 40 |
+
| Developed by | [CubicLabs](https://huggingface.co/CubicLabs) |
|
| 41 |
| Architecture | Multi-Scale Transformer |
|
| 42 |
| Parameters | 10M |
|
| 43 |
| Optimizer | Lion |
|
|
|
|
| 52 |
|
| 53 |
### Sources
|
| 54 |
|
| 55 |
+
- **Repository:** https://github.com/Cubic/AXL
|
| 56 |
+
- **Organization:** https://huggingface.co/CubicLabs
|
| 57 |
|
| 58 |
## Uses
|
| 59 |
|
|
|
|
| 61 |
|
| 62 |
Conversational AI for programming Q&A.
|
| 63 |
|
| 64 |
+
Example Usage:
|
| 65 |
import torch
|
| 66 |
from multiscale_transformer.model.model import MultiScaleTransformer
|
| 67 |
from multiscale_transformer.training.tokenizer import ByteTokenizer
|
|
|
|
| 74 |
with torch.no_grad():
|
| 75 |
out = model.generate(ids, max_new_tokens=50, temperature=0.8)
|
| 76 |
print(tokenizer.decode(out[0].tolist()))
|
|
|
|
| 77 |
|
| 78 |
### Out-of-Scope Use
|
| 79 |
|
|
|
|
| 99 |
|
| 100 |
Byte-level tokenization with vocabulary size 258 (256 bytes + BOS + EOS). No vocabulary training required.
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
## Evaluation
|
| 103 |
|
| 104 |
### Metrics
|
|
|
|
| 107 |
|
| 108 |
### Results
|
| 109 |
|
| 110 |
+
Perplexity (byte-level): 1.02
|
| 111 |
+
Final Loss: 0.3650
|
| 112 |
+
Training Steps: 216
|
| 113 |
+
Training Time: 10 min
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
## Environmental Impact
|
| 116 |
|
| 117 |
+
Hardware: AMD Ryzen 5 5600G
|
| 118 |
+
Hours Used: 0.167
|
| 119 |
+
Carbon Emitted: 0.0070 kg CO2
|
| 120 |
+
Cloud Provider: None (local CPU)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
|
| 122 |
## Citation
|
| 123 |
|
|
|
|
| 124 |
@misc{axl_2026,
|
| 125 |
title={AXL: AXL-Chat-10M - Multi-Scale Transformer for CPU Code Generation},
|
| 126 |
+
author={Cubic},
|
| 127 |
year={2026},
|
| 128 |
+
url={https://huggingface.co/CubicLabs}
|
| 129 |
}
|
|
|
|
| 130 |
|
| 131 |
## How to Get Started
|
| 132 |
|
| 133 |
### With Ollama
|
| 134 |
|
|
|
|
| 135 |
ollama create axl-chat-10m -f Modelfile
|
| 136 |
ollama run axl-chat-10m "def fibonacci():"
|
|
|
|
| 137 |
|
| 138 |
### With Python
|
| 139 |
|
|
|
|
| 140 |
import torch
|
| 141 |
from multiscale_transformer.model.config import load_config
|
| 142 |
from multiscale_transformer.model.model import MultiScaleTransformer
|
|
|
|
| 151 |
ids = torch.tensor([tokenizer.encode(prompt)], dtype=torch.long)
|
| 152 |
with torch.no_grad():
|
| 153 |
out = model.generate(ids, max_new_tokens=100, temperature=0.8, top_k=40)
|
| 154 |
+
print(tokenizer.decode(out[0].tolist()))
|
|
|