Image-Text-to-Text
MLX
Core ML
apple
ocr
document-parsing
multi-page
deepseek-ocr
Mixture of Experts
fluidinference
Instructions to use FluidInference/unlimited-ocr-mlx-coreml with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use FluidInference/unlimited-ocr-mlx-coreml 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("FluidInference/unlimited-ocr-mlx-coreml") config = load_config("FluidInference/unlimited-ocr-mlx-coreml") # 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
- Atomic Chat
MLX text decoder (8-bit affine g64, decoder only; page encoder stays Core ML): ~5x faster decode
Browse files- mlx/config.json +22 -0
- mlx/decoder.safetensors +3 -0
mlx/config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model": "baidu/Unlimited-OCR",
|
| 3 |
+
"format": "mlx",
|
| 4 |
+
"quantization": {
|
| 5 |
+
"group_size": 64,
|
| 6 |
+
"bits": 8,
|
| 7 |
+
"mode": "affine"
|
| 8 |
+
},
|
| 9 |
+
"hidden_size": 1280,
|
| 10 |
+
"layers": 12,
|
| 11 |
+
"heads": 10,
|
| 12 |
+
"head_dim": 128,
|
| 13 |
+
"experts": 64,
|
| 14 |
+
"experts_per_token": 6,
|
| 15 |
+
"moe_intermediate": 896,
|
| 16 |
+
"shared_intermediate": 1792,
|
| 17 |
+
"dense_intermediate": 6848,
|
| 18 |
+
"first_dense_layers": 1,
|
| 19 |
+
"vocab_size": 129280,
|
| 20 |
+
"rms_norm_eps": 1e-06,
|
| 21 |
+
"rope_theta": 10000.0
|
| 22 |
+
}
|
mlx/decoder.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:155e9ff5f5e89969ac43f5e3b6efa10961eeaa23cfd46efdc0dd52b29115aad3
|
| 3 |
+
size 3119076803
|