Instructions to use IntelLabsChina/CAT-Q with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use IntelLabsChina/CAT-Q 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 IntelLabsChina/CAT-Q:Q2_0 # Run inference directly in the terminal: llama cli -hf IntelLabsChina/CAT-Q:Q2_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf IntelLabsChina/CAT-Q:Q2_0 # Run inference directly in the terminal: llama cli -hf IntelLabsChina/CAT-Q:Q2_0
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 IntelLabsChina/CAT-Q:Q2_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf IntelLabsChina/CAT-Q:Q2_0
Use Docker
docker model run hf.co/IntelLabsChina/CAT-Q:Q2_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use IntelLabsChina/CAT-Q with Ollama:
ollama run hf.co/IntelLabsChina/CAT-Q:Q2_0
- Unsloth Desktop
- Docker Model Runner
How to use IntelLabsChina/CAT-Q with Docker Model Runner:
docker model run hf.co/IntelLabsChina/CAT-Q:Q2_0
- Lemonade
How to use IntelLabsChina/CAT-Q with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull IntelLabsChina/CAT-Q:Q2_0
Run and chat with the model
lemonade run user.CAT-Q-Q2_0
List all available models
lemonade list
- Atomic Chat
Upload 4 files
Browse files
qwen3-moe-235B-A22B/config.yaml
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Model and quantization
|
| 2 |
+
model: model_zoo/Qwen3-235B-A22B
|
| 3 |
+
wbits: 1
|
| 4 |
+
abits: 16
|
| 5 |
+
group_size: 128
|
| 6 |
+
quant_mode: cat-q
|
| 7 |
+
use_scaling: false
|
| 8 |
+
|
| 9 |
+
# Calibration and training
|
| 10 |
+
epochs: 120
|
| 11 |
+
nsamples: 512
|
| 12 |
+
batch_size: 6
|
| 13 |
+
inference_batch_size: 12
|
| 14 |
+
seed: 2
|
| 15 |
+
calib_dataset: c4
|
| 16 |
+
test_datasets: wikitext2,c4
|
| 17 |
+
eval_ppl: true
|
| 18 |
+
use_bfloat16: true
|
| 19 |
+
fp16_act: false
|
| 20 |
+
low_memory: true
|
| 21 |
+
low_cpu_memory: false
|
| 22 |
+
|
| 23 |
+
# CAT-Q ternarization
|
| 24 |
+
grad_clip: 1.0
|
| 25 |
+
loss_function: huber
|
| 26 |
+
fill_window_size: 4
|
| 27 |
+
init_round_thd: 0.5
|
| 28 |
+
progressive_ratio: 0.8
|
| 29 |
+
phi_x_n: 3
|
| 30 |
+
s0: 30.0
|
| 31 |
+
learnable_factor_act: sigmoid
|
| 32 |
+
learnable_scale: true
|
| 33 |
+
learnable_mu: true
|
| 34 |
+
learnable_round: true
|
| 35 |
+
shift_mu: true
|
| 36 |
+
drop_quant_mu: true
|
| 37 |
+
|
| 38 |
+
# Sliding-layer reconstruction
|
| 39 |
+
num_layer: 1
|
| 40 |
+
sliding_layer: 1
|
| 41 |
+
use_fp_inp_loss: false
|
| 42 |
+
use_quant_tar_loss: false
|
| 43 |
+
last_round_inp_num: 1
|
| 44 |
+
quant_step: 1
|
| 45 |
+
|
| 46 |
+
# LoRA refinement is enabled whenever r > 0 in cat-q mode.
|
| 47 |
+
only_lora_gate: true
|
| 48 |
+
r: 16
|
| 49 |
+
lora_quant: true
|
| 50 |
+
|
| 51 |
+
# Optimizer
|
| 52 |
+
lora_lr: 0.001
|
| 53 |
+
learnable_factor_lr: 0.005
|
| 54 |
+
warmup_ratio: 0.0
|
qwen3-moe-235B-A22B/parameters.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d17a4ce1ca1409c2b8fea71c1ce40dea6a712f05ebdcc1da4c61e1b67b427c1d
|
| 3 |
+
size 35223526697
|
qwen3-moe-30B-A3B/config.yaml
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Model and quantization
|
| 2 |
+
model: model_zoo/Qwen3-30B-A3B
|
| 3 |
+
wbits: 1
|
| 4 |
+
abits: 16
|
| 5 |
+
group_size: 128
|
| 6 |
+
quant_mode: cat-q
|
| 7 |
+
use_scaling: false
|
| 8 |
+
|
| 9 |
+
# Calibration and training
|
| 10 |
+
epochs: 60
|
| 11 |
+
nsamples: 512
|
| 12 |
+
batch_size: 3
|
| 13 |
+
inference_batch_size: 12
|
| 14 |
+
seed: 2
|
| 15 |
+
calib_dataset: c4
|
| 16 |
+
test_datasets: wikitext2,c4
|
| 17 |
+
eval_ppl: true
|
| 18 |
+
use_bfloat16: true
|
| 19 |
+
fp16_act: false
|
| 20 |
+
low_memory: true
|
| 21 |
+
low_cpu_memory: false
|
| 22 |
+
|
| 23 |
+
# CAT-Q ternarization
|
| 24 |
+
grad_clip: 1.0
|
| 25 |
+
loss_function: huber
|
| 26 |
+
fill_window_size: 4
|
| 27 |
+
init_round_thd: 0.5
|
| 28 |
+
progressive_ratio: 0.8
|
| 29 |
+
phi_x_n: 3
|
| 30 |
+
s0: 30.0
|
| 31 |
+
learnable_factor_act: sigmoid
|
| 32 |
+
learnable_scale: true
|
| 33 |
+
learnable_mu: true
|
| 34 |
+
learnable_round: true
|
| 35 |
+
shift_mu: true
|
| 36 |
+
drop_quant_mu: true
|
| 37 |
+
|
| 38 |
+
# Sliding-layer reconstruction
|
| 39 |
+
num_layer: 4
|
| 40 |
+
sliding_layer: 2
|
| 41 |
+
use_fp_inp_loss: false
|
| 42 |
+
use_quant_tar_loss: false
|
| 43 |
+
last_round_inp_num: 1
|
| 44 |
+
quant_step: 1
|
| 45 |
+
|
| 46 |
+
# LoRA refinement is enabled whenever r > 0 in cat-q mode.
|
| 47 |
+
only_lora_gate: true
|
| 48 |
+
r: 8
|
| 49 |
+
lora_quant: true
|
| 50 |
+
|
| 51 |
+
# Optimizer
|
| 52 |
+
lora_lr: 0.001
|
| 53 |
+
learnable_factor_lr: 0.005
|
| 54 |
+
warmup_ratio: 0.0
|
qwen3-moe-30B-A3B/parameters.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:664dcc41030a9ad15bb6510d0acf7e63ada4390c502fb60162ec4e15877b0b8f
|
| 3 |
+
size 4526228349
|