Image-Text-to-Text
MLX
Safetensors
unlimited-ocr
ax-engine
mlx-vlm
ocr
mxfp8
int8
apple-silicon
automatosx
conversational
8-bit precision
Instructions to use AutomatosX/AX-Unlimited-OCR-3B-MoE-MLX-MXFP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use AutomatosX/AX-Unlimited-OCR-3B-MoE-MLX-MXFP8 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("AutomatosX/AX-Unlimited-OCR-3B-MoE-MLX-MXFP8") config = load_config("AutomatosX/AX-Unlimited-OCR-3B-MoE-MLX-MXFP8") # 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
File size: 3,337 Bytes
fd0c04f 6708e4d fd0c04f 6708e4d fd0c04f 6708e4d fd0c04f 6708e4d fd0c04f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | {
"vision_model": "bfloat16",
"projector": "bfloat16",
"language_model.model.embed_tokens": "mxfp8",
"language_model.model.norm": "bfloat16",
"language_model.lm_head": "affine8",
"language_model.model.layers.*.input_layernorm": "bfloat16",
"language_model.model.layers.*.post_attention_layernorm": "bfloat16",
"language_model.model.layers.*.self_attn.q_proj": "mxfp8",
"language_model.model.layers.*.self_attn.k_proj": "mxfp8",
"language_model.model.layers.*.self_attn.v_proj": "mxfp8",
"language_model.model.layers.*.self_attn.o_proj": "mxfp8",
"language_model.model.layers.*.mlp.gate_proj": "mxfp8",
"language_model.model.layers.*.mlp.up_proj": "mxfp8",
"language_model.model.layers.*.mlp.down_proj": "mxfp8",
"language_model.model.layers.*.mlp.shared_experts.gate_proj": "mxfp8",
"language_model.model.layers.*.mlp.shared_experts.up_proj": "mxfp8",
"language_model.model.layers.*.mlp.shared_experts.down_proj": "mxfp8",
"language_model.model.layers.*.mlp.switch_mlp.gate_proj": "mxfp8",
"language_model.model.layers.*.mlp.switch_mlp.up_proj": "mxfp8",
"language_model.model.layers.*.mlp.switch_mlp.down_proj": "mxfp8",
"language_model.model.layers.*.mlp.gate": "bfloat16",
"sam_model": "bfloat16",
"_generated_from": {
"source_model": "baidu/Unlimited-OCR",
"thresholds": {
"cer_delta": 0.02,
"digit_cer_delta": 0.02,
"table_score_degradation": 0.01
},
"decisions": {
"vision_encoder": {
"precision": "bfloat16",
"reasons": [
"cer_delta=2.272233",
"digit_cer_delta=1.696454",
"table_score_degradation=1.000000",
"protected OCR-critical group"
]
},
"vision_projector": {
"precision": "bfloat16",
"reasons": [
"protected unless all measured quality deltas are non-degrading"
]
},
"token_embeddings": {
"precision": "mxfp8",
"reasons": [
"all measured quality deltas were non-degrading"
]
},
"attention_q_proj": {
"precision": "base-map",
"reasons": [
"within thresholds"
]
},
"attention_k_proj": {
"precision": "base-map",
"reasons": [
"within thresholds"
]
},
"attention_v_proj": {
"precision": "base-map",
"reasons": [
"within thresholds"
]
},
"attention_o_proj": {
"precision": "base-map",
"reasons": [
"within thresholds"
]
},
"dense_mlp": {
"precision": "base-map",
"reasons": [
"within thresholds"
]
},
"shared_experts": {
"precision": "base-map",
"reasons": [
"within thresholds"
]
},
"routed_experts": {
"precision": "base-map",
"reasons": [
"within thresholds"
]
},
"lm_head": {
"precision": "affine8",
"reasons": [
"selected by joint quality/throughput calibration: affine8-head"
]
}
},
"calibration": {
"selected": {
"label": "affine8-head",
"precision": "affine8"
},
"selection_policy": "fastest candidate passing existing quality and throughput limits"
}
}
}
|