Image-Text-to-Text
MLX
Safetensors
English
qwen2_vl
vision-language
image-to-text
qwen2-vl
apple-silicon
conversational
8-bit precision
Instructions to use Munchit/dam-vision-v3-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Munchit/dam-vision-v3-mlx with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("Munchit/dam-vision-v3-mlx") config = load_config("Munchit/dam-vision-v3-mlx") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
| license: apache-2.0 | |
| base_model: Qwen/Qwen2-VL-2B-Instruct | |
| library_name: mlx | |
| language: en | |
| tags: | |
| - mlx | |
| - vision-language | |
| - image-to-text | |
| - qwen2-vl | |
| - apple-silicon | |
| pipeline_tag: image-text-to-text | |
| # dam-vision-v3-mlx (8-bit) | |
| MLX 8-bit build of the **DAM vision model** β a fine-tuned | |
| [Qwen2-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct) with the | |
| DAM **v3** LoRA merged into the base weights. This is the *same* fine-tuned model the | |
| DAM pipeline serves via vLLM (tag `qwen2-vl-2b-v3+f2`), packaged here to run natively | |
| on **Apple Silicon Macs with MLX** (Metal) β no server, no CUDA. | |
| ## Details | |
| | | | | |
| |---|---| | |
| | Base | `Qwen/Qwen2-VL-2B-Instruct` | | |
| | Fine-tune | DAM v3 LoRA, merged | | |
| | Format | MLX, **8-bit** affine quantization (group size 64) | | |
| | Size on disk | ~2.97 GB | | |
| | Architecture | `Qwen2VLForConditionalGeneration` | | |
| | Converter | `mlx-vlm` 0.6.2 (`mlx` 0.31.2) | | |
| ## Usage | |
| ```bash | |
| pip install mlx-vlm | |
| python -m mlx_vlm generate \ | |
| --model Munchit/dam-vision-v3-mlx \ | |
| --image your_frame.jpg \ | |
| --prompt "Describe this image." \ | |
| --max-tokens 128 --temperature 0.0 | |
| ``` | |
| Python: | |
| ```python | |
| from mlx_vlm import load, generate | |
| from mlx_vlm.prompt_utils import apply_chat_template | |
| model, processor = load("Munchit/dam-vision-v3-mlx") | |
| config = model.config | |
| prompt = apply_chat_template(processor, config, "Describe this image.", num_images=1) | |
| out = generate(model, processor, prompt, ["your_frame.jpg"], max_tokens=128, temp=0.0) | |
| print(out) | |
| ``` | |
| ## Known limitation (v3) | |
| The v3 fine-tune has a known **caption-repetition** failure mode: a meaningful fraction | |
| of outputs loop/repeat catastrophically. This is inherent to the v3 weights β it is not | |
| introduced by the MLX conversion and is not fixable by decode settings or prompt changes; | |
| it requires a v4 retrain. Keep this in mind before relying on it for production captioning. | |
| ## Provenance | |
| Converted on Linux (MLX CPU build) from the merged v3 checkpoint; the MLX weight format is | |
| portable and runs on Apple Silicon under Metal. Structural load + the underlying weights are | |
| validated (the same model runs in the DAM vLLM pipeline); verify end-to-end generation on | |
| an Apple Silicon device. | |