Ultra-compressed version of
nvidia/personaplex-7b-v1 for deployment on edge devices like NVIDIA Jetson AGX Orin.
Quantized using a TurboQuant-inspired method combining Walsh-Hadamard Transform rotation with Normal Float 2-bit (NF2) optimal scalar quantization.
PersonaPlex requires 12.5 frames/second (80ms/frame budget). At 2.07 GB, weight loading is well under budget on any modern GPU.
Keeps packed 2-bit weights on GPU, dequantizes per-matmul. ~10 GB peak VRAM vs 19 GB for bf16.
1import torch
2from safetensors.torch import load_file
3from huggingface_hub import hf_hub_download
4
5# Download this repo's files
6weight_path = hf_hub_download("cudabenchmarktest/personaplex-7b-turbo2bit", "model-turbo2bit.safetensors", token=False)
7linear2bit_path = hf_hub_download("cudabenchmarktest/personaplex-7b-turbo2bit", "linear2bit.py", token=False)
8
9# Import the Linear2bit module
10import importlib.util
11spec = importlib.util.spec_from_file_location("linear2bit", linear2bit_path)
12linear2bit_mod = importlib.util.module_from_spec(spec)
13spec.loader.exec_module(linear2bit_mod)
14
15# Load model (requires moshi-personaplex package)
16from moshi.models.loaders import _lm_kwargs, LMModel
17lm_kwargs = dict(_lm_kwargs); lm_kwargs["dep_q"] = 16
18model = LMModel(device="meta", dtype=torch.bfloat16, **lm_kwargs)
19state_2bit = load_file(weight_path, device="cpu")
20model = linear2bit_mod.replace_linears_with_2bit(model, state_2bit, device="cuda", dtype=torch.bfloat16)
21model.eval()
1python dequantize.py --input model-turbo2bit.safetensors --output model-bf16.safetensors
2# Output: 15.59 GB bf16 file
1# Native 2-bit (~10GB peak, no HF token needed)
2NO_CUDA_GRAPH=1 python -m moshi.server --moshi-weight model-turbo2bit.safetensors --native-2bit --device cuda
3
4# + CPU Mimi codec (saves ~840MB)
5NO_CUDA_GRAPH=1 python -m moshi.server --moshi-weight model-turbo2bit.safetensors --native-2bit --cpu-mimi --device cuda
Quantized on 3x NVIDIA A100 80GB PCIe in 50 seconds using CUDA-accelerated Walsh-Hadamard Transform.
Quantized by
open-agents-ai using TurboQuant-inspired NF2+WHT method.
Base model by NVIDIA Research (
PersonaPlex paper).