Text Generation
Transformers
GGUF
PyTorch
code
multiscale_transformer
code-generation
multi-scale-transformer
cpu-optimized
cubic
llama
byte-level
refactoring
Eval Results (legacy)
Instructions to use CubicLabs/AXL-Refactor-Lion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CubicLabs/AXL-Refactor-Lion with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CubicLabs/AXL-Refactor-Lion")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("CubicLabs/AXL-Refactor-Lion", dtype="auto") - llama-cpp-python
How to use CubicLabs/AXL-Refactor-Lion with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="CubicLabs/AXL-Refactor-Lion", filename="axl-refactor-lion-f16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use CubicLabs/AXL-Refactor-Lion 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-Refactor-Lion:Q4_K_M # Run inference directly in the terminal: llama cli -hf CubicLabs/AXL-Refactor-Lion: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-Refactor-Lion:Q4_K_M # Run inference directly in the terminal: llama cli -hf CubicLabs/AXL-Refactor-Lion: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-Refactor-Lion:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf CubicLabs/AXL-Refactor-Lion: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-Refactor-Lion:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf CubicLabs/AXL-Refactor-Lion:Q4_K_M
Use Docker
docker model run hf.co/CubicLabs/AXL-Refactor-Lion:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use CubicLabs/AXL-Refactor-Lion with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CubicLabs/AXL-Refactor-Lion" # 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-Refactor-Lion", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CubicLabs/AXL-Refactor-Lion:Q4_K_M
- SGLang
How to use CubicLabs/AXL-Refactor-Lion 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-Refactor-Lion" \ --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-Refactor-Lion", "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-Refactor-Lion" \ --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-Refactor-Lion", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use CubicLabs/AXL-Refactor-Lion with Ollama:
ollama run hf.co/CubicLabs/AXL-Refactor-Lion:Q4_K_M
- Unsloth Studio
How to use CubicLabs/AXL-Refactor-Lion 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-Refactor-Lion 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-Refactor-Lion 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-Refactor-Lion to start chatting
- Atomic Chat new
- Docker Model Runner
How to use CubicLabs/AXL-Refactor-Lion with Docker Model Runner:
docker model run hf.co/CubicLabs/AXL-Refactor-Lion:Q4_K_M
- Lemonade
How to use CubicLabs/AXL-Refactor-Lion with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CubicLabs/AXL-Refactor-Lion:Q4_K_M
Run and chat with the model
lemonade run user.AXL-Refactor-Lion-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
|
|
@@ -33,13 +33,13 @@ model-index:
|
|
| 33 |
|
| 34 |
# AXL-Refactor-Lion
|
| 35 |
|
| 36 |
-
Refactoring specialist. 19.1M params. PPL 1.02. Context 256 bytes. Part of the AXL model family by [
|
| 37 |
|
| 38 |
## Model Details
|
| 39 |
|
| 40 |
| Property | Value |
|
| 41 |
|----------|-------|
|
| 42 |
-
| Developed by | [
|
| 43 |
| Architecture | Multi-Scale Transformer |
|
| 44 |
| Parameters | 19M |
|
| 45 |
| Optimizer | Lion |
|
|
@@ -54,8 +54,8 @@ Refactoring specialist. 19.1M params. PPL 1.02. Context 256 bytes. Part of the A
|
|
| 54 |
|
| 55 |
### Sources
|
| 56 |
|
| 57 |
-
- **Repository:** [GitHub](https://github.com/
|
| 58 |
-
- **Organization:** [
|
| 59 |
|
| 60 |
## Uses
|
| 61 |
|
|
@@ -155,9 +155,9 @@ Multi-Scale Transformer with three parallel encoder stacks at resolution scales
|
|
| 155 |
```bibtex
|
| 156 |
@misc{axl_2026,
|
| 157 |
title={AXL: AXL-Refactor-Lion - Multi-Scale Transformer for CPU Code Generation},
|
| 158 |
-
author={
|
| 159 |
year={2026},
|
| 160 |
-
url={https://huggingface.co/
|
| 161 |
}
|
| 162 |
```
|
| 163 |
|
|
@@ -188,4 +188,4 @@ ids = torch.tensor([tokenizer.encode(prompt)], dtype=torch.long)
|
|
| 188 |
with torch.no_grad():
|
| 189 |
out = model.generate(ids, max_new_tokens=100, temperature=0.8, top_k=40)
|
| 190 |
print(tokenizer.decode(out[0].tolist()))
|
| 191 |
-
```
|
|
|
|
| 6 |
- code-generation
|
| 7 |
- multi-scale-transformer
|
| 8 |
- cpu-optimized
|
| 9 |
+
- cubic
|
| 10 |
- pytorch
|
| 11 |
- llama
|
| 12 |
- gguf
|
|
|
|
| 33 |
|
| 34 |
# AXL-Refactor-Lion
|
| 35 |
|
| 36 |
+
Refactoring specialist. 19.1M params. PPL 1.02. Context 256 bytes. Part of the AXL model family by [CubicLabs](https://huggingface.co/CubicLabs).
|
| 37 |
|
| 38 |
## Model Details
|
| 39 |
|
| 40 |
| Property | Value |
|
| 41 |
|----------|-------|
|
| 42 |
+
| Developed by | [CubicLabs](https://huggingface.co/CubicLabs) |
|
| 43 |
| Architecture | Multi-Scale Transformer |
|
| 44 |
| Parameters | 19M |
|
| 45 |
| Optimizer | Lion |
|
|
|
|
| 54 |
|
| 55 |
### Sources
|
| 56 |
|
| 57 |
+
- **Repository:** [GitHub](https://github.com/Cubic/AXL)
|
| 58 |
+
- **Organization:** [CubicLabs](https://huggingface.co/CubicLabs)
|
| 59 |
|
| 60 |
## Uses
|
| 61 |
|
|
|
|
| 155 |
```bibtex
|
| 156 |
@misc{axl_2026,
|
| 157 |
title={AXL: AXL-Refactor-Lion - Multi-Scale Transformer for CPU Code Generation},
|
| 158 |
+
author={Cubic},
|
| 159 |
year={2026},
|
| 160 |
+
url={[https://huggingface.co/CubicLabs](https://huggingface.co/CubicLabs)}
|
| 161 |
}
|
| 162 |
```
|
| 163 |
|
|
|
|
| 188 |
with torch.no_grad():
|
| 189 |
out = model.generate(ids, max_new_tokens=100, temperature=0.8, top_k=40)
|
| 190 |
print(tokenizer.decode(out[0].tolist()))
|
| 191 |
+
```
|