Spark 2.6
Collection
1 item • Updated
How to use Oscilla/Spark-X2.6-4B-4bit-mlx with MLX:
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm
# if on a CUDA device, also pip install mlx[cuda]
# Generate text with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("Oscilla/Spark-X2.6-4B-4bit-mlx")
prompt = "Once upon a time in"
text = generate(model, tokenizer, prompt=prompt, verbose=True)How to use Oscilla/Spark-X2.6-4B-4bit-mlx with MLX LM:
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "Oscilla/Spark-X2.6-4B-4bit-mlx" --prompt "Once upon a time"
MLX 4-bit (affine, group size 64; head-wise attention gate kept in bf16) weights of
XHToken/Spark-X2.6-4B, redistributed unchanged from the
community conversion abenzerps/Spark-X2.6-4B-MLX-4bit
(model.safetensors SHA-256 matches its SHA256SUMS.txt). Only the six files an on-device loader needs are included.
License: Apache 2.0 (see LICENSE), same as the original model. All credit to XHToken.
4-bit