Image-Text-to-Text
MLX
Safetensors
multilingual
internvl_chat
vision-language
ocr
document-intelligence
qianfan
apple-silicon
custom_code
Eval Results
4-bit precision
Instructions to use jason1966/Qianfan-OCR-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use jason1966/Qianfan-OCR-MLX-4bit 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("jason1966/Qianfan-OCR-MLX-4bit") config = load_config("jason1966/Qianfan-OCR-MLX-4bit") # 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
Upload video_preprocessor_config.json with huggingface_hub
Browse files
video_preprocessor_config.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_valid_kwargs_names": [
|
| 3 |
+
"do_convert_rgb",
|
| 4 |
+
"do_resize",
|
| 5 |
+
"size",
|
| 6 |
+
"size_divisor",
|
| 7 |
+
"default_to_square",
|
| 8 |
+
"resample",
|
| 9 |
+
"do_rescale",
|
| 10 |
+
"rescale_factor",
|
| 11 |
+
"do_normalize",
|
| 12 |
+
"image_mean",
|
| 13 |
+
"image_std",
|
| 14 |
+
"do_pad",
|
| 15 |
+
"do_center_crop",
|
| 16 |
+
"crop_size",
|
| 17 |
+
"data_format",
|
| 18 |
+
"input_data_format",
|
| 19 |
+
"device"
|
| 20 |
+
],
|
| 21 |
+
"crop_size": null,
|
| 22 |
+
"data_format": "channels_first",
|
| 23 |
+
"default_to_square": true,
|
| 24 |
+
"device": null,
|
| 25 |
+
"do_center_crop": null,
|
| 26 |
+
"do_convert_rgb": true,
|
| 27 |
+
"do_normalize": true,
|
| 28 |
+
"do_pad": null,
|
| 29 |
+
"do_rescale": true,
|
| 30 |
+
"do_resize": true,
|
| 31 |
+
"image_mean": [
|
| 32 |
+
0.48145466,
|
| 33 |
+
0.4578275,
|
| 34 |
+
0.40821073
|
| 35 |
+
],
|
| 36 |
+
"image_std": [
|
| 37 |
+
0.26862954,
|
| 38 |
+
0.26130258,
|
| 39 |
+
0.27577711
|
| 40 |
+
],
|
| 41 |
+
"input_data_format": null,
|
| 42 |
+
"model_valid_processing_keys": [
|
| 43 |
+
"do_convert_rgb",
|
| 44 |
+
"do_resize",
|
| 45 |
+
"size",
|
| 46 |
+
"size_divisor",
|
| 47 |
+
"default_to_square",
|
| 48 |
+
"resample",
|
| 49 |
+
"do_rescale",
|
| 50 |
+
"rescale_factor",
|
| 51 |
+
"do_normalize",
|
| 52 |
+
"image_mean",
|
| 53 |
+
"image_std",
|
| 54 |
+
"do_pad",
|
| 55 |
+
"do_center_crop",
|
| 56 |
+
"crop_size",
|
| 57 |
+
"data_format",
|
| 58 |
+
"input_data_format",
|
| 59 |
+
"device"
|
| 60 |
+
],
|
| 61 |
+
"processor_class": "InternVLProcessor",
|
| 62 |
+
"resample": 3,
|
| 63 |
+
"rescale_factor": 0.00392156862745098,
|
| 64 |
+
"size": {
|
| 65 |
+
"height": 384,
|
| 66 |
+
"width": 384
|
| 67 |
+
},
|
| 68 |
+
"size_divisor": null,
|
| 69 |
+
"video_processor_type": "InternVLVideoProcessor"
|
| 70 |
+
}
|