Instructions to use beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4
This model beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4 was converted to MLX format from zerofata/GLM-4.5-Iceblink-v3-106B-A12B using mlx-lm version 0.31.2.
About this quant
Just a normal nvfp4. Before the latest version, this model used a bf16 lm_head layer, but that has been replaced with a full nvfp4 across the board.
There are issues with doing any sort of hybrid quantization using mxfp4/mxfp8/nvfp4, and the patches I previously put in were good enough to create a model, but not good enough to run them properly. Big thanks to @circadesu for bringing these issues to my attention.
For now, I've removed the bf16 head layer and fallen back to a "normal" quant for both mxfp4 and nvfp4. I'm also deleting the mxfp4-mxfp8 and nvfp4-mxfp8 quants of this model entirely. I want to revisit this, but it will take substantial work that I'm not ready to take on quite yet.
Original Model Card
Iceblink
Version 3 · GLM-4.5 AirDecided to try tuning Air again after I saw Axolotl make some improvements on their training implementation and now that I know a lot more about what I'm doing. And wow. I think this came out pretty good.
This model is a creative writing and RP model. Supports reasoning and no reasoning with the usual GLM Air templates. Although reasoning off is recommended generally.
Recommended Roleplay Format
Recommended Samplers
Instruct
GLM4.5 (no thinking): SillyTavern Preset
GGUF
Creation Process: SFT > SFT
SFT on approx 15.3 million tokens (11.7 million trainable), SFW / NSFW RP, instruct & chat data.
Then I tried out an idea I saw from ConicCat and trained the model for 8 epochs on 96 short stories (150k tokens) from light novels and human authors the internet said were good. This seems to have had a surprisingly positive effect on the prose without hurting the intelligence too much.
I went back to my usual higher LR's for this model. It turns out the GLM chat template was more cursed than I originally gave it credit for while training. It was a skill issue all along, go figure.
Axolotl Config
base_model: zai-org/GLM-4.5-Air
eot_tokens:
- "<|user|>"
- "<|endoftext|>"
chat_template_jinja: ./glm_air.jinja
plugins:
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
load_in_8bit: false
load_in_4bit: true
quantize_moe_experts: true # important
datasets:
- path: ./data/nothink_dataset.jsonl
type: chat_template
- path: ./data/think_dataset.jsonl
type: chat_template
dataset_prepared_path: last_run_prepared
val_set_size: 0.01
output_dir: ./GLM-Air-v4-SFT-1
adapter: qlora
lora_model_dir:
sequence_len: 10756
sample_packing: true
lora_r: 128
lora_alpha: 16
peft_use_rslora: true
lora_dropout: 0
lora_target_modules:
- q_proj
- v_proj
- k_proj
- o_proj
lora_target_parameters:
- mlp.experts.gate_up_proj
- mlp.experts.down_proj
lora_mlp_kernel: false
lora_qkv_kernel: false
lora_o_kernel: false
gradient_accumulation_steps: 8
micro_batch_size: 1
num_epochs: 2
optimizer: adamw_torch_8bit
lr_scheduler: cosine
learning_rate: 1e-5
bf16: auto
tf32: false
resume_from_checkpoint:
logging_steps: 1
flash_attention: true
warmup_ratio: 0.1
evals_per_epoch: 3
saves_per_epoch: 3
fsdp_config:
fsdp_version: 2
offload_params: false
cpu_ram_efficient_loading: false
auto_wrap_policy: TRANSFORMER_BASED_WRAP
transformer_layer_cls_to_wrap: Glm4MoeDecoderLayer
state_dict_type: FULL_STATE_DICT
sharding_strategy: FULL_SHARD
reshard_after_forward: true
activation_checkpointing: true
# save_first_step: true # uncomment this to validate checkpoint saving works with your config
base_model: ApocalypseParty/GLM-Air-v4-SFT-1-merged
eot_tokens:
- "<|user|>"
- "<|endoftext|>"
chat_template_jinja: ./glm_air.jinja
plugins:
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
load_in_8bit: false
load_in_4bit: true
quantize_moe_experts: true # important
datasets:
- path: ./data/dataset_writing.jsonl
type: chat_template
dataset_prepared_path: last_run_prepared
output_dir: ./GLM-Air-v4-SFT-1-writing
wandb_project: GLM-Air-v4-SFT
wandb_name: GLM-Air-v4-SFT-1-writing
adapter: qlora
lora_model_dir:
sequence_len: 4096
sample_packing: true
lora_r: 16
lora_alpha: 32
lora_dropout: 0
lora_target_modules:
- q_proj
- v_proj
- k_proj
- o_proj
lora_target_parameters:
- mlp.experts.gate_up_proj
- mlp.experts.down_proj
lora_mlp_kernel: false
lora_qkv_kernel: false
lora_o_kernel: false
gradient_accumulation_steps: 4
micro_batch_size: 2
num_epochs: 8
optimizer: adamw_torch_8bit
lr_scheduler: cosine
learning_rate: 9e-6
bf16: auto
tf32: false
resume_from_checkpoint:
logging_steps: 1
flash_attention: true
warmup_ratio: 0.1
saves_per_epoch: 1
fsdp_config:
fsdp_version: 2
offload_params: false
cpu_ram_efficient_loading: false
auto_wrap_policy: TRANSFORMER_BASED_WRAP
transformer_layer_cls_to_wrap: Glm4MoeDecoderLayer
state_dict_type: FULL_STATE_DICT
sharding_strategy: FULL_SHARD
reshard_after_forward: true
activation_checkpointing: true
# save_first_step: true # uncomment this to validate checkpoint saving works with your config
- Downloads last month
- 31
4-bit
Model tree for beezu/GLM-4.5-Iceblink-v3-106B-A12B-mlx-nvfp4
Base model
zai-org/GLM-4.5-Air