这是 ATH-MaaS/OvisOCR2 的非官方 MLX BF16 转换版本,面向 Apple Silicon Mac 上的 MLX-VLM 和 oMLX。
Modellquelle
Quellenbeschreibung
这是 ATH-MaaS/OvisOCR2 的非官方 MLX BF16 转换版本,面向 Apple Silicon Mac 上的 MLX-VLM 和 oMLX。
This is an unofficial MLX BF16 conversion of for document OCR and document parsing on Apple Silicon Macs. It is a format conversion, not a new training run or a fine-tuned checkpoint.
Quellen
1 QuelleVerifiziert 11. Sept.
Modellartefakte
1 ArtefaktQuellenauszüge
2 AuszügeATH-MaaS/OvisOCR2| Item | Value |
|---|---|
| Base model | ATH-MaaS/OvisOCR2 |
| Model family | Qwen3.5 VLM (model_type: qwen3_5) |
| Main use | OCR, document parsing, Markdown extraction |
| MLX format | BF16 |
| Quantization | None; floating-point BF16 weights |
| Processor | Qwen3VLProcessor |
| Weight size | Approximately 1.7 GB for model.safetensors |
| Conversion status | Community conversion; not affiliated with the upstream authors |
Use this checkpoint to extract readable content from document images, including:
The output quality depends on image resolution, blur, contrast, handwriting, document layout and the prompt. This repository does not claim a new accuracy benchmark; users should validate it on their own document types.
The simplest runtime is mlx-vlm on an Apple Silicon Mac:
python3 -m pip install -U mlx-vlm huggingface_hub
For a clean environment, use a virtual environment instead of installing packages into the system Python:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip mlx-vlm huggingface_hub
MLX requires Apple Silicon. CUDA, ROCm and ordinary x86 CPU inference are not the target runtime for this repository.
Replace YOUR_HF_USERNAME with the account or organization that publishes this repository:
hf download YOUR_HF_USERNAME/OvisOCR2-MLX-BF16 \
--local-dir ./OvisOCR2-MLX-BF16
The repository should contain the extracted MLX model files at its root. Do not put the model inside another nested directory, and do not upload only the .tar archive.
The official mlx-vlm command is mlx_vlm.generate:
mlx_vlm.generate \
--model ./OvisOCR2-MLX-BF16 \
--image /path/to/document.png \
--prompt "Extract all readable content from this image in Markdown. Preserve the original reading order, headings, paragraphs, lists, and table structure as much as possible. Return Markdown only; do not add explanations." \
--max-tokens 4096 \
--temperature 0.0
For OCR, thinking is normally unnecessary. Do not pass --enable-thinking unless you intentionally want to test a thinking-style prompt.
A shorter prompt can also be used:
Extract all readable content from the image in Markdown. Preserve the original text and layout as much as possible. Return Markdown only.
oMLX treats this checkpoint as a Qwen3.5 vision-language model. Copy the model into the directory configured for oMLX, then start the server:
mkdir -p ~/models
hf download YOUR_HF_USERNAME/OvisOCR2-MLX-BF16 \
--local-dir ~/models/OvisOCR2-MLX-BF16
omlx serve --model-dir ~/models
Open http://localhost:8000/admin/chat, select the model and upload a document image. If an oMLX installation does not identify the model automatically, set its model type to VLM in the Admin panel. Use a prompt like the one above and keep thinking disabled for normal OCR.
The first request can be slower because the model and Metal resources have to be loaded. Subsequent requests are the more useful measure of inference speed. Cold-start time also depends on whether oMLX has evicted the model, the current memory pressure, the storage device and the installed oMLX/MLX version.
The conversion was performed from the upstream Hugging Face checkpoint with mlx-vlm:
mlx_vlm.convert \
--hf-path ATH-MaaS/OvisOCR2 \
--mlx-path OvisOCR2-MLX-BF16
This conversion preserves the upstream model architecture and tokenizer/processor assets while changing the weight format to MLX-compatible BF16 tensors. Re-running a conversion with a different mlx-vlm version may produce small metadata differences; the generated config.json and processor files should be kept together with the weights.
The model repository contains the MLX weight file and the configuration, tokenizer and processor files required by mlx-vlm/oMLX. Typical files include:
README.md
config.json
model.safetensors
processor_config.json
preprocessor_config.json
tokenizer.json
tokenizer_config.json
chat_template.jinja
The exact auxiliary filenames may vary slightly with the mlx-vlm release. Do not rename or remove files generated by the converter.
The upstream model page identifies ATH-MaaS/OvisOCR2 as Apache-2.0. Please review and comply with the upstream license and attribution requirements when redistributing this conversion. This repository is an unofficial format conversion and does not change the upstream license.
Upstream resources:
This repository contains the BF16 MLX conversion named OvisOCR2-MLX-BF16. It should be used together with the model files in this repository, not with the original Transformers/PyTorch weights directly.
--- license: apache-2.0 base_model: ATH-MaaS/OvisOCR2 library_name: mlx pipeline_tag: image-text-to-text language: - zh - en tags: - mlx - mlx-vlm - apple-silicon - ocr - document-parsing - qwen3_5 --- # OvisOCR2-MLX-BF16 这是 [`ATH-MaaS/OvisOCR2`](https://huggingface.co/ATH-MaaS/OvisOCR2) 的非官方 MLX BF16 转换版本,面向 Apple Silicon Mac 上的 [MLX-VLM](https://github.com/Blaizzy/mlx-vlm) 和 [oMLX](https://github.com/jundot/omlx)。 This is an unofficial MLX BF16 conversion of `ATH-MaaS/OvisOCR2` for document OCR and document parsing on Apple Silicon Macs. It is a format conversion, not a new training run or a fine-tuned checkpoint. ## Model summary | Item | Value | |---|---| | Base model | [`ATH-MaaS/OvisOCR2`](https://huggingface.co/ATH-MaaS/OvisOCR2) | | Model family | Qwen3.5 VLM (`model_type: qwen3_5`) | | Main use | OCR, document parsing, Markdown extraction | | MLX format | BF16 | | Quantization | None; floating-point BF16 weights | | Processor | `Qwen3VLProcessor` | | Weight size | Approximately 1.7 GB for `model.safetensors` | | Conversion status | Community conversion; not affiliated with the upstream authors | ## Intended use Use this checkpoint to extract readable content from document images, including: - printed Chinese and English text; - headings, paragraphs and lists; - tables and basic document layout; - Markdown-oriented document conversion. The output quality depends on image resolution, blur, contrast, handwriting, document layout and the prompt. This repository does not claim a new accuracy benchmark; users should validate it on their own document types. ## Installation The simplest runtime is `mlx-vlm` on an Apple Silicon Mac: ```bash python3 -m pip install -U mlx-vlm huggingface_hub ``` For a clean environment, use a virtual environment instead of installing packages into the system Python: ```bash python3 -m venv .venv source .venv/bin/activate python -m pip install -U pip mlx-vlm huggingface_hub ``` MLX requires Apple Silicon. CUDA, ROCm and ordinary x86 CPU inference are not the target runtime for this repository. ## Download Replace `YOUR_HF_USERNAME` with the account or organization that publishes this repository: ```bash hf download YOUR_HF_USERNAME/OvisOCR2-MLX-BF16 \ --local-dir ./OvisOCR2-MLX-BF16 ``` The repository should contain the extracted MLX model files at its root. Do not put the model inside another nes...
Source context: 72 downloads · 0 likes · Pipeline image-text-to-text · Library mlx · Repo st0722/OvisOCR2-MLX-BF16