4-bit quantized weights for
lerobot/pi05_base converted to Apple MLX format.
1from huggingface_hub import hf_hub_download
2import mlx.core as mx
3import mlx.nn as nn
4
5# Download quantized weights (~2.6 GB, one-time)
6npz_path = hf_hub_download("mohan007/pi05-mlx-4bit", "pi05_mlx_4bit.npz")
7
8# Load with mlx_pi05
9from mlx_pi05.load import load_model
10model = load_model(quantized_path=npz_path, quantize=True)
11model.eval()
12
13# Run inference
14import numpy as np
15image_mlx = mx.array(np.zeros((1, 3, 224, 224), dtype=np.float32))
16lang_mlx = mx.array(np.array([[1, 2, 3, 4, 5]], dtype=np.int32))
17actions = model.sample_actions(image_mlx, lang_mlx) # [1, 50, 32]
Converted from
lerobot/pi05_base original float32 safetensors.