Text Generation
Transformers
GGUF
PyTorch
code
multiscale_transformer
code-generation
multi-scale-transformer
cpu-optimized
koinic
llama
byte-level
commenting
Eval Results (legacy)
Instructions to use KoinicLabs/AXL-Comment-5M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KoinicLabs/AXL-Comment-5M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KoinicLabs/AXL-Comment-5M")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("KoinicLabs/AXL-Comment-5M", dtype="auto") - llama-cpp-python
How to use KoinicLabs/AXL-Comment-5M with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="KoinicLabs/AXL-Comment-5M", filename="axl-comment-f16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use KoinicLabs/AXL-Comment-5M with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf KoinicLabs/AXL-Comment-5M:Q4_K_M # Run inference directly in the terminal: llama-cli -hf KoinicLabs/AXL-Comment-5M:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf KoinicLabs/AXL-Comment-5M:Q4_K_M # Run inference directly in the terminal: llama-cli -hf KoinicLabs/AXL-Comment-5M: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 KoinicLabs/AXL-Comment-5M:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf KoinicLabs/AXL-Comment-5M: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 KoinicLabs/AXL-Comment-5M:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf KoinicLabs/AXL-Comment-5M:Q4_K_M
Use Docker
docker model run hf.co/KoinicLabs/AXL-Comment-5M:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use KoinicLabs/AXL-Comment-5M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KoinicLabs/AXL-Comment-5M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KoinicLabs/AXL-Comment-5M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KoinicLabs/AXL-Comment-5M:Q4_K_M
- SGLang
How to use KoinicLabs/AXL-Comment-5M 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 "KoinicLabs/AXL-Comment-5M" \ --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": "KoinicLabs/AXL-Comment-5M", "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 "KoinicLabs/AXL-Comment-5M" \ --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": "KoinicLabs/AXL-Comment-5M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use KoinicLabs/AXL-Comment-5M with Ollama:
ollama run hf.co/KoinicLabs/AXL-Comment-5M:Q4_K_M
- Unsloth Studio new
How to use KoinicLabs/AXL-Comment-5M 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 KoinicLabs/AXL-Comment-5M 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 KoinicLabs/AXL-Comment-5M to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for KoinicLabs/AXL-Comment-5M to start chatting
- Docker Model Runner
How to use KoinicLabs/AXL-Comment-5M with Docker Model Runner:
docker model run hf.co/KoinicLabs/AXL-Comment-5M:Q4_K_M
- Lemonade
How to use KoinicLabs/AXL-Comment-5M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull KoinicLabs/AXL-Comment-5M:Q4_K_M
Run and chat with the model
lemonade run user.AXL-Comment-5M-Q4_K_M
List all available models
lemonade list
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
| <title>AXL-Comment-5M - 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:#4285f4;color:#fff;border-color:#4285f4} | |
| 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 #4285f4;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 Lion">Lion Optimized</div> | |
| <h1>AXL-Comment-5M</h1> | |
| <p class="desc">Code commenting. 7.2M params. PPL 1.16. Context 2048 bytes.</p> | |
| </div> | |
| <div class="ms"> | |
| <div class="mc"><div class="v">7M</div><div class="l">Parameters</div></div> | |
| <div class="mc"><div class="v">1.16</div><div class="l">Perplexity</div></div> | |
| <div class="mc"><div class="v">10 min</div><div class="l">Training</div></div> | |
| <div class="mc"><div class="v">14 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>2048 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>Lion</td></tr> | |
| </table> | |
| </div> | |
| <div class="p p2"> | |
| <div class="story">Retrained with Lion on 20MB commenting pairs. 263 steps in 10 min.</div> | |
| <table> | |
| <tr><th>Metric</th><th>Value</th></tr> | |
| <tr><td>Final Loss</td><td>0.1476</td></tr> | |
| <tr><td>Perplexity</td><td>1.16</td></tr> | |
| <tr><td>Training Steps</td><td>263</td></tr> | |
| <tr><td>Training Time</td><td>10 min</td></tr> | |
| </table> | |
| </div> | |
| <div class="p p3"> | |
| <h3 style="color:#fff;margin-bottom:12px">Usage</h3> | |
| <pre><code>ollama create axl-comment-5m -f Modelfile | |
| ollama run axl-comment-5m "def fibonacci():"</code></pre> | |
| <div class="note">Adds inline comments to explain code logic.</div> | |
| </div> | |
| <div class="p p4"> | |
| <table> | |
| <tr><th>File</th><th>Size</th><th>Format</th></tr> | |
| <tr><td>F16 GGUF</td><td>14 MB</td><td>Full precision</td></tr> | |
| <tr><td>Q4_K_M GGUF</td><td>14 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> |