Technical report: Read paper · PDF · BibTeX · All models
Collection: Mermaid models
Usage: Step-by-step Windows, Linux and macOS instructions.
Qwen3.5 2B Mermaid — MLX LoRA
GGUF: Lucasgitguy-co/Qwen3.5-2B-Mermaid-LoRA-GGUF (LoRA for llama.cpp).
Experimental vision-stage LoRA adapter for Mermaid generation. This is an MLX adapter, not a standalone model or PEFT adapter. Use the exact 4-bit base mlx-community/Qwen3.5-2B-4bit at revision 674aaa7240b91e8012fcad5d791b7dfe5ba90207. Upstream model: Qwen/Qwen3.5-2B. Apache 2.0; original Qwen attribution retained.
Training uses the publisher's deduplicated Mermaid data at revision 21bd67796259d0f5c8bf67d00f45f3d59ba8f73a with its original train/validation boundaries. The overlapping original text collection was not added again. Overlength examples were dropped rather than truncating target diagrams. Any image examples are synthetic renders, not human sketches.
See provenance.json, environment.json, and evaluation.json for the run. Validation loss alone does not establish better Mermaid validity or semantic correctness. No such improvement is claimed without a separate rendered-diagram evaluation.
Load
from huggingface_hub import snapshot_download
from mlx_vlm import load
from mlx_vlm.trainer import prepare_model_for_training
base = snapshot_download("mlx-community/Qwen3.5-2B-4bit", revision="674aaa7240b91e8012fcad5d791b7dfe5ba90207")
model, processor = load(base)
model = prepare_model_for_training(model, checkpoint_path="adapters.safetensors")
model.eval()
Keep adapter_config.json next to the adapter tensors. Use the MLX-VLM revision recorded in provenance. The text-only stage preserves the model's vision architecture but has not trained image-to-Mermaid behavior. Training changes are in the separate adapter tensors; base weights are not included.