/mlx-vlm-skills:convert-quantizefrom mlx-vlm-skills
Converts Hugging Face models to MLX format and quantizes/dequantizes them with mlx_vlm.convert, supporting bits, group size, quant modes (affine, mxfp4, nvfp4, mxfp8), RTN vs AWQ, mixed-bit recipes, dtype casts, calibration, and Hub uploads.
Ships in mlx-vlm-skills. 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.
Use this workflow for mlx_vlm.convert — turning a Hugging Face checkpoint into MLX format, optionally quantizing it.
--hf-path, alias --model).mlx_vlm/models/ (a folder named after the config.json model_type). If not, this is a porting task — switch to Skill("mlx-vlm-skills:add-new-model").uv run mlx_vlm.convert --help.mlx_vlm.convert. python -m mlx_vlm.convert is deprecated; use uv run mlx_vlm.convert ... or python -m mlx_vlm convert ....Plain convert (no quantization), saves to ./mlx_model by default:
uv run mlx_vlm.convert --hf-path <repo-or-path> --mlx-path ./out-mlx
4-bit affine quantization (RTN, the default method):
uv run mlx_vlm.convert --hf-path <repo-or-path> --mlx-path ./out-4bit -q --q-bits 4 --q-group-size 64
Other quant modes (--q-mode sets its own bit/group defaults):
# mxfp4 (group 32, 4 bit), nvfp4 (group 16, 4 bit), mxfp8 (group 32, 8 bit)
uv run mlx_vlm.convert --hf-path <repo-or-path> --mlx-path ./out-mxfp4 -q --q-mode mxfp4
Mixed-bit recipe (per-layer bit allocation, llama.cpp-style):
# recipes: mixed_2_6 mixed_3_4 mixed_3_5 mixed_3_6 mixed_3_8 mixed_4_6 mixed_4_8
uv run mlx_vlm.convert --hf-path <repo-or-path> --mlx-path ./out-mixed -q --quant-predicate mixed_3_6
AWQ (activation-aware, needs a calibration pass):
uv run mlx_vlm.convert --hf-path <repo-or-path> --mlx-path ./out-awq -q --quant-method awq \
--calibration multimodal --calibration-data /path/to/media # or --calibration text (default)
dtype cast only / dequantize:
uv run mlx_vlm.convert --hf-path <repo-or-path> --mlx-path ./out-bf16 --dtype bfloat16
uv run mlx_vlm.convert --hf-path <quantized-repo> --mlx-path ./out-fp -d # dequantize
Upload the result to the Hub:
uv run mlx_vlm.convert --hf-path <repo> --mlx-path ./out -q --upload-repo <user>/<name>-mlx
skip_multimodal_module) — vision/audio towers stay full precision; only the language model is quantized. This is expected, not a bug.--q-mode choices: affine (default, group 64 / 4 bit), mxfp4 (32/4), nvfp4 (16/4), mxfp8 (32/8). --q-bits/--q-group-size override the mode defaults.--quant-method: rtn (default, round-to-nearest) or awq (needs calibration; --calibration text|multimodal, optional --calibration-data).-q/--quantize and -d/--dequantize are mutually exclusive.--dtype (from config.json torch_dtype if unset) casts float weights; useful for shrinking fp32 → bf16 without quantizing.*.py/*.json, the processor, a regenerated config.json, and a model card — it is ready for mlx_vlm.generate and the server.Skill("mlx-vlm-skills:cli-inference"). Run on Apple Silicon with enough RAM for the model; do not attempt a large model on an 8 GB machine.--q-mode for the model.uv run --with pytest python -m pytest mlx_vlm/tests/test_utils.py -q and any model-specific test.Skill("mlx-vlm-skills:reproducible-github-issues").What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub yuhuabillchen/justfit-mlx --plugin mlx-vlm-skills8 skills in this plugin
/add-new-modelUse this skill when the user wants to add or port a new model architecture to MLX-VLM — mapping a Hugging Face model_type to a new file under mlx_vlm/models, writing the ModelConfig, matching layer/weight names, reusing a similar existing model, adding a test class, and validating the port. Covers vision-language, language, audio, and diffusion model ports./benchmarkingUse this skill when the user wants to benchmark an MLX-VLM change and present the numbers in a PR — fork-vs-main A/B comparisons, isolated-module micro-benchmarks, median-of-N timing with warmup, peak-memory reporting, correctness checks, parameter sweeps, and self-contained reproducible bench scripts to paste into a PR description./cli-inferenceUse this skill when the user wants to run or debug MLX-VLM inference from the command line, including uv run mlx_vlm.generate, image/audio/video inputs, local model paths, Hugging Face model IDs, deterministic repro commands, and CLI errors around processors, prompts, model loading, or missing weights./contributingUse this skill when the user wants to contribute to MLX-VLM — opening a PR, where model code/config/tests go, backward-compatible config args, running the test suite, code formatting and the pre-commit hooks (black, clang-format), and PR expectations (tests, review, perf evidence). Use it to set up a change so it passes review./hf-cache-modelsUse this skill when the user wants to list, inspect, or report MLX-VLM model candidates available in the local Hugging Face cache directory, including the server's opt-in hf-cache discovery mode, cache-dir overrides, JSON output, or issue-ready cached model lists./reproducible-github-issuesUse this skill when the user wants to create, improve, or triage a reproducible GitHub issue for MLX-VLM, including bug reports from CLI inference, server inference, model loading, processors, media inputs, dependency setup, crashes, wrong outputs, or performance regressions.3 plugins ship this exact skill · first indexed Aug 4, 2026
Other plugins' skills for the same job