/mlx-vlm-skills:add-new-modelfrom mlx-vlm-skills
Guides porting a new model architecture to MLX-VLM: mapping Hugging Face model_type, writing ModelConfig, matching layer/weight names, reusing similar models, adding tests, and validating the port. Covers vision-language, language, audio, and diffusion models.
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 to port a new model to MLX-VLM.
mlx_vlm/models/<model_type>/, and the main file is named after the config.json model_type (e.g. model_type: "llava" → mlx_vlm/models/llava/llava.py). The loader resolves the arch by importing mlx_vlm.models.<model_type> (see MODEL_REMAPPING in mlx_vlm/utils.py for aliases).language.py, vision.py, config.py, processing_*.py. A new kernel/helper goes in its own file in the model dir, not inside language.py.mlx_vlm/models/ and adapt — don't write from scratch.model_type.config.py. A ModelConfig dataclass; give every new field a backward-compatible default (None/0/False) so existing configs still load unchanged. Add inline # comments.model.safetensors.index.json in the HF repo.prompt_utils.py, processors) where possible.Skill("mlx-vlm-skills:convert-quantize"). Upload them to to mlx-community (which is self-add) on HF if there is no usable official repo. If the model is already usable directly from HF, you can skip this step and just use the repo directly.mlx_vlm/tests/test_models.py (e.g. TestMyModel) — a tiny random-weight config, a shape/forward check, and (if applicable) an exactness check against a reference path in the degenerate limit. Do not create a standalone test file._infer_tool_parser_from_processor against the model's actual chat template. Reuse a compatible parser in mlx_vlm/tool_parsers/; add a parser and register its template markers in __init__.py only when needed. Check that existing formats still select the right parser.process_tool_calls in mlx_vlm/server/responses_state.py: it strips the start/end markers before invoking the parser. Confirm tools and prior tool results render correctly through the chat template.TestProcessToolCalls in mlx_vlm/tests/test_server.py, reusing existing streaming tests and fixtures. Avoid a new model-specific test file or duplicated endpoint mocks. Cover a single call, argument types, malformed input, and ordinary text around calls.uv run --with pytest python -m pytest mlx_vlm/tests/test_server.py -q -k 'ToolCall or tool_stream'. Include existing tests for any reused parser that changed.uv run python - <<'PY'
from huggingface_hub import hf_hub_download
import json
p = hf_hub_download("<repo>", "model.safetensors.index.json")
print("\n".join(sorted(json.load(open(p))["weight_map"])[:60]))
PY
cd mlx_vlm && uv run --with pytest python -m pytest tests/test_models.py -q -k "TestMyModel"
Skill("mlx-vlm-skills:cli-inference"). Run on Apple Silicon with enough RAM for the model; isolate a submodule with random-init weights if the full model does not fit (do not run large models on an 8 GB machine).Skill("mlx-vlm-skills:contributing").Model type <x> not supported: the folder name / model_type don't match, or the arch import failed — check mlx_vlm/models/<model_type>/ exists and imports cleanly.model.safetensors.index.json.processing_*.py and prompt_utils usage.Skill("mlx-vlm-skills:reproducible-github-issues").What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub neywa-labs/mlx-vlm --plugin mlx-vlm-skills9 skills in this plugin
/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./convert-quantizeUse this skill when the user wants to convert a Hugging Face model to MLX or quantize/dequantize one with mlx_vlm.convert, including bits and group size, quant modes (affine, mxfp4, nvfp4, mxfp8), RTN vs AWQ, mixed-bit recipes, dtype casts, calibration (text or multimodal), local vs Hub paths, revisions, uploading to the Hub, and convert/quant errors./hf-cache-modelsUse this skill when the user wants to list, inspect, or report cached, custom, or loaded MLX-VLM models through the server's model discovery endpoint./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.2 plugins ship this exact skill · first indexed Sep 29, 2026
Other plugins' skills for the same job