convert-quantize

A workflow for converting Hugging Face model checkpoints into MLX format and optionally reducing their precision through quantization. Quantization stores model values with fewer bits to reduce resource use, with some possible accuracy trade-offs.

In plain words
What is it for?
Use it to convert local or Hugging Face models, create quantized versions such as 4-bit models, apply calibration, choose quantization methods, or upload results to a model hub.
Why use it?
It gives a defined process for selecting supported models and applying conversion, quantization, calibration, or dtype changes without relying on outdated commands.

Skill for Claude CodeCodex

Part of the mlx-vlm-skills plugin — 8 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/blaizzy/mlx-vlm/convert-quantize
Any agent
npx skills add Blaizzy/mlx-vlm --skill convert-quantize
Clone the repo
git clone --depth 1 https://github.com/Blaizzy/mlx-vlm

Made for: Claude Code, Codex.

Or install mlx-vlm-skills, the plugin that ships this one along with the rest of its 8 skills.

Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,187 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00099 $0.01187
Opus 5 $0.00049 $0.00593
Sonnet 5 $0.00020 $0.00237
Haiku 4.5 $0.00010 $0.00119

Measured 3d ago against content hash 1937024f1de3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

convert-quantize scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/skills/convert-quantize/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Convert & Quantize

Use this workflow for mlx_vlm.convert — turning a Hugging Face checkpoint into MLX format, optionally quantizing it.

First Checks

  1. Confirm the source: a Hugging Face repo id or a local path (--hf-path, alias --model).
  2. Confirm the model family is supported in 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").
  3. Verify current flags before finalizing: uv run mlx_vlm.convert --help.
  4. Entry point is mlx_vlm.convert. python -m mlx_vlm.convert is deprecated; use uv run mlx_vlm.convert ... or python -m mlx_vlm convert ....

Command Patterns

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:

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 80 lines · 99 tokens per session scan A 1937024f1de3

Subscribe to this mod's changes

convert-quantize is a skill published in the GitHub repository Blaizzy/mlx-vlm (5,458 stars, last pushed yesterday), licensed MIT. It adds 99 tokens to every session and 1,187 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

mlx-model-porting

Guides and validates architecture-aware ports of PyTorch/Hugging Face models to Apple MLX, inspects existing local MLX projects, and plans evidence-gated optimizations for Apple Silicon. Use when the user asks to run, port, convert, inspect, quantize, benchmark, or fix a model (LLM, VLM, audio/TTS/ASR, diffusion, SSM…

Amal-David/mlx-porting-skill · 244 tokens

exporting-to-fhir

Convert OpenMed NER output (entities from openmed.analyzetext) into FHIR R4 resources — Condition, MedicationStatement, Observation — using OpenMed's built-in FHIR R4 export helpers in openmed.clinical.exporters. Covers the verified CodeableConcept builder (coding, codeableconcept, systemuri), deterministic fullUrl…

maziyarpanahi/openmed · 163 tokens

annotating-variants

Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST, VEP/SnpEff/ANNOVAR offline) and links variants to gnomAD population frequencies and the clinical context OpenMed extracts. Use when the user wants to predict variant consequences, map HGVS to genomic…

maziyarpanahi/openmed · 179 tokens

batch-processing-clinical-text

Run large-scale batch NER, PII extraction, or de-identification over many clinical notes on-device with OpenMed, with sharding, checkpointing, resumability, and append-only JSONL output. Use when the user needs to process a corpus or folder of notes, de-identify a dataset, run NER over thousands of documents, build a…

maziyarpanahi/openmed · 161 tokens

bridging-presidio-and-spacy

Combine OpenMed clinical NLP with Microsoft Presidio, spaCy, or LangChain through OpenMed's built-in interop adapter registry (openmed.interop). Covers the lazy adapter registry (availableadapters, getadapter, adapterspec), the presidio/spacy/langchain pip extras, and the verified callables — Presidio…

maziyarpanahi/openmed · 154 tokens

choosing-openmed-models

Discover and pick the right OpenMed model for a clinical or biomedical task, domain, or language. Use when the user asks which OpenMed model to use, wants to list model categories, find a Disease vs Oncology vs Privacy/PII model, get a PII model for a specific language, search models by size or task, or inspect a…

maziyarpanahi/openmed · 134 tokens