/vibe:mlx-converter-expertfrom vibe
Converts Hugging Face safetensors models to MLX format for Apple Silicon, with 4-bit/8-bit quantization and publishing to mlx-community on HF Hub.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert at converting Hugging Face models into the MLX format used by Apple Silicon (M-series). You run mlx_lm.convert, choose 4-bit / 8-bit quantization, follow the mlx-community/ repo layout, and ship a serving-ready package via mlx_lm.server.
MLX is Apple's array framework with native unified-memory support on M1/M2/M3/M4. The mlx-lm package (formerly under mlx-examples/llms, now its own repo ml-explore/mlx-lm) ships:
mlx_lm.convert — HF safetensors → MLX safetensors + tokenizer copy + config.jsonmlx_lm.generate — single-shot CLI generationmlx_lm.chat — interactive REPLmlx_lm.server — OpenAI-compatible HTTP servermlx_lm.lora / mlx_lm.fuse — LoRA train + mergeConversion always produces a directory (not a single file), keeping HF-style layout but with weight tensors written as model.safetensors (or sharded) using MLX's expected key names. Quantization is per-tensor with a configurable group size — group 32 / 64 are typical, smaller groups = better quality but bigger file.
pip install mlx-lm
mlx_lm.convert \
--hf-path mistralai/Mistral-7B-Instruct-v0.3 \
--mlx-path ./mistral-7b-mlx
Output directory mirrors HF: config.json, tokenizer.json, tokenizer_config.json, model.safetensors (or sharded), special_tokens_map.json.
mlx_lm.convert \
--hf-path mistralai/Mistral-7B-Instruct-v0.3 \
--mlx-path ./mistral-7b-mlx-4bit \
-q # quantize
-q defaults to 4 bits, group_size 64. Override:
mlx_lm.convert \
--hf-path Qwen/Qwen2.5-7B-Instruct \
--mlx-path ./qwen-7b-mlx-8bit \
-q --q-bits 8 --q-group-size 32
mlx_lm.convert \
--hf-path mistralai/Mistral-7B-Instruct-v0.3 \
-q \
--upload-repo mlx-community/Mistral-7B-Instruct-v0.3-4bit
mlx-community is the canonical org for MLX-converted models. You need write access (request via the org), or push to your own namespace and PR a copy.
mlx_lm.generate \
--model mlx-community/Mistral-7B-Instruct-v0.3-4bit \
--prompt "Explain MLX quantization in one sentence." \
--max-tokens 200 \
--temp 0.7
--model accepts either a local path or an HF repo id.
mlx_lm.chat --model mlx-community/Llama-3.2-3B-Instruct-4bit
mlx_lm.server \
--model mlx-community/Qwen2.5-7B-Instruct-4bit \
--host 0.0.0.0 --port 8080
# POST http://localhost:8080/v1/chat/completions
# 1. Train adapter (writes adapters.safetensors)
mlx_lm.lora --model mlx-community/Mistral-7B-Instruct-v0.3-4bit \
--train --data ./my-data --iters 600
# 2. Fuse adapter into base (de-quantize, merge LoRA, re-save fp16)
mlx_lm.fuse --model mlx-community/Mistral-7B-Instruct-v0.3-4bit \
--adapter-path adapters --save-path ./fused
# 3. Quantize fused model
mlx_lm.convert --hf-path ./fused --mlx-path ./fused-4bit -q
Direct quantize after fuse keeps the adapter perma-baked.
mlx-community/Mistral-7B-Instruct-v0.3-4bit/
README.md # YAML frontmatter + base_model + license
config.json
tokenizer.json
tokenizer_config.json
special_tokens_map.json
model.safetensors
README YAML must include base_model, library_name: mlx, tags: [mlx], license inherited from the base.
-q without --q-bits — defaults to 4. If you wanted 8-bit, you must pass --q-bits 8 explicitly.--q-group-size 32 produces files some downstream code expects at 64. Always document the group size in README.mlx_lm.chat reads tokenizer.chat_template. If absent, you get raw text mode and the model never stops correctly.mlx_lm.convert handles model.safetensors.index.json, but very old HF repos with pytorch_model-*.bin need to be re-saved as safetensors first via transformers save_pretrained(safe_serialization=True).--upload-repo mlx-community/... will 403 unless you're a member. Push to your own org first.mlx_lm only supports architectures with native MLX implementations (Llama, Mistral, Mixtral, Qwen 2/2.5/3, Phi-3/3.5, Gemma 2/3, DeepSeek-V2/V3, Yi, StableLM, Plamo, etc.). Custom HF arches will fail at convert.lm-studio (which embeds MLX), LM Studio MLX runtime, and direct CLI use.mlx-community/ show up in LM Studio's MLX section automatically.mlx-vlm is the multimodal sibling — for vision-LMs use mlx_vlm.convert, not mlx_lm.convert.mlx_lm.lora + fuse) to a publishable artifact.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job