Text Generation
Transformers
GGUF
PyTorch
code
multiscale_transformer
code-generation
multi-scale-transformer
cpu-optimized
cubic
llama
byte-level
agentic
Eval Results (legacy)
Run this model with HF Jobs
Run CubicLabs/AXL-Coder-15M on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/CubicLabs/AXL-Coder-15M. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/CubicLabs/AXL-Coder-15M on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/CubicLabs/AXL-Coder-15M. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/CubicLabs/AXL-Coder-15M. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use CubicLabs/AXL-Coder-15M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CubicLabs/AXL-Coder-15M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CubicLabs/AXL-Coder-15M")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("CubicLabs/AXL-Coder-15M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use CubicLabs/AXL-Coder-15M 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-Coder-15M:F16 # Run inference directly in the terminal: llama cli -hf CubicLabs/AXL-Coder-15M:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf CubicLabs/AXL-Coder-15M:F16 # Run inference directly in the terminal: llama cli -hf CubicLabs/AXL-Coder-15M:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf CubicLabs/AXL-Coder-15M:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf CubicLabs/AXL-Coder-15M:F16
Use Docker
docker model run hf.co/CubicLabs/AXL-Coder-15M:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use CubicLabs/AXL-Coder-15M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CubicLabs/AXL-Coder-15M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CubicLabs/AXL-Coder-15M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CubicLabs/AXL-Coder-15M:F16
- SGLang
How to use CubicLabs/AXL-Coder-15M 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-Coder-15M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CubicLabs/AXL-Coder-15M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-Coder-15M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CubicLabs/AXL-Coder-15M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use CubicLabs/AXL-Coder-15M with Ollama:
ollama run hf.co/CubicLabs/AXL-Coder-15M:F16
- Unsloth Desktop
- Docker Model Runner
How to use CubicLabs/AXL-Coder-15M with Docker Model Runner:
docker model run hf.co/CubicLabs/AXL-Coder-15M:F16
- Lemonade
How to use CubicLabs/AXL-Coder-15M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CubicLabs/AXL-Coder-15M:F16
Run and chat with the model
lemonade run user.AXL-Coder-15M-F16
List all available models
lemonade list
- Atomic Chat
Upload 11 files
Browse filesFiles changed (12)
- .gitattributes+2
- ModelfileAdded+14
- README.md+187
- axl-coder-llama-f16.ggufAdded+3
- axl-coder-llama-q4_k_m.ggufAdded+3
- axl_coder.ptAdded+3
- config.jsonAdded+22
- generation_config.jsonAdded+8
- index.htmlAdded+95
- results.jsonAdded+10
- special_tokens_map.jsonAdded+6
- tokenizer_config.jsonAdded+8
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines333435363732 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textaxl-coder-llama-f16.gguf filter=lfs diff=lfs merge=lfs -textaxl-coder-llama-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
1234567891011121314FROM ./axl_coder_15m-f16.gguf
TEMPLATE """{{ .System }}
User: {{ .Prompt }}
Assistant: """
SYSTEM """You are AXL-Coder-15M, a code generation assistant built by Koinic."""
PARAMETER temperature 0.8
PARAMETER top_k 40
PARAMETER top_p 0.9
PARAMETER repeat_penalty 1.1
PARAMETER num_ctx 256123---license: apache-2.0---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190---license: apache-2.0language:- codetags:- code-generation- multi-scale-transformer- cpu-optimized- koinic- pytorch- llama- gguf- byte-level- agenticpipeline_tag: text-generationlibrary_name: transformersdatasets:- bigcode/starcoderdata- theblackcat102/evol-codealpaca-v1widget:- text: "# Task: Implement a stack\nAction:"model-index:- name: AXL-Coder-15Mresults:- task:type: text-generationmetrics:- name: Perplexity (byte-level)type: perplexityvalue: 1.54---# AXL-Coder-15MAgentic coding. 26M params. PPL 1.54. 8-action tool router. Part of the AXL model family by [KoinicLabs](https://huggingface.co/KoinicLabs).## Model Details| Property | Value ||----------|-------|| Developed by | [KoinicLabs](https://huggingface.co/KoinicLabs) || Architecture | Multi-Scale Transformer || Parameters | 26M || Optimizer | SGD || Attention | SDPA || Vocab Size | 258 (byte-level) || Context Window | 512 bytes || d_model | 320 || Attention Heads | 5 || Layers per Scale | 4 || Downsample Factors | [1, 2, 4] || License | Apache 2.0 |### Sources- **Repository:** [GitHub](https://github.com/Koinic/AXL)- **Organization:** [KoinicLabs](https://huggingface.co/KoinicLabs)## Uses### Direct UseAgentic coding with tool routing.```pythonimport torchfrom multiscale_transformer.model.model import MultiScaleTransformerfrom multiscale_transformer.training.tokenizer import ByteTokenizerckpt = torch.load("axl_coder_15m.pt", map_location="cpu")model = MultiScaleTransformer(config)model.load_state_dict(ckpt["model_state_dict"])model.eval()tokenizer = ByteTokenizer()ids = torch.tensor([tokenizer.encode("def hello():")], dtype=torch.long)with torch.no_grad():out = model.generate(ids, max_new_tokens=50, temperature=0.8)print(tokenizer.decode(out[0].tolist()))```### Out-of-Scope UseNot for production code generation. Not for non-code NLP tasks. For integration with tools like Continue.dev, LlamaIndex, or LangChain, use the Python API server which provides OpenAI-compatible endpoints.## Bias, Risks, and LimitationsByte-level perplexity is not comparable to BPE-level perplexity. Agentic model with tool routing. Max context 512 bytes. Note: GGUF files for Ollama use a simplified single-stack encoder. For full AXL quality, use the Python API server.### Recommendations- Use for prototyping and experimentation, not production code generation.- Byte-level perplexity (258 vocab) is not comparable to BPE-level perplexity (32K vocab).- For better results, use the Lion-optimized version if available.## Training Details### Training DataTrained with SGD for 10 min. Tool router predicts 8 actions: generate, read, write, edit, run, search, think, done.### PreprocessingByte-level tokenization with vocabulary size 258 (256 bytes + BOS + EOS). No vocabulary training required.### Speeds, Sizes, Times| Metric | Value ||--------|-------|| Training Steps | ? || Training Time | --- || Final Loss | 0.4331 |## Evaluation### MetricsPerplexity on held-out Python code using byte-level tokenization.### Results| Metric | Value ||--------|-------|| Perplexity (byte-level) | 1.54 || Final Loss | 0.4331 || Training Steps | ? || Training Time | --- |**Summary:** Agentic model. Decides what action to take per coding task.## Environmental Impact| Property | Value ||----------|-------|| Hardware | AMD Ryzen 5 5600G || Hours Used | 0.001 || Carbon Emitted | 0.0001 kg CO2 || Cloud Provider | None (local CPU) |## Technical Specifications### Model ArchitectureMulti-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.### Compute Infrastructure| Property | Value ||----------|-------|| Hardware | AMD Ryzen 5 5600G (6 cores, 12 threads) || RAM | 16 GB || GPU | None (CPU-only) |## Citation```bibtex@misc{axl_2026,title={AXL: AXL-Coder-15M - Multi-Scale Transformer for CPU Code Generation},author={Koinic},year={2026},url={https://huggingface.co/KoinicLabs}}```## How to Get Started### With Ollama```bashollama create axl-coder-15m -f Modelfileollama run axl-coder-15m "def fibonacci():"```### With Python```pythonimport torchfrom multiscale_transformer.model.config import load_configfrom multiscale_transformer.model.model import MultiScaleTransformerfrom multiscale_transformer.training.tokenizer import ByteTokenizerconfig = load_config("config.json")model = MultiScaleTransformer(config)ckpt = torch.load("axl_coder_15m.pt", map_location="cpu")model.load_state_dict(ckpt["model_state_dict"])model.eval()tokenizer = ByteTokenizer()prompt = "def fibonacci():"ids = torch.tensor([tokenizer.encode(prompt)], dtype=torch.long)with torch.no_grad():out = model.generate(ids, max_new_tokens=100, temperature=0.8, top_k=40)print(tokenizer.decode(out[0].tolist()))```
123version https://git-lfs.github.com/spec/v1oid sha256:5d70a190d40ea90674b40a9214e09090ccce8eb42c6a7af5ec038c03b48d5689size 30106922123version https://git-lfs.github.com/spec/v1oid sha256:5d70a190d40ea90674b40a9214e09090ccce8eb42c6a7af5ec038c03b48d5689size 30106922123version https://git-lfs.github.com/spec/v1oid sha256:6e26301cdaa81fb7624a00980c7db1921b13e7c6ec202e4fc5df822018853a38size 10392173912345678910111213141516171819202122{
"model_type": "multiscale_transformer",
"architectures": [
"MultiScaleForCausalLM"
],
"vocab_size": 258,
"d_model": 320,
"n_heads": 5,
"d_ff": 864,
"n_layers_per_scale": 4,
"n_cross_attn_layers": 1,
"max_seq_len": 512,
"dropout": 0.0,
"bias": false,
"rope_theta": 10000.0,
"downsample_factors": [
1,
2,
4
],
"num_parameters": 22506560
}12345678{
"max_new_tokens": 256,
"temperature": 0.8,
"top_k": 40,
"top_p": 0.9,
"repetition_penalty": 1.1,
"do_sample": true
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>AXL-Coder-15M - AXL</title>
<style>*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#0d1117;color:#c9d1d9;line-height:1.6}
a{color:#58a6ff;text-decoration:none}a:hover{text-decoration:underline}
.hero{padding:40px 20px;text-align:center;border-bottom:1px solid #30363d;background:linear-gradient(135deg,#0d1117,#161b22,#0d1117)}
.hero h1{font-size:2.2rem;color:#fff;letter-spacing:-1px}
.cat{display:inline-block;padding:3px 12px;border-radius:12px;font-size:.75rem;font-weight:600;margin-bottom:12px}
.cat.Lion{background:#1f3a5f;color:#4285f4}
.cat.SGD{background:#3d1f1f;color:#f85149}
.cat.Specialized{background:#2d1b69;color:#bb86fc}
.desc{color:#8b949e;font-size:.95rem;max-width:600px;margin:12px auto 0}
.ms{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;padding:24px 20px}
.mc{background:#161b22;border:1px solid #30363d;border-radius:10px;padding:16px 24px;text-align:center;min-width:120px}
.v{font-size:1.5rem;font-weight:700;color:#fff}.l{font-size:.75rem;color:#8b949e;margin-top:2px}
.tabs{max-width:800px;margin:0 auto;padding:0 20px}
.tabs>input[type=radio]{display:none}
.tl{display:inline-block;background:#21262d;border:1px solid #30363d;color:#8b949e;padding:7px 16px;border-radius:8px;cursor:pointer;font-size:.85rem;margin:0 4px 16px;transition:all .2s}
.tl:hover{background:#30363d;color:#c9d1d9}
.p{display:none;background:#161b22;border:1px solid #30363d;border-radius:12px;padding:24px;margin-bottom:24px}
#t1:checked~.p1,#t2:checked~.p2,#t3:checked~.p3,#t4:checked~.p4{display:block}
#t1:checked+label[for=t1],#t2:checked+label[for=t2],#t3:checked+label[for=t3],#t4:checked+label[for=t4]{background:#f85149;color:#fff;border-color:#f85149}
table{width:100%;border-collapse:collapse}
th{text-align:left;color:#8b949e;font-size:.8rem;padding:8px 12px;border-bottom:1px solid #21262d;font-weight:600}
td{padding:8px 12px;font-size:.9rem;border-bottom:1px solid #21262d}
pre{background:#0d1117;padding:14px;border-radius:8px;overflow-x:auto;margin:12px 0}
code{color:#c9d1d9;font-size:.82rem;line-height:1.5}
.note{background:#21262d;border-left:3px solid #f85149;padding:12px 16px;border-radius:0 8px 8px 0;margin:12px 0;font-size:.85rem;color:#8b949e}
.story{font-size:.9rem;color:#8b949e;line-height:1.6;margin:8px 0}
.back{text-align:center;padding:24px 20px 40px}
.back a{color:#58a6ff;font-size:.9rem}
@media(max-width:768px){.hero h1{font-size:1.6rem}.ms{flex-direction:column;align-items:center}.mc{min-width:200px}}</style>
</head>
<body>
<div class="hero">
<div class="cat SGD">SGD Optimized</div>
<h1>AXL-Coder-15M</h1>
<p class="desc">Agentic coding. 26M params. PPL 1.54. 8-action tool router.</p>
</div>
<div class="ms">
<div class="mc"><div class="v">26M</div><div class="l">Parameters</div></div>
<div class="mc"><div class="v">1.54</div><div class="l">Perplexity</div></div>
<div class="mc"><div class="v">---</div><div class="l">Training</div></div>
<div class="mc"><div class="v">30 MB</div><div class="l">GGUF</div></div>
</div>
<div class="tabs">
<input type="radio" name="t" id="t1" checked><label for="t1" class="tl">Specs</label>
<input type="radio" name="t" id="t2"><label for="t2" class="tl">Training</label>
<input type="radio" name="t" id="t3"><label for="t3" class="tl">Usage</label>
<input type="radio" name="t" id="t4"><label for="t4" class="tl">Download</label>
<div class="p p1">
<table>
<tr><th>Property</th><th>Value</th></tr>
<tr><td>Architecture</td><td>Multi-Scale Transformer</td></tr>
<tr><td>d_model</td><td>?</td></tr>
<tr><td>Attention Heads</td><td>?</td></tr>
<tr><td>Layers per Scale</td><td>?</td></tr>
<tr><td>Context Window</td><td>256 bytes</td></tr>
<tr><td>Downsample Factors</td><td>[1, 2, 4]</td></tr>
<tr><td>Vocab Size</td><td>258 (byte-level)</td></tr>
<tr><td>Optimizer</td><td>SGD</td></tr>
</table>
</div>
<div class="p p2">
<div class="story">Trained with SGD for 10 min. Tool router predicts 8 actions: generate, read, write, edit, run, search, think, done.</div>
<table>
<tr><th>Metric</th><th>Value</th></tr>
<tr><td>Final Loss</td><td>0.4331</td></tr>
<tr><td>Perplexity</td><td>1.54</td></tr>
<tr><td>Training Steps</td><td>?</td></tr>
<tr><td>Training Time</td><td>---</td></tr>
</table>
</div>
<div class="p p3">
<h3 style="color:#fff;margin-bottom:12px">Usage</h3>
<pre><code>ollama create axl-coder-15m -f Modelfile
ollama run axl-coder-15m "def fibonacci():"</code></pre>
<div class="note">Agentic model. Decides what action to take per coding task.</div>
</div>
<div class="p p4">
<table>
<tr><th>File</th><th>Size</th><th>Format</th></tr>
<tr><td>F16 GGUF</td><td>30 MB</td><td>Full precision</td></tr>
<tr><td>Q4_K_M GGUF</td><td>30 MB</td><td>4-bit quantized</td></tr>
</table>
<div class="note" style="margin-top:16px">GGUF files work with Ollama and llama.cpp. Q4_K_M is about 3x smaller than F16.</div>
</div>
</div>
<div class="back"><a href="../">← All AXL Models</a></div>
</body>
</html>12345678910{
"model": "AXL-Coder-15M",
"params": 25954341,
"perplexity": 1.54,
"final_loss": 0.4331,
"steps": "?",
"time": "?",
"max_seq_len": 256,
"optimizer": "SGD"
}123456{
"pad_token": "[PAD]",
"bos_token": "[BOS]",
"eos_token": "[EOS]",
"unk_token": "[UNK]"
}12345678{
"tokenizer_class": "ByteTokenizer",
"vocab_size": 258,
"pad_token": "[PAD]",
"bos_token": "[BOS]",
"eos_token": "[EOS]",
"unk_token": "[UNK]"
}.gitattributes+2
ModelfileAdded+14
README.md+187
axl-coder-llama-f16.ggufAdded+3
axl-coder-llama-q4_k_m.ggufAdded+3
axl_coder.ptAdded+3
config.jsonAdded+22
generation_config.jsonAdded+8
index.htmlAdded+95
results.jsonAdded+10
special_tokens_map.jsonAdded+6
tokenizer_config.jsonAdded+8