fount-vlm-nell-02 0.3.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fount_vlm_nell_02-0.3.11.dist-info/METADATA +418 -0
- fount_vlm_nell_02-0.3.11.dist-info/RECORD +258 -0
- fount_vlm_nell_02-0.3.11.dist-info/WHEEL +5 -0
- fount_vlm_nell_02-0.3.11.dist-info/entry_points.txt +5 -0
- fount_vlm_nell_02-0.3.11.dist-info/licenses/LICENSE +21 -0
- fount_vlm_nell_02-0.3.11.dist-info/top_level.txt +1 -0
- mlx_vlm/__init__.py +16 -0
- mlx_vlm/__main__.py +24 -0
- mlx_vlm/chat.py +234 -0
- mlx_vlm/chat_ui.py +508 -0
- mlx_vlm/convert.py +284 -0
- mlx_vlm/deprecation.py +52 -0
- mlx_vlm/evals/__init__.py +0 -0
- mlx_vlm/evals/math_vista.py +565 -0
- mlx_vlm/evals/mmmu.py +528 -0
- mlx_vlm/evals/mmstar.py +343 -0
- mlx_vlm/evals/ocrbench.py +453 -0
- mlx_vlm/evals/utils.py +37 -0
- mlx_vlm/generate.py +1457 -0
- mlx_vlm/lora.py +207 -0
- mlx_vlm/models/__init__.py +0 -0
- mlx_vlm/models/aya_vision/__init__.py +2 -0
- mlx_vlm/models/aya_vision/aya_vision.py +188 -0
- mlx_vlm/models/aya_vision/config.py +52 -0
- mlx_vlm/models/aya_vision/language.py +202 -0
- mlx_vlm/models/aya_vision/vision.py +340 -0
- mlx_vlm/models/base.py +356 -0
- mlx_vlm/models/cache.py +238 -0
- mlx_vlm/models/deepseek_vl_v2/__init__.py +2 -0
- mlx_vlm/models/deepseek_vl_v2/config.py +159 -0
- mlx_vlm/models/deepseek_vl_v2/conversation.py +264 -0
- mlx_vlm/models/deepseek_vl_v2/deepseek_vl_v2.py +418 -0
- mlx_vlm/models/deepseek_vl_v2/language.py +539 -0
- mlx_vlm/models/deepseek_vl_v2/processing_deepsek_vl_v2.py +536 -0
- mlx_vlm/models/deepseek_vl_v2/vision.py +322 -0
- mlx_vlm/models/deepseekocr/__init__.py +2 -0
- mlx_vlm/models/deepseekocr/config.py +173 -0
- mlx_vlm/models/deepseekocr/conversation.py +264 -0
- mlx_vlm/models/deepseekocr/deepseekocr.py +371 -0
- mlx_vlm/models/deepseekocr/language.py +547 -0
- mlx_vlm/models/deepseekocr/processing_deepseekocr.py +655 -0
- mlx_vlm/models/deepseekocr/sam.py +489 -0
- mlx_vlm/models/deepseekocr/vision.py +263 -0
- mlx_vlm/models/deepseekocr_2/__init__.py +12 -0
- mlx_vlm/models/deepseekocr_2/config.py +216 -0
- mlx_vlm/models/deepseekocr_2/deepseekocr_2.py +297 -0
- mlx_vlm/models/deepseekocr_2/processing_deepseekocr.py +624 -0
- mlx_vlm/models/deepseekocr_2/vision.py +439 -0
- mlx_vlm/models/ernie4_5_moe_vl/__init__.py +5 -0
- mlx_vlm/models/ernie4_5_moe_vl/config.py +139 -0
- mlx_vlm/models/ernie4_5_moe_vl/ernie4_5_moe_vl.py +337 -0
- mlx_vlm/models/ernie4_5_moe_vl/language.py +770 -0
- mlx_vlm/models/ernie4_5_moe_vl/processor.py +686 -0
- mlx_vlm/models/ernie4_5_moe_vl/vision.py +322 -0
- mlx_vlm/models/fastvlm/__init__.py +2 -0
- mlx_vlm/models/fastvlm/config.py +79 -0
- mlx_vlm/models/fastvlm/fastvlm.py +198 -0
- mlx_vlm/models/fastvlm/language.py +49 -0
- mlx_vlm/models/fastvlm/vision.py +692 -0
- mlx_vlm/models/florence2/__init__.py +2 -0
- mlx_vlm/models/florence2/config.py +84 -0
- mlx_vlm/models/florence2/florence2.py +383 -0
- mlx_vlm/models/florence2/language.py +452 -0
- mlx_vlm/models/florence2/processing_florence2.py +30 -0
- mlx_vlm/models/florence2/vision.py +552 -0
- mlx_vlm/models/gemma3/__init__.py +2 -0
- mlx_vlm/models/gemma3/config.py +52 -0
- mlx_vlm/models/gemma3/gemma3.py +194 -0
- mlx_vlm/models/gemma3/language.py +293 -0
- mlx_vlm/models/gemma3/vision.py +215 -0
- mlx_vlm/models/gemma3n/__init__.py +2 -0
- mlx_vlm/models/gemma3n/audio.py +1038 -0
- mlx_vlm/models/gemma3n/config.py +130 -0
- mlx_vlm/models/gemma3n/gemma3n.py +322 -0
- mlx_vlm/models/gemma3n/language.py +631 -0
- mlx_vlm/models/gemma3n/vision.py +994 -0
- mlx_vlm/models/glm4v/__init__.py +3 -0
- mlx_vlm/models/glm4v/config.py +79 -0
- mlx_vlm/models/glm4v/glm4v.py +188 -0
- mlx_vlm/models/glm4v/language.py +574 -0
- mlx_vlm/models/glm4v/processing.py +220 -0
- mlx_vlm/models/glm4v/vision.py +406 -0
- mlx_vlm/models/glm4v_moe/__init__.py +3 -0
- mlx_vlm/models/glm4v_moe/config.py +81 -0
- mlx_vlm/models/glm4v_moe/glm4v_moe.py +176 -0
- mlx_vlm/models/glm4v_moe/language.py +674 -0
- mlx_vlm/models/glm4v_moe/processing.py +229 -0
- mlx_vlm/models/glm4v_moe/vision.py +405 -0
- mlx_vlm/models/glm_ocr/__init__.py +3 -0
- mlx_vlm/models/glm_ocr/config.py +93 -0
- mlx_vlm/models/glm_ocr/glm_ocr.py +180 -0
- mlx_vlm/models/glm_ocr/language.py +585 -0
- mlx_vlm/models/glm_ocr/processing.py +208 -0
- mlx_vlm/models/glm_ocr/vision.py +342 -0
- mlx_vlm/models/hunyuan_vl/__init__.py +7 -0
- mlx_vlm/models/hunyuan_vl/config.py +136 -0
- mlx_vlm/models/hunyuan_vl/hunyuan_vl.py +181 -0
- mlx_vlm/models/hunyuan_vl/language.py +509 -0
- mlx_vlm/models/hunyuan_vl/processing_hunyuan_vl.py +607 -0
- mlx_vlm/models/hunyuan_vl/vision.py +322 -0
- mlx_vlm/models/idefics2/__init__.py +2 -0
- mlx_vlm/models/idefics2/config.py +65 -0
- mlx_vlm/models/idefics2/idefics2.py +321 -0
- mlx_vlm/models/idefics2/language.py +161 -0
- mlx_vlm/models/idefics2/vision.py +244 -0
- mlx_vlm/models/idefics3/__init__.py +4 -0
- mlx_vlm/models/idefics3/config.py +54 -0
- mlx_vlm/models/idefics3/idefics3.py +221 -0
- mlx_vlm/models/idefics3/language.py +157 -0
- mlx_vlm/models/idefics3/vision.py +265 -0
- mlx_vlm/models/internvl_chat/__init__.py +3 -0
- mlx_vlm/models/internvl_chat/config.py +89 -0
- mlx_vlm/models/internvl_chat/internvl_chat.py +115 -0
- mlx_vlm/models/internvl_chat/language.py +187 -0
- mlx_vlm/models/internvl_chat/processor.py +395 -0
- mlx_vlm/models/internvl_chat/vision.py +265 -0
- mlx_vlm/models/interpolate.py +183 -0
- mlx_vlm/models/jina_vlm/__init__.py +3 -0
- mlx_vlm/models/jina_vlm/config.py +142 -0
- mlx_vlm/models/jina_vlm/image_processor.py +430 -0
- mlx_vlm/models/jina_vlm/jina_vlm.py +280 -0
- mlx_vlm/models/jina_vlm/language.py +272 -0
- mlx_vlm/models/jina_vlm/processing_jinavlm.py +266 -0
- mlx_vlm/models/jina_vlm/vision.py +202 -0
- mlx_vlm/models/kernels.py +447 -0
- mlx_vlm/models/kimi_vl/__init__.py +4 -0
- mlx_vlm/models/kimi_vl/config.py +84 -0
- mlx_vlm/models/kimi_vl/kimi_vl.py +127 -0
- mlx_vlm/models/kimi_vl/language.py +460 -0
- mlx_vlm/models/kimi_vl/processing_kimi_vl.py +560 -0
- mlx_vlm/models/kimi_vl/vision.py +485 -0
- mlx_vlm/models/lfm2_vl/__init__.py +2 -0
- mlx_vlm/models/lfm2_vl/config.py +94 -0
- mlx_vlm/models/lfm2_vl/language.py +49 -0
- mlx_vlm/models/lfm2_vl/lfm2_vl.py +223 -0
- mlx_vlm/models/lfm2_vl/processing_lfm2_vl.py +320 -0
- mlx_vlm/models/lfm2_vl/vision.py +223 -0
- mlx_vlm/models/llama4/__init__.py +2 -0
- mlx_vlm/models/llama4/config.py +83 -0
- mlx_vlm/models/llama4/language.py +334 -0
- mlx_vlm/models/llama4/llama4.py +146 -0
- mlx_vlm/models/llama4/vision.py +526 -0
- mlx_vlm/models/llava/__init__.py +2 -0
- mlx_vlm/models/llava/config.py +61 -0
- mlx_vlm/models/llava/language.py +200 -0
- mlx_vlm/models/llava/llava.py +132 -0
- mlx_vlm/models/llava/vision.py +233 -0
- mlx_vlm/models/llava_bunny/__init__.py +2 -0
- mlx_vlm/models/llava_bunny/config.py +85 -0
- mlx_vlm/models/llava_bunny/language.py +194 -0
- mlx_vlm/models/llava_bunny/llava_bunny.py +217 -0
- mlx_vlm/models/llava_bunny/vision.py +278 -0
- mlx_vlm/models/llava_next/__init__.py +2 -0
- mlx_vlm/models/llava_next/config.py +60 -0
- mlx_vlm/models/llava_next/language.py +192 -0
- mlx_vlm/models/llava_next/llava_next.py +138 -0
- mlx_vlm/models/llava_next/vision.py +217 -0
- mlx_vlm/models/mistral3/__init__.py +2 -0
- mlx_vlm/models/mistral3/config.py +59 -0
- mlx_vlm/models/mistral3/language.py +269 -0
- mlx_vlm/models/mistral3/mistral3.py +383 -0
- mlx_vlm/models/mllama/__init__.py +4 -0
- mlx_vlm/models/mllama/config.py +74 -0
- mlx_vlm/models/mllama/language.py +377 -0
- mlx_vlm/models/mllama/mllama.py +210 -0
- mlx_vlm/models/mllama/vision.py +458 -0
- mlx_vlm/models/molmo/__init__.py +5 -0
- mlx_vlm/models/molmo/config.py +93 -0
- mlx_vlm/models/molmo/language.py +208 -0
- mlx_vlm/models/molmo/molmo.py +108 -0
- mlx_vlm/models/molmo/processing_molmo.py +763 -0
- mlx_vlm/models/molmo/vision.py +408 -0
- mlx_vlm/models/molmo2/__init__.py +6 -0
- mlx_vlm/models/molmo2/config.py +137 -0
- mlx_vlm/models/molmo2/language.py +206 -0
- mlx_vlm/models/molmo2/molmo2.py +330 -0
- mlx_vlm/models/molmo2/processing.py +773 -0
- mlx_vlm/models/molmo2/vision.py +286 -0
- mlx_vlm/models/moondream2/__init__.py +11 -0
- mlx_vlm/models/moondream2/config.py +92 -0
- mlx_vlm/models/moondream2/image_crops.py +269 -0
- mlx_vlm/models/moondream2/language.py +267 -0
- mlx_vlm/models/moondream2/moondream2.py +522 -0
- mlx_vlm/models/moondream2/processing_moondream.py +144 -0
- mlx_vlm/models/moondream2/vision.py +200 -0
- mlx_vlm/models/multi_modality/__init__.py +4 -0
- mlx_vlm/models/multi_modality/config.py +108 -0
- mlx_vlm/models/multi_modality/language.py +191 -0
- mlx_vlm/models/multi_modality/multi_modality.py +338 -0
- mlx_vlm/models/multi_modality/sam.py +543 -0
- mlx_vlm/models/multi_modality/vision.py +450 -0
- mlx_vlm/models/paddleocr_vl/__init__.py +3 -0
- mlx_vlm/models/paddleocr_vl/config.py +93 -0
- mlx_vlm/models/paddleocr_vl/language.py +522 -0
- mlx_vlm/models/paddleocr_vl/paddleocr_vl.py +207 -0
- mlx_vlm/models/paddleocr_vl/processing_paddleocr_vl.py +425 -0
- mlx_vlm/models/paddleocr_vl/vision.py +358 -0
- mlx_vlm/models/paligemma/__init__.py +4 -0
- mlx_vlm/models/paligemma/config.py +50 -0
- mlx_vlm/models/paligemma/language.py +253 -0
- mlx_vlm/models/paligemma/paligemma.py +140 -0
- mlx_vlm/models/paligemma/vision.py +218 -0
- mlx_vlm/models/phi3_v/__init__.py +5 -0
- mlx_vlm/models/phi3_v/config.py +55 -0
- mlx_vlm/models/phi3_v/language.py +2 -0
- mlx_vlm/models/phi3_v/phi3_v.py +239 -0
- mlx_vlm/models/phi3_v/processing_phi3_v.py +704 -0
- mlx_vlm/models/phi3_v/vision.py +294 -0
- mlx_vlm/models/pixtral/__init__.py +4 -0
- mlx_vlm/models/pixtral/config.py +69 -0
- mlx_vlm/models/pixtral/language.py +195 -0
- mlx_vlm/models/pixtral/pixtral.py +208 -0
- mlx_vlm/models/pixtral/vision.py +293 -0
- mlx_vlm/models/qwen2_5_vl/__init__.py +2 -0
- mlx_vlm/models/qwen2_5_vl/config.py +90 -0
- mlx_vlm/models/qwen2_5_vl/language.py +541 -0
- mlx_vlm/models/qwen2_5_vl/qwen2_5_vl.py +184 -0
- mlx_vlm/models/qwen2_5_vl/vision.py +414 -0
- mlx_vlm/models/qwen2_vl/__init__.py +2 -0
- mlx_vlm/models/qwen2_vl/config.py +86 -0
- mlx_vlm/models/qwen2_vl/language.py +539 -0
- mlx_vlm/models/qwen2_vl/qwen2_vl.py +180 -0
- mlx_vlm/models/qwen2_vl/vision.py +308 -0
- mlx_vlm/models/qwen3_omni_moe/__init__.py +29 -0
- mlx_vlm/models/qwen3_omni_moe/audio.py +317 -0
- mlx_vlm/models/qwen3_omni_moe/code2wav.py +542 -0
- mlx_vlm/models/qwen3_omni_moe/config.py +264 -0
- mlx_vlm/models/qwen3_omni_moe/language.py +622 -0
- mlx_vlm/models/qwen3_omni_moe/omni_utils.py +69 -0
- mlx_vlm/models/qwen3_omni_moe/qwen3_omni_moe.py +706 -0
- mlx_vlm/models/qwen3_omni_moe/talker.py +873 -0
- mlx_vlm/models/qwen3_omni_moe/thinker.py +366 -0
- mlx_vlm/models/qwen3_omni_moe/vision.py +419 -0
- mlx_vlm/models/qwen3_vl/__init__.py +2 -0
- mlx_vlm/models/qwen3_vl/config.py +103 -0
- mlx_vlm/models/qwen3_vl/language.py +596 -0
- mlx_vlm/models/qwen3_vl/qwen3_vl.py +166 -0
- mlx_vlm/models/qwen3_vl/vision.py +441 -0
- mlx_vlm/models/qwen3_vl_moe/__init__.py +2 -0
- mlx_vlm/models/qwen3_vl_moe/config.py +108 -0
- mlx_vlm/models/qwen3_vl_moe/language.py +656 -0
- mlx_vlm/models/qwen3_vl_moe/qwen3_vl_moe.py +184 -0
- mlx_vlm/models/qwen3_vl_moe/vision.py +442 -0
- mlx_vlm/models/smolvlm/__init__.py +4 -0
- mlx_vlm/models/smolvlm/config.py +59 -0
- mlx_vlm/models/smolvlm/smolvlm.py +60 -0
- mlx_vlm/prompt_utils.py +565 -0
- mlx_vlm/sample_utils.py +39 -0
- mlx_vlm/server.py +1107 -0
- mlx_vlm/smolvlm_video_generate.py +109 -0
- mlx_vlm/tokenizer_utils.py +371 -0
- mlx_vlm/trainer/__init__.py +9 -0
- mlx_vlm/trainer/lora.py +70 -0
- mlx_vlm/trainer/trainer.py +299 -0
- mlx_vlm/trainer/utils.py +160 -0
- mlx_vlm/utils.py +1339 -0
- mlx_vlm/version.py +1 -0
- mlx_vlm/video_generate.py +611 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
fount_vlm_nell_02-0.3.11.dist-info/licenses/LICENSE,sha256=90xEh0a-M3bife5D4r6eydVfSCDNdGbGA6bH0f0tJbg,1069
|
|
2
|
+
mlx_vlm/__init__.py,sha256=cWrZBTf0J1YfhElEe7E9Su05O1XlvY0i2cx9o8UVak4,385
|
|
3
|
+
mlx_vlm/__main__.py,sha256=K2jUBwN5yYfz2FAxyTplugCKCz4tz8DNxb4VBUXSbZQ,620
|
|
4
|
+
mlx_vlm/chat.py,sha256=j4oKHwLY4Q0219FFx7pME-9jIIeqe-RD66mGZdocK9E,7938
|
|
5
|
+
mlx_vlm/chat_ui.py,sha256=XLC9fer-jZoRtoUBVpkxK8_BIrl60buejPVkEfSV8QY,16303
|
|
6
|
+
mlx_vlm/convert.py,sha256=qVpG3Y7IQomRfQ0z7t78x4V-nMLFueavD4atajUuoKU,8154
|
|
7
|
+
mlx_vlm/deprecation.py,sha256=FKutUoCobvnhpIcpXVA0hFu55YuakWV122aGvdYloxY,1255
|
|
8
|
+
mlx_vlm/generate.py,sha256=V1JlYHsDHRMX_VtM_dhneEUwlKEWevne_H_aeIGElaM,51019
|
|
9
|
+
mlx_vlm/lora.py,sha256=ANC6PPL84YQ18c0zcpJYWLike0zuenhwJyf7enpXcOI,6662
|
|
10
|
+
mlx_vlm/prompt_utils.py,sha256=qJCTyTOxFsitcMjZ6Nt8l8FG7cBhOKAAl9wbZ68fS10,19490
|
|
11
|
+
mlx_vlm/sample_utils.py,sha256=Q_PT7wbq-pHostpUgmhCm-WcsvZ_sWHKMq-Owy3XUT8,1354
|
|
12
|
+
mlx_vlm/server.py,sha256=UKY7R185ShZkecEeiuUcX9DFZv159ka6p-RsaS2_WCU,40013
|
|
13
|
+
mlx_vlm/smolvlm_video_generate.py,sha256=QtY18SbjfsDAgQwx2qA6erX9xHbefamZxGxmAxhpW8A,2923
|
|
14
|
+
mlx_vlm/tokenizer_utils.py,sha256=Q9JvcS6dIQA_VwZQY6xWal_IVthcu-6VnClA1SYOMNw,11971
|
|
15
|
+
mlx_vlm/utils.py,sha256=fIZ7L3OLQvoMhNWgATDMLs84FBgfeNXVowZzzdSLrSg,47409
|
|
16
|
+
mlx_vlm/version.py,sha256=TESjMH0a_iUkwdfWT4nyzKizSFmmCY2omxnS2XyT97Y,23
|
|
17
|
+
mlx_vlm/video_generate.py,sha256=gTV0UOSHatLf9SV1brBlpmd4bWmD4-KjtyMxj5p2Cvw,21271
|
|
18
|
+
mlx_vlm/evals/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
+
mlx_vlm/evals/math_vista.py,sha256=wd6kBanGZL7rghOgp-fcw5s_Ec0zYlQRxxzkVfUK_MY,18956
|
|
20
|
+
mlx_vlm/evals/mmmu.py,sha256=MxFIEbvVqYMND8w7zDQIYdF8x2kRG9RSdoKEHdunhwk,16998
|
|
21
|
+
mlx_vlm/evals/mmstar.py,sha256=WZqmtQ-UmEICWq5pLu8XtKxcH9CBp55ywv2u_F5hWtw,10796
|
|
22
|
+
mlx_vlm/evals/ocrbench.py,sha256=T7xMB3TkgqAcY6nX4AyKF2h1bUDKIGk1vaUvFGcfKkk,13996
|
|
23
|
+
mlx_vlm/evals/utils.py,sha256=SYOMT_VIjvvo-yWx7Mm5yAccAB-xxd_m8O09PSmoGaQ,785
|
|
24
|
+
mlx_vlm/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
+
mlx_vlm/models/base.py,sha256=RpMH_f7Y69MeJoYjDXNeu_W7WdZPaDJMtOZ5bPWzT9w,11204
|
|
26
|
+
mlx_vlm/models/cache.py,sha256=65bYyECLHpwwuwS_Qg_TLC8R_ljq1QtVv15lVImzog8,7491
|
|
27
|
+
mlx_vlm/models/interpolate.py,sha256=XU8_X43Z3b1yUMx3TSpMN74gxXmMFzsshSpxh8UGvlE,7069
|
|
28
|
+
mlx_vlm/models/kernels.py,sha256=EbvJwxZBLotU20z2kj7fb4Ff31fCLjl1HUUoWce8D0Y,14475
|
|
29
|
+
mlx_vlm/models/aya_vision/__init__.py,sha256=vaUzNK9BO8cL68tztHmTruTqcewlcSj9KjNIQGVa0ys,116
|
|
30
|
+
mlx_vlm/models/aya_vision/aya_vision.py,sha256=Xbvu47iNw09VYHeEsiezvfT-x5YecoOzOrj2yoSj56s,6981
|
|
31
|
+
mlx_vlm/models/aya_vision/config.py,sha256=FllLp7M66HXVLZKwxWqrQEOpYdIF1ahwR81gJQNdvNU,1395
|
|
32
|
+
mlx_vlm/models/aya_vision/language.py,sha256=65q_kbC2XXCe-VmXpxBpH9EXttNTDZY7GCQuw-bLbz4,6574
|
|
33
|
+
mlx_vlm/models/aya_vision/vision.py,sha256=wRR8y1II9VzuoJY5OIQV76uHyHk8QB6G1Zynomqorz8,11973
|
|
34
|
+
mlx_vlm/models/deepseek_vl_v2/__init__.py,sha256=rC6ABR367OdEkSdunruVrA35RgPRLPpKgTqwhWPkOxA,171
|
|
35
|
+
mlx_vlm/models/deepseek_vl_v2/config.py,sha256=G8RPOJG6JQqvg32VrZ9wQofoo5cjJTmUjfI4lmMvSj8,4311
|
|
36
|
+
mlx_vlm/models/deepseek_vl_v2/conversation.py,sha256=H6-RV9A8wy8ea7TgM_G_DcCamYYRT1-X8TETbtgEXD4,8230
|
|
37
|
+
mlx_vlm/models/deepseek_vl_v2/deepseek_vl_v2.py,sha256=ugHhIwss6SndTIA9QiJ49RIWKLu69GOuaB-4rsA-ItM,16456
|
|
38
|
+
mlx_vlm/models/deepseek_vl_v2/language.py,sha256=VIMgK6nRXb28erToS4OSP5MPAjc9ipAIjgCM4ZI4W0A,18932
|
|
39
|
+
mlx_vlm/models/deepseek_vl_v2/processing_deepsek_vl_v2.py,sha256=6hwT2_l_OwCecRBYsnmxnDyaCBBCdL1MNzr2kptkq8o,19119
|
|
40
|
+
mlx_vlm/models/deepseek_vl_v2/vision.py,sha256=C9BtRBDVyQs_P19GG8Fu0plXjRRIV4J6rp56RtdycHE,10236
|
|
41
|
+
mlx_vlm/models/deepseekocr/__init__.py,sha256=_G_TASA9EIvYAjlZoFYusS2HisdkDuf213I-RQDNkJ4,167
|
|
42
|
+
mlx_vlm/models/deepseekocr/config.py,sha256=70Dr1fqws8Llp7rQrr46cZ7Bd-nVeCFe08jM76DaLzQ,4728
|
|
43
|
+
mlx_vlm/models/deepseekocr/conversation.py,sha256=H6-RV9A8wy8ea7TgM_G_DcCamYYRT1-X8TETbtgEXD4,8230
|
|
44
|
+
mlx_vlm/models/deepseekocr/deepseekocr.py,sha256=avnQHUAUpKVWe4IcJaiiNajlMYvSBbn4JDIl5ny2Ib0,14146
|
|
45
|
+
mlx_vlm/models/deepseekocr/language.py,sha256=AT5PnkWWXtJJFnSy_nzCenutMrj4zk7h9uiU7V9J2vw,19403
|
|
46
|
+
mlx_vlm/models/deepseekocr/processing_deepseekocr.py,sha256=gWlYENYeG7j22w4gM6wf6e1mUG0Cnv_nerMg_HY9niU,22534
|
|
47
|
+
mlx_vlm/models/deepseekocr/sam.py,sha256=hDJdX4MfYgbnoySQVcQLBlqOEpO0ELjZSpGRbR8u3pc,16752
|
|
48
|
+
mlx_vlm/models/deepseekocr/vision.py,sha256=0TFyfw9ohOnOsl3zT2zRkeyNxxw8ijDpHiJkzibVRSg,8708
|
|
49
|
+
mlx_vlm/models/deepseekocr_2/__init__.py,sha256=m5izggi5zbO973eIwHI3koD5-W7FImXaaZ0p5ZwW4G4,341
|
|
50
|
+
mlx_vlm/models/deepseekocr_2/config.py,sha256=_jynADCD088-cSvTbSpzAcZJ8x6aJi-FfDsAIuLlE6o,6041
|
|
51
|
+
mlx_vlm/models/deepseekocr_2/deepseekocr_2.py,sha256=nQwIKsRck8AdVfRfDzUMs9FssCn4KXb-mnW8XUHrhqM,11671
|
|
52
|
+
mlx_vlm/models/deepseekocr_2/processing_deepseekocr.py,sha256=PBzLH_8I-1v3eNNwysmyaITBw0k2NPXNPFTO0-L-nuo,21771
|
|
53
|
+
mlx_vlm/models/deepseekocr_2/vision.py,sha256=5jkDUr6q05xzHQX5CNTwpOpEz7vpdRUAUuOSDN7NaYE,15811
|
|
54
|
+
mlx_vlm/models/ernie4_5_moe_vl/__init__.py,sha256=Y81etGmZqUssMTVlz2G2NiHGrVC_3nUxt_FFc4N886Q,277
|
|
55
|
+
mlx_vlm/models/ernie4_5_moe_vl/config.py,sha256=FfU8PyXs0KgXNygSyGq3b7ER4JaX8Z7RH2Pf-tb6jRw,5109
|
|
56
|
+
mlx_vlm/models/ernie4_5_moe_vl/ernie4_5_moe_vl.py,sha256=t_CUWXvRyW2rv3DJtWEoMh8PjWixGXMJVShB5B2iOG8,11465
|
|
57
|
+
mlx_vlm/models/ernie4_5_moe_vl/language.py,sha256=5h7dCP15IpjnrFMOHIGLKzGK3DQs29x6KHu6LdDBnZM,29335
|
|
58
|
+
mlx_vlm/models/ernie4_5_moe_vl/processor.py,sha256=Vbaoq4hFNq2RoHMsvqZuKF0o6r6cj7v-1XQkj0ZzHAI,22823
|
|
59
|
+
mlx_vlm/models/ernie4_5_moe_vl/vision.py,sha256=lsJ9y32Ym70sVqVkqsoqHQ62HAKZt03hwHY5IgBkx6Y,10777
|
|
60
|
+
mlx_vlm/models/fastvlm/__init__.py,sha256=jI0XoXPt-9JcvZw2qGo-6UYiGlampCO6TyU1l9Au3FE,113
|
|
61
|
+
mlx_vlm/models/fastvlm/config.py,sha256=baapdYJwQzQPAi8v6CXK9RhHyoE3Wb4lZnGQCgEOn9Q,2349
|
|
62
|
+
mlx_vlm/models/fastvlm/fastvlm.py,sha256=juz0H2enm3xmYQkZcoueTJbVrHMKys1H62pmuU1AVhY,7458
|
|
63
|
+
mlx_vlm/models/fastvlm/language.py,sha256=g_zpzxlRUdtr0ILds6C0lZ4jWWOpVqEzcph5ovrIacU,1471
|
|
64
|
+
mlx_vlm/models/fastvlm/vision.py,sha256=7NRhG0cWVT_UWev6jw3c9iyf2tZhA9oDzr3okv-fVBc,20862
|
|
65
|
+
mlx_vlm/models/florence2/__init__.py,sha256=PkqLvsC6Kzexl3GqwjLsB-rsEK4HJvYtTZcE1HVj8fg,115
|
|
66
|
+
mlx_vlm/models/florence2/config.py,sha256=K9TeGSclwi8rZTxdDgvY1AUEugQOc2U9xl8r0QkJ0Qg,2804
|
|
67
|
+
mlx_vlm/models/florence2/florence2.py,sha256=kILXo_yjgeZMKf3c6EHJ_-04OnC5kbugv7QwZ_PGTMY,14421
|
|
68
|
+
mlx_vlm/models/florence2/language.py,sha256=uY7cQakvQDUhfnjWa6dkVB_hK_ki9bv0iQqHoXwcu9M,15878
|
|
69
|
+
mlx_vlm/models/florence2/processing_florence2.py,sha256=C2Yjw2GsbBKIGt1MBxV4dP3eMsu4V3dK6OT644925eM,1188
|
|
70
|
+
mlx_vlm/models/florence2/vision.py,sha256=TxylqLR0-gT8kvo3uBjTkds3ooiFx3r4tT01uY02hFY,15638
|
|
71
|
+
mlx_vlm/models/gemma3/__init__.py,sha256=I6Xg_mzkhsOUbhK7oFflhF7EVWbkkMT1T7WKW-Xi9m0,112
|
|
72
|
+
mlx_vlm/models/gemma3/config.py,sha256=dOH1oS1cM52XVBioBmLSDAQzHHZrGyyJg-obozxPIU4,1391
|
|
73
|
+
mlx_vlm/models/gemma3/gemma3.py,sha256=-3taMv99Pp_yuPkkavZNnYKbmkbFatCT33s3DKiZaZ0,7217
|
|
74
|
+
mlx_vlm/models/gemma3/language.py,sha256=e4T-_7YIxpQoABWb8EpU9POUI9f5nukUciFM3keGvPU,9679
|
|
75
|
+
mlx_vlm/models/gemma3/vision.py,sha256=iRvn0s9X6gOUZusN0G9TLaUZU5vJLeWOHwV3vOH4rwI,7145
|
|
76
|
+
mlx_vlm/models/gemma3n/__init__.py,sha256=iu_nBtI1gg6yS6jQqOV_eXHSdEBSttuaXcJh1plwQl0,138
|
|
77
|
+
mlx_vlm/models/gemma3n/audio.py,sha256=Izdck3yV_NPBB4w5VG8NKcjtlQWw2g3MQ38mdL-qxI0,42190
|
|
78
|
+
mlx_vlm/models/gemma3n/config.py,sha256=uBfaDwcF4TI5DmXg3jEQHRKr_NqopDZFA1dSneZOkLU,4016
|
|
79
|
+
mlx_vlm/models/gemma3n/gemma3n.py,sha256=AydaV2xclUvZ2w3Dt0ALa9VFiN1iS8ps4Tnn5kFNLZg,11811
|
|
80
|
+
mlx_vlm/models/gemma3n/language.py,sha256=HzUz3QwdGrWZK-RtVgqC6ick9PN7pKtHFFLohsVTxj8,21867
|
|
81
|
+
mlx_vlm/models/gemma3n/vision.py,sha256=vFAZ2WIRM8k_78fOyQhhFwaf_yVZ6FMZ2VfPYTEPBZ8,32076
|
|
82
|
+
mlx_vlm/models/glm4v/__init__.py,sha256=ssqdG3P3shCNsxkBcJz6RugU84SbbQwu82jr2MFrip0,151
|
|
83
|
+
mlx_vlm/models/glm4v/config.py,sha256=5MGF8qesdzeEDapDiVOIlJgQ9SUvI0VGLs-rZhseQLo,2287
|
|
84
|
+
mlx_vlm/models/glm4v/glm4v.py,sha256=joVLwIPNfyCcNSrFKjQwVVJwrOb5gQu10dok6Kc4L1s,6623
|
|
85
|
+
mlx_vlm/models/glm4v/language.py,sha256=1d3JEMJ1psl-2RHiUiQuJ-YY45FsnD1zzUHvjJdz1uM,22050
|
|
86
|
+
mlx_vlm/models/glm4v/processing.py,sha256=rQrlCFOzf72GHfnVhUqbTbHqGMsv7tMoJpJs63o_aOs,8197
|
|
87
|
+
mlx_vlm/models/glm4v/vision.py,sha256=kBGOqVL5WNWqKsrcC5iM1Td4E3fWq0JWCssuAr9VJOU,14854
|
|
88
|
+
mlx_vlm/models/glm4v_moe/__init__.py,sha256=LYLTZnfB_M9yB3g2e6bL6xlFutTzXXKIDATmkaI8xbw,158
|
|
89
|
+
mlx_vlm/models/glm4v_moe/config.py,sha256=LgT4uCxzWuLJMCnkKP0Bxv7Lzxqlbc_jMeDYvMYisjo,2158
|
|
90
|
+
mlx_vlm/models/glm4v_moe/glm4v_moe.py,sha256=50wlDDhx4SjN2Xi88Tu_ObU-vpETg71rwfkWW85e4f0,6243
|
|
91
|
+
mlx_vlm/models/glm4v_moe/language.py,sha256=BVSnXRKy-LfWxkZUzYvrHAvGwd2xpPcTWAhjNCbOIQ4,25797
|
|
92
|
+
mlx_vlm/models/glm4v_moe/processing.py,sha256=WttGNk1pONe6gMhi36gqdcRHpxv7k79FdP63obGOsz0,8474
|
|
93
|
+
mlx_vlm/models/glm4v_moe/vision.py,sha256=NQJGVtXXCuOFar8UWGDz-1i_MKC63W87__Ro1IhbZ0I,14871
|
|
94
|
+
mlx_vlm/models/glm_ocr/__init__.py,sha256=cGG2RMliFxE4LuB-zz2AYig2ScFqND8SYxMct_gU9jw,153
|
|
95
|
+
mlx_vlm/models/glm_ocr/config.py,sha256=ELAMiKYaQbNbXAZzKZVHscfrdpJHU_YZJCuWGNQyoeg,2864
|
|
96
|
+
mlx_vlm/models/glm_ocr/glm_ocr.py,sha256=VwVQV7mOT9-rEJtxtsNdhKLaNi7O4t2r3rnKfEOLUDw,6039
|
|
97
|
+
mlx_vlm/models/glm_ocr/language.py,sha256=OIX1JiBbFNIRhi9LmN3tdcT9nieppTTnS1YXd2Yjlq4,22234
|
|
98
|
+
mlx_vlm/models/glm_ocr/processing.py,sha256=1tf3--st1a9idtXcNROnsfX4QFZQvBaUrVyeK6TOMlw,7491
|
|
99
|
+
mlx_vlm/models/glm_ocr/vision.py,sha256=-kExbSqEzxuSIkLywoEeW5WmHZug-GLXOJ-SGkAx1pI,11995
|
|
100
|
+
mlx_vlm/models/hunyuan_vl/__init__.py,sha256=9PJHI0VF53OAue5UKLMmBU5d1QHjqUDGGCjH9NjeWAY,228
|
|
101
|
+
mlx_vlm/models/hunyuan_vl/config.py,sha256=wErOEA0Yz6igOYxLLHRqz71ZOhYC11Cevq95lXV4ALw,4275
|
|
102
|
+
mlx_vlm/models/hunyuan_vl/hunyuan_vl.py,sha256=6JP1bZAuXkRi0ERbMQzMk1PCvKzaHde5C9-H01MGkYw,6015
|
|
103
|
+
mlx_vlm/models/hunyuan_vl/language.py,sha256=dmMAe9OUglyQ7qS8VmW5ow4wIWuh4OwL3J78BEBPXY8,17228
|
|
104
|
+
mlx_vlm/models/hunyuan_vl/processing_hunyuan_vl.py,sha256=9t-cdowOblGQx8h9HGF1qz38sLHCkneJaGoO5Mfw0NA,21131
|
|
105
|
+
mlx_vlm/models/hunyuan_vl/vision.py,sha256=yVTmVALXcSUAG9zWrXpf76Fa0en2mXRo2fwZh-Zo7NM,10829
|
|
106
|
+
mlx_vlm/models/idefics2/__init__.py,sha256=gdnONAeU4FiBa7aZXYI8L6cNPeRqYqfAp6olkGOMXxU,131
|
|
107
|
+
mlx_vlm/models/idefics2/config.py,sha256=MVNxsIIAFd8K7UJuynzIcV0vUN4VByC62u69_kyN5TE,1732
|
|
108
|
+
mlx_vlm/models/idefics2/idefics2.py,sha256=TD7yB7t3vEzv6N3PBA8xnZkmtojrxmu_zR17xfCTzeU,11233
|
|
109
|
+
mlx_vlm/models/idefics2/language.py,sha256=Ez1YajXCh5G77lp0m3_p8435ETullFwl4OGXJAlhEF8,5250
|
|
110
|
+
mlx_vlm/models/idefics2/vision.py,sha256=P2VULXMyf2aBZ4DdW0-7umMPxqOo0Vf79bq3CtlVCQA,8340
|
|
111
|
+
mlx_vlm/models/idefics3/__init__.py,sha256=tcMpbYp-bkENu3M2HWVRY4_JFDw09jGcMQcSyIOrubs,154
|
|
112
|
+
mlx_vlm/models/idefics3/config.py,sha256=lfdl4Q8-BHTggsxFWBFbZVdFtH1Ds6GrmCspm-SCGQ4,1395
|
|
113
|
+
mlx_vlm/models/idefics3/idefics3.py,sha256=PMk_a03B-EGzjlVbmnT3spORbik61deN3S0NuPcs5Js,7627
|
|
114
|
+
mlx_vlm/models/idefics3/language.py,sha256=bCVSo6y5mu58FTJLPraaXkHFQ74SRnTh2x1rto1iHGc,5211
|
|
115
|
+
mlx_vlm/models/idefics3/vision.py,sha256=6TEJycWekRSoT19iLfBGEGTABxeFEdRqsnD54AaOp18,9581
|
|
116
|
+
mlx_vlm/models/internvl_chat/__init__.py,sha256=xE1P3ExxKx75ilTkNmrlts3gY-HY5fuSuQm9XZO4Pd8,188
|
|
117
|
+
mlx_vlm/models/internvl_chat/config.py,sha256=b4rs5RJIvEw0HVMOxetd7O0KCOMPisa7eL0S3Tp2z4w,2533
|
|
118
|
+
mlx_vlm/models/internvl_chat/internvl_chat.py,sha256=bCYn3_ZsjkQxrLHTzAibukPDv1602AGjn1dEzyl0fKs,3855
|
|
119
|
+
mlx_vlm/models/internvl_chat/language.py,sha256=_lZ6Dl6vLvoMp5Py69kmGf_Lm6pSet04a1reC3DEYLY,5887
|
|
120
|
+
mlx_vlm/models/internvl_chat/processor.py,sha256=i_Y67Pl31_vU-JGgZbgrh4XUHnqlhqRNjMtqBjc2UcU,14344
|
|
121
|
+
mlx_vlm/models/internvl_chat/vision.py,sha256=DfnWi2xXwldSJArlb7aQ14jjunOe59VCpZMWfTFNFuc,9036
|
|
122
|
+
mlx_vlm/models/jina_vlm/__init__.py,sha256=AZVtWxwLe5UZjRk2iImHLHoMd_YsRY7IPn0foXypm2A,176
|
|
123
|
+
mlx_vlm/models/jina_vlm/config.py,sha256=Rm24m_Hyjv-2LDZtewfprXsL_dBev_HgMXXHrmaAceo,5581
|
|
124
|
+
mlx_vlm/models/jina_vlm/image_processor.py,sha256=aJ4NqKqo3-b-AhNfjZYlsBOTG2s3iYs7P5U0pMLIozo,16069
|
|
125
|
+
mlx_vlm/models/jina_vlm/jina_vlm.py,sha256=Lij5fXH6VccFlNAHbgOKUSAtQTkIX_uV5zEhdTGDLq4,9975
|
|
126
|
+
mlx_vlm/models/jina_vlm/language.py,sha256=voJwmK4W1xoe8bREWrjV3HGTG75WYh0Pg2sQM9rnCb4,9435
|
|
127
|
+
mlx_vlm/models/jina_vlm/processing_jinavlm.py,sha256=gf2uDXBPgvAAgcucLf0_9P4PaA8ydSUe6rY85ulG2HU,9449
|
|
128
|
+
mlx_vlm/models/jina_vlm/vision.py,sha256=QkOC8FIMPueg9kgsSKYPPYSY_FVn2jnjldh7QriM-_U,6858
|
|
129
|
+
mlx_vlm/models/kimi_vl/__init__.py,sha256=3IaaIozJ8F4lbKT8n0mEdcVPWec9KuqoFzliuDwPVrM,245
|
|
130
|
+
mlx_vlm/models/kimi_vl/config.py,sha256=eE9r3d268NOBNeCeJZa1hWVzqvpVHT1ijyRqVCjiADQ,2522
|
|
131
|
+
mlx_vlm/models/kimi_vl/kimi_vl.py,sha256=9hLwzSNoDOC1URxdPF7Rb4scm0XiDiQU9yWsUVI2WTg,4159
|
|
132
|
+
mlx_vlm/models/kimi_vl/language.py,sha256=GeAGNn2KFb01TIOjPclG3l8ArGuVNiqvtdQmi67wEmc,15403
|
|
133
|
+
mlx_vlm/models/kimi_vl/processing_kimi_vl.py,sha256=wkaJioE4nvjpQEhBP94QqC2QSVEOrx9GuITLcQ2vS1k,20752
|
|
134
|
+
mlx_vlm/models/kimi_vl/vision.py,sha256=RMi9nMpKXegpEcZ59-TzaQKytr0yOdZmvVwzBi3lbZ4,17113
|
|
135
|
+
mlx_vlm/models/lfm2_vl/__init__.py,sha256=NQLFF528fO-ukZ2Ib4-H24nIy3d8bdN64ciK_rvHQwI,113
|
|
136
|
+
mlx_vlm/models/lfm2_vl/config.py,sha256=UH0HuCkuakJh3nK2cEgRRhpYxK8CYYTC_gyIs_8Y4Rc,2740
|
|
137
|
+
mlx_vlm/models/lfm2_vl/language.py,sha256=kP2Efes8UROMaw62zT6x4peQNSSXMxB_VBBPWHtKm6I,1345
|
|
138
|
+
mlx_vlm/models/lfm2_vl/lfm2_vl.py,sha256=VeCdfkaE3GbFxlbuRClbKvU7FCw-E8Cr85Syut-wXsM,7669
|
|
139
|
+
mlx_vlm/models/lfm2_vl/processing_lfm2_vl.py,sha256=Al-sXZ_zLDhvZkT3UApJz2PX4Az3o-27oJ7j5_Q5P_I,13598
|
|
140
|
+
mlx_vlm/models/lfm2_vl/vision.py,sha256=eQuWZAiCJT5VpTvjOmHBaC7G8l393Tx9oRhQ8US1hlc,7675
|
|
141
|
+
mlx_vlm/models/llama4/__init__.py,sha256=mLhnIECklbe_23Nf5vVKsZeN9LakBonzFf5bmsVbobM,112
|
|
142
|
+
mlx_vlm/models/llama4/config.py,sha256=bh7F0XZeUvMe1XojHDANzN11XJd3t3jI36zeY19g01c,2306
|
|
143
|
+
mlx_vlm/models/llama4/language.py,sha256=awwPJYATiKnGTySKdrmDZsB1yFWl40LQZMSw1-QtXkI,11423
|
|
144
|
+
mlx_vlm/models/llama4/llama4.py,sha256=5XZnPER5mSn9Wk-BdtWS7vrBe7C4YxTPH2c1rlC7gHI,4936
|
|
145
|
+
mlx_vlm/models/llama4/vision.py,sha256=qLpYm1mh3NjO8PioiTvkJjOukknb3_a4ylc4UBRNr2w,17669
|
|
146
|
+
mlx_vlm/models/llava/__init__.py,sha256=m-wJGJtjW5_505HGxX1xVcvPYVbEglX4P3BvCrC0I1E,111
|
|
147
|
+
mlx_vlm/models/llava/config.py,sha256=t-CFKHMehbkEkYA9cDr6Aar3Z-c0fhyj_J9lcfL6kJs,1855
|
|
148
|
+
mlx_vlm/models/llava/language.py,sha256=1RbiOvTZllHM6N1zUe7fMYMKa9BPkgBfCR1f0xVmk0g,6469
|
|
149
|
+
mlx_vlm/models/llava/llava.py,sha256=wTMycZLUh7dAjQTcl6CXFg8Y77SbEUzikaS7qUYtgNA,4813
|
|
150
|
+
mlx_vlm/models/llava/vision.py,sha256=8V9BXbMdE_VCFD3sfw7c74kCu20ZMiE11NmOMFQUjwM,7912
|
|
151
|
+
mlx_vlm/models/llava_bunny/__init__.py,sha256=QxnEW9hHNSusrwW06qK_xugfc5jQnWtFOuc3vmhvmo0,133
|
|
152
|
+
mlx_vlm/models/llava_bunny/config.py,sha256=Mbnv2vW1-eyOtKSlySoD9G03kd1SsxXPTrmvt184O6w,2578
|
|
153
|
+
mlx_vlm/models/llava_bunny/language.py,sha256=ZdgHyX43QTTcPEZzrT8wNizSTIPWJt8zrfupHATV3pM,6274
|
|
154
|
+
mlx_vlm/models/llava_bunny/llava_bunny.py,sha256=-xI7c_yF6TyuV1ONAz8WJGIapJfKsOOb_4Ma2CFClqE,7236
|
|
155
|
+
mlx_vlm/models/llava_bunny/vision.py,sha256=pVJspJWGXRp0_7p-u1aoXcpd1Ed-3kat20Tp6oW5oGU,9107
|
|
156
|
+
mlx_vlm/models/llava_next/__init__.py,sha256=rGTAyksHTPEXU1y_3SAnNA8lWb9JBaWxctlhLI8hDlQ,116
|
|
157
|
+
mlx_vlm/models/llava_next/config.py,sha256=o_dB9QqlxBUCGKFmmT9Y1h9pLgabWqcHvYn6j-b4pfg,1817
|
|
158
|
+
mlx_vlm/models/llava_next/language.py,sha256=cTuwz-YtuXcVpg0Xx7J35aUClq4TSIlxdx7fiBbetd8,6159
|
|
159
|
+
mlx_vlm/models/llava_next/llava_next.py,sha256=qVERwYQGqIDYXbYFQ6DCJaPr8lgJAKeVl_wPQ4lArzc,4948
|
|
160
|
+
mlx_vlm/models/llava_next/vision.py,sha256=tPSqm34lcaRRjrT0LhaNUp3jQtgUscSqp7-BDKWeQMU,7318
|
|
161
|
+
mlx_vlm/models/mistral3/__init__.py,sha256=AHShEvuR05FYhXIw8IKwU1G3CwE5zZ2by3MPDMf4SNM,114
|
|
162
|
+
mlx_vlm/models/mistral3/config.py,sha256=eAU1H-bftzsIwQjKFOoBJ9VkCwQca1fPrLbj-vh4sMs,1914
|
|
163
|
+
mlx_vlm/models/mistral3/language.py,sha256=937Tcfn74nuTf3VHkuAYzDlmCYVlSFDYx3Wu0apQM7k,8948
|
|
164
|
+
mlx_vlm/models/mistral3/mistral3.py,sha256=S2VnPWtocMRqyv4GFNthoTCtyx968ByCSnYzDq1agJA,13843
|
|
165
|
+
mlx_vlm/models/mllama/__init__.py,sha256=-hBu8OXd7EWe98fUjW7SIYHfJBhL1Cw3ydhk1YAdDvU,152
|
|
166
|
+
mlx_vlm/models/mllama/config.py,sha256=HLrkXilomSABDRXhJrIQac3Ws-RroIDsfIrWK-pK_wg,2083
|
|
167
|
+
mlx_vlm/models/mllama/language.py,sha256=coMm_DBYSNSriTAj1NYdkdJEIAYbUB3WjkpSiTb9tAI,13471
|
|
168
|
+
mlx_vlm/models/mllama/mllama.py,sha256=4RCpXfi1WUyrOL0Z_tBk0ctFlapX8vxyg7AgolSgsrA,7302
|
|
169
|
+
mlx_vlm/models/mllama/vision.py,sha256=DreQPSW0HxDXfAdB9FyZpBGq-am4I4fv8d5XA7VNyUA,16175
|
|
170
|
+
mlx_vlm/models/molmo/__init__.py,sha256=tLzHQQ_zIRopBhURfBvwQ1qh6zVvKbQHkvV3yh6l59A,217
|
|
171
|
+
mlx_vlm/models/molmo/config.py,sha256=8oiPGb5WlnP_Vqady1xjsVPgnTG3FbwijiiBPbb7Im8,3066
|
|
172
|
+
mlx_vlm/models/molmo/language.py,sha256=LNdQFMs-TDJWnl2UH-p0vLjNKq0ubPqwj6Gdu6JD9dc,6373
|
|
173
|
+
mlx_vlm/models/molmo/molmo.py,sha256=zkp9RsOqtJWE-TcO1SSzzNrglZpFLGQJlweUz7rTMVs,3648
|
|
174
|
+
mlx_vlm/models/molmo/processing_molmo.py,sha256=1Pq8MoCMiWSNi7R1BgfdJfT4-PcfCV_ASCP4E5F76hk,27107
|
|
175
|
+
mlx_vlm/models/molmo/vision.py,sha256=WcmCCNxjypUtiZ73yk09r9mKR2qWwRwMfH6fnQ-CQrE,14171
|
|
176
|
+
mlx_vlm/models/molmo2/__init__.py,sha256=e8rZyVWJ4jRh0r7r1efOdcWv7FaPWUcV1H2qN1DBfLo,294
|
|
177
|
+
mlx_vlm/models/molmo2/config.py,sha256=yABQd6AvkDUny9FT7JIm78TDhNIeuqy4r5MnBnM-nrE,4368
|
|
178
|
+
mlx_vlm/models/molmo2/language.py,sha256=FbHEiqVNU-8VagvLLSVRRH3o2GJkupoeXaFCa7uJ0O0,6713
|
|
179
|
+
mlx_vlm/models/molmo2/molmo2.py,sha256=zz-XajDSsdxwk1lNRsg3tcIFis2mi_lekEwSWfgeZnU,12202
|
|
180
|
+
mlx_vlm/models/molmo2/processing.py,sha256=bGKhGd2ZWdAJvftTBIp8fxhd3QdpUKwQWtHVQ4tdap8,26933
|
|
181
|
+
mlx_vlm/models/molmo2/vision.py,sha256=GAcLCnIyq-bfS5-x3ehSmaW_0lhmqyckQl35BaJHUQQ,10423
|
|
182
|
+
mlx_vlm/models/moondream2/__init__.py,sha256=-1PqBrNTOBncZAgDtb99J3o-SP2VSTsSfQbM7SIi8fY,369
|
|
183
|
+
mlx_vlm/models/moondream2/config.py,sha256=BWaenEe9HILFBixkQDAB9pC9DFhl9_bKfXsWk0XHNPQ,2975
|
|
184
|
+
mlx_vlm/models/moondream2/image_crops.py,sha256=85P567q2rxkMsTAyXLJVYpGvD2Xh1dHCyCrcqlOPN-Y,9234
|
|
185
|
+
mlx_vlm/models/moondream2/language.py,sha256=zcq1rxReWQbawxj5C2G_bA-wSD6uHeynL50LSx8AD0k,9536
|
|
186
|
+
mlx_vlm/models/moondream2/moondream2.py,sha256=kqmd7YstEMXATH49SDms8XJltxJh0AReXfIOcsic8zo,22154
|
|
187
|
+
mlx_vlm/models/moondream2/processing_moondream.py,sha256=vX0KSSqd6_c2eXsKBdG9B5UUPPE_2k88q0yNFEPfrSY,4626
|
|
188
|
+
mlx_vlm/models/moondream2/vision.py,sha256=yq7xu-14mTjv3-frOuuXbAU9UiSU-nckP_WvxaNtQVw,6492
|
|
189
|
+
mlx_vlm/models/multi_modality/__init__.py,sha256=IIpe23wAV9B6MUUPp8eSkuYl-eKbbEBGfPL8jlDqrkU,193
|
|
190
|
+
mlx_vlm/models/multi_modality/config.py,sha256=slQg6jdvnU2gBYQTV15ndSWi-YyiWHGEHNVvgy95lV4,2999
|
|
191
|
+
mlx_vlm/models/multi_modality/language.py,sha256=sEI1FOB7pheFCOJ7TuuTFCW_Uix6w6Dcu6IMxVvBpSw,6146
|
|
192
|
+
mlx_vlm/models/multi_modality/multi_modality.py,sha256=XaVmulkrr9_074EDpkUfv--Mro7MPPJVwi_vyBuWK5A,11491
|
|
193
|
+
mlx_vlm/models/multi_modality/sam.py,sha256=1m8BNNaV3DZDcjGLcjawxJmEMv1pwXAX_y4FFQmjuQg,18655
|
|
194
|
+
mlx_vlm/models/multi_modality/vision.py,sha256=-P56p2DulEV1hBJDLQO3Pl_LckcD1MFaxH6rVv_heb0,14969
|
|
195
|
+
mlx_vlm/models/paddleocr_vl/__init__.py,sha256=euX0VOoMSSRywCaa2iHmZy34kMR28vRUep8cbkctZ64,176
|
|
196
|
+
mlx_vlm/models/paddleocr_vl/config.py,sha256=dJAkFE3pmiDMZbIkY_EvV45A65dZ10LbOVzSFPkbckk,2834
|
|
197
|
+
mlx_vlm/models/paddleocr_vl/language.py,sha256=Efm9ez9KTuxS_gpJWTBhY8DBATSuLZbFDaqUDdvqLWA,20686
|
|
198
|
+
mlx_vlm/models/paddleocr_vl/paddleocr_vl.py,sha256=rB-Cb0-3_S_j7GRq96oSh8L8waOsnhucG2cz871kupc,7493
|
|
199
|
+
mlx_vlm/models/paddleocr_vl/processing_paddleocr_vl.py,sha256=0neEWbPSz3-WAb6uqjcTUwTZzl65RJw5AuoHq2Nwans,15760
|
|
200
|
+
mlx_vlm/models/paddleocr_vl/vision.py,sha256=cElEhKNKvdvGISl8yJFtTtOqlGwVqzU2aIYdLaPxeEM,12821
|
|
201
|
+
mlx_vlm/models/paligemma/__init__.py,sha256=TsBFRGsX6hqSjWEJqU68zCDvNmgMt0_jTSLCEdAdruw,155
|
|
202
|
+
mlx_vlm/models/paligemma/config.py,sha256=Cex81daLEkl2bxjIgSYvOowi5AY8mHHxNG5w3pqOyp0,1494
|
|
203
|
+
mlx_vlm/models/paligemma/language.py,sha256=5mc_N4Jv8kJW7jgmkYua-JT5LbSdCajm7rZKwK4n7C4,8574
|
|
204
|
+
mlx_vlm/models/paligemma/paligemma.py,sha256=fpoDIeww9PL6uG3QQiyKR_EC5dy-0vrGVBusa8muonc,5205
|
|
205
|
+
mlx_vlm/models/paligemma/vision.py,sha256=XlqeUUVRhRG_kXeIDkDyo38EjsUODEsrpI9SWWl57Hc,7223
|
|
206
|
+
mlx_vlm/models/phi3_v/__init__.py,sha256=4Fa5Ti1dL2jQ4UfxMd0DBZf15K5_M8nTuigxbVYfwZE,219
|
|
207
|
+
mlx_vlm/models/phi3_v/config.py,sha256=mCgHWpzVhwR7OeWDU75hxKDoFfOGoBE7RqH-kajmk_g,1605
|
|
208
|
+
mlx_vlm/models/phi3_v/language.py,sha256=ZR0isY6_STaITY3yQPcPcEjPKCpzcQydLbKYCztXX3w,30
|
|
209
|
+
mlx_vlm/models/phi3_v/phi3_v.py,sha256=cb3dpn3IdLvDtVSmCYQN1xtaPhtT9PPBhYy4W_s1c7w,7872
|
|
210
|
+
mlx_vlm/models/phi3_v/processing_phi3_v.py,sha256=35I7tQFQmLvEbBSJJqvC_iilYS-4KSq9kaNfBT66q3Y,25262
|
|
211
|
+
mlx_vlm/models/phi3_v/vision.py,sha256=8mYlJ58wZod4Ii3A7UuvnmP7836KzKkwGpqZzoq0osM,10069
|
|
212
|
+
mlx_vlm/models/pixtral/__init__.py,sha256=o1TAmgZYj3qlDeUAYxYNh8wM0Fu1GlZAstaCD6mdG5I,153
|
|
213
|
+
mlx_vlm/models/pixtral/config.py,sha256=vUjt-PxZdjVxCyMNX4g3t1mMMf1WYZUEXI-6Evhzc08,2228
|
|
214
|
+
mlx_vlm/models/pixtral/language.py,sha256=Z8xR58-XXsTRjaoWVT-0rqYZ4MlPwKDBKE_YLchmbFQ,6228
|
|
215
|
+
mlx_vlm/models/pixtral/pixtral.py,sha256=QcByXIYkvHgT3OAiTmlfajnTXLx8CHgL4jQ-fS7jDYI,8144
|
|
216
|
+
mlx_vlm/models/pixtral/vision.py,sha256=nYBsbuapbwd4Vd1gzALb5nT4mgsizfa7upauwR6HMjY,9960
|
|
217
|
+
mlx_vlm/models/qwen2_5_vl/__init__.py,sha256=Gh9nT0rpEOQOGzNK3Cd80tt3_2mt9pGGoiSdmt34B1c,116
|
|
218
|
+
mlx_vlm/models/qwen2_5_vl/config.py,sha256=gqhuvL7uXsdf-CmaO5CQTuxgs4OmKwv5qjzp4lk27fU,2760
|
|
219
|
+
mlx_vlm/models/qwen2_5_vl/language.py,sha256=nT2ctMSxs7rd3pTw7TgVeuNGzLXpXLpfDl65IdcdaM4,21317
|
|
220
|
+
mlx_vlm/models/qwen2_5_vl/qwen2_5_vl.py,sha256=7Q7YwgZSfVIGQ7zSgEITLYdFjezxPfshK3hssVwxepE,6508
|
|
221
|
+
mlx_vlm/models/qwen2_5_vl/vision.py,sha256=8z0aZ5vpCIBfelBZuNsuGhHDuiSWNx460zQZUtaAnMo,14612
|
|
222
|
+
mlx_vlm/models/qwen2_vl/__init__.py,sha256=P1WUzaUZF27dXhvUTunDLt5Dz62SzWWYgdbTGAv5etw,114
|
|
223
|
+
mlx_vlm/models/qwen2_vl/config.py,sha256=LWykio-ptafzfdAH6MLgteoI7EGmcrDjNahKl3irjyQ,2563
|
|
224
|
+
mlx_vlm/models/qwen2_vl/language.py,sha256=TZkMV8jAe-kGDrBA4l2tFn02TWu7wuC9WVQp6Hoaw0o,21318
|
|
225
|
+
mlx_vlm/models/qwen2_vl/qwen2_vl.py,sha256=E3aXw3I-hrdW6MSP-U2BUzKxNcwzyQuEz6cPo6M9HGw,6289
|
|
226
|
+
mlx_vlm/models/qwen2_vl/vision.py,sha256=tDH3IACxEBgbyaGwwWQkIb8bVulY2H1e-3KbOINoye8,10506
|
|
227
|
+
mlx_vlm/models/qwen3_omni_moe/__init__.py,sha256=-tKBImJ0khP_PhYJbKERHXX6w1N-hDAvptxctCK9Oe8,558
|
|
228
|
+
mlx_vlm/models/qwen3_omni_moe/audio.py,sha256=LWMbpcDySLX7JzPUJZR0DOWResMz1NyKH0UjopZ58HY,11815
|
|
229
|
+
mlx_vlm/models/qwen3_omni_moe/code2wav.py,sha256=Io1lgwKxPMMfBQiN-d-fdgpgh4sztcYQY0Kt8GcnOeI,19958
|
|
230
|
+
mlx_vlm/models/qwen3_omni_moe/config.py,sha256=kevBsmM68YjY26XfOqjFkTclMG5xzEyd4mlxJP2gVKk,8442
|
|
231
|
+
mlx_vlm/models/qwen3_omni_moe/language.py,sha256=LdUxeH4nXDjLxI8xUTItQ1SqJAALtSZOUS_IUjpepng,23392
|
|
232
|
+
mlx_vlm/models/qwen3_omni_moe/omni_utils.py,sha256=GvRE46yY-CSakK2dU9Q3z0V_Dks8AVSNSiVLZx5nAbs,2022
|
|
233
|
+
mlx_vlm/models/qwen3_omni_moe/qwen3_omni_moe.py,sha256=neFPyKz88nJK0ZY1XJ4fv0cfwZUAwULGh6sj9IaG02k,25638
|
|
234
|
+
mlx_vlm/models/qwen3_omni_moe/talker.py,sha256=DnVGXaiDOWgYkUGcxPc0cfVIejqsXXr5zksuXz8yDX0,31593
|
|
235
|
+
mlx_vlm/models/qwen3_omni_moe/thinker.py,sha256=i_IcOII5WPrEscjuuEi7jkvlSaYXe8S5EO-6b3i8Fuk,15556
|
|
236
|
+
mlx_vlm/models/qwen3_omni_moe/vision.py,sha256=ItBriApJ6Vxl4vQXng_UIDEzxRSNlj5r_LgJAWWTR1Y,14339
|
|
237
|
+
mlx_vlm/models/qwen3_vl/__init__.py,sha256=67Fn4Tyi79PeNBdHSG8FY5EnzOrmkpjU8uA8iJg8Jo4,114
|
|
238
|
+
mlx_vlm/models/qwen3_vl/config.py,sha256=4m4Azv1bSl0fHny8b5ZdOMmsCht8-N6a3Z4erHzWdTo,3337
|
|
239
|
+
mlx_vlm/models/qwen3_vl/language.py,sha256=yQaQ8aQUz6g5Gsqjvx0pbAtlgZ23Cg-MHhsEgJyNrfM,23308
|
|
240
|
+
mlx_vlm/models/qwen3_vl/qwen3_vl.py,sha256=cqD1C0F34Loz25Yi1JzAk8kUWBCgf1X127ZzxOBegz8,5877
|
|
241
|
+
mlx_vlm/models/qwen3_vl/vision.py,sha256=lVxr_yLdbi-1tOoiEwjBTC3SRyEszzbtxOqt19LGGd4,15574
|
|
242
|
+
mlx_vlm/models/qwen3_vl_moe/__init__.py,sha256=qnj0Xd2vgm5baRbsWXRnNFvBn5Q64l8GSxaSMc5eyJ4,118
|
|
243
|
+
mlx_vlm/models/qwen3_vl_moe/config.py,sha256=QB-bYhK6uxNOXTy2LwV0x51CTcx4u_DmW0POsemQV2I,3482
|
|
244
|
+
mlx_vlm/models/qwen3_vl_moe/language.py,sha256=vQYKMZUgadl1psadpiBTVIaSkHBYg_NVQg3zIf8_Vh4,25282
|
|
245
|
+
mlx_vlm/models/qwen3_vl_moe/qwen3_vl_moe.py,sha256=nglTBJktl1hAejemtUcbPZ7z_Aqoe8uefmozW0g3Na0,6674
|
|
246
|
+
mlx_vlm/models/qwen3_vl_moe/vision.py,sha256=jzyscGC5-gduIMgUvzMpJwyfV6qFuCZWwh0ZKOt9a00,15597
|
|
247
|
+
mlx_vlm/models/smolvlm/__init__.py,sha256=dKuKy9-SEIHoldTNNNt7t9AkqETx9Z3T9YLzUqZ_94U,221
|
|
248
|
+
mlx_vlm/models/smolvlm/config.py,sha256=26UVPN8mGJYdw19nXoOJNkjd1T1vnF1qQGrkfBmBYjc,1775
|
|
249
|
+
mlx_vlm/models/smolvlm/smolvlm.py,sha256=hcFbZ4T4_qjwy5biKe-xjhKsupkamPo402TzwLJNap8,2252
|
|
250
|
+
mlx_vlm/trainer/__init__.py,sha256=KB5lcIr0EDAeQdvDhjt5wkkfb5c5H9YBymB3bE2wjho,253
|
|
251
|
+
mlx_vlm/trainer/lora.py,sha256=ar1gX5i-sGpkdJ8cIyv-d5Fqj-AaxJvsVKl87uFFYI8,2135
|
|
252
|
+
mlx_vlm/trainer/trainer.py,sha256=8vnuzKWr6SADWIHxT0jmS0xfMfC_niK6fU2BNqa5iF8,9283
|
|
253
|
+
mlx_vlm/trainer/utils.py,sha256=N5Ccpogj6-HLVcvwOWvDDyWQWJQNm2oJdeUGP4_92mY,4910
|
|
254
|
+
fount_vlm_nell_02-0.3.11.dist-info/METADATA,sha256=n-HMNMYK2ESnm0F6ynQLqgxRW76Y4P9PRSLy6pEPG5k,11871
|
|
255
|
+
fount_vlm_nell_02-0.3.11.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
256
|
+
fount_vlm_nell_02-0.3.11.dist-info/entry_points.txt,sha256=xx-XT6J38CmDJqtZ75VPgZeomFi470e2uYqf6h_61DE,174
|
|
257
|
+
fount_vlm_nell_02-0.3.11.dist-info/top_level.txt,sha256=bvCSCA137IPm9slJB5biH5fKOOIQJbXjwiQ3HmIIDG4,8
|
|
258
|
+
fount_vlm_nell_02-0.3.11.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2025 Prince Canuma
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mlx_vlm
|
mlx_vlm/__init__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from .convert import convert
|
|
4
|
+
from .generate import (
|
|
5
|
+
BatchResponse,
|
|
6
|
+
BatchStats,
|
|
7
|
+
GenerationResult,
|
|
8
|
+
batch_generate,
|
|
9
|
+
generate,
|
|
10
|
+
stream_generate,
|
|
11
|
+
)
|
|
12
|
+
from .prompt_utils import apply_chat_template, get_message_json
|
|
13
|
+
from .utils import load, prepare_inputs, process_image
|
|
14
|
+
from .version import __version__
|
|
15
|
+
|
|
16
|
+
os.environ["TRANSFORMERS_NO_ADVISORY_WARNINGS"] = "1"
|
mlx_vlm/__main__.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""Entry point for mlx_vlm CLI."""
|
|
3
|
+
|
|
4
|
+
import importlib
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
if __name__ == "__main__":
|
|
8
|
+
subcommands = {
|
|
9
|
+
"generate",
|
|
10
|
+
"convert",
|
|
11
|
+
"chat",
|
|
12
|
+
"chat_ui",
|
|
13
|
+
"server",
|
|
14
|
+
"video_generate",
|
|
15
|
+
"smolvlm_video_generate",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if len(sys.argv) < 2:
|
|
19
|
+
raise ValueError(f"CLI requires a subcommand in {subcommands}")
|
|
20
|
+
subcommand = sys.argv.pop(1)
|
|
21
|
+
if subcommand not in subcommands:
|
|
22
|
+
raise ValueError(f"CLI requires a subcommand in {subcommands}")
|
|
23
|
+
submodule = importlib.import_module(f"mlx_vlm.{subcommand}")
|
|
24
|
+
submodule.main()
|
mlx_vlm/chat.py
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
import time
|
|
5
|
+
from typing import Dict, List
|
|
6
|
+
|
|
7
|
+
import mlx.core as mx
|
|
8
|
+
from rich import print as rprint
|
|
9
|
+
from rich.console import Console
|
|
10
|
+
from rich.markdown import Markdown
|
|
11
|
+
from rich.panel import Panel
|
|
12
|
+
from rich.prompt import Prompt
|
|
13
|
+
|
|
14
|
+
from mlx_vlm import load
|
|
15
|
+
from mlx_vlm.generate import generate_step
|
|
16
|
+
from mlx_vlm.prompt_utils import get_message_json
|
|
17
|
+
from mlx_vlm.utils import load_image
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class MLXVisionChat:
|
|
21
|
+
def __init__(
|
|
22
|
+
self,
|
|
23
|
+
model_path: str = "mlx-community/idefics2-8b-chatty-4bit",
|
|
24
|
+
temperature: float = 0.7,
|
|
25
|
+
max_tokens: int = 1000,
|
|
26
|
+
verbose: bool = False,
|
|
27
|
+
):
|
|
28
|
+
self.console = Console()
|
|
29
|
+
self.verbose = verbose
|
|
30
|
+
self.temperature = temperature
|
|
31
|
+
self.max_tokens = max_tokens
|
|
32
|
+
self.history: List[Dict] = []
|
|
33
|
+
self.current_image = None
|
|
34
|
+
|
|
35
|
+
with self.console.status("[bold green]Loading model..."):
|
|
36
|
+
self.model, self.processor = load(model_path)
|
|
37
|
+
|
|
38
|
+
rprint("[bold green]Model loaded successfully![/bold green]")
|
|
39
|
+
self.print_help()
|
|
40
|
+
|
|
41
|
+
def print_help(self) -> None:
|
|
42
|
+
"""Print available commands."""
|
|
43
|
+
help_text = """
|
|
44
|
+
[bold yellow]Available Commands:[/bold yellow]
|
|
45
|
+
• /image <path> - Load a new image for discussion
|
|
46
|
+
• /clear - Clear conversation history
|
|
47
|
+
• /help - Show this help message
|
|
48
|
+
• /exit - Exit the chat
|
|
49
|
+
• Any other input will be treated as a question or comment about the current image
|
|
50
|
+
"""
|
|
51
|
+
rprint(Panel(help_text, title="Help", border_style="blue"))
|
|
52
|
+
|
|
53
|
+
def process_image(self, image_path: str) -> bool:
|
|
54
|
+
"""Process an image and prepare it for the model. Returns True if successful."""
|
|
55
|
+
try:
|
|
56
|
+
if not os.path.exists(image_path):
|
|
57
|
+
rprint(
|
|
58
|
+
f"[bold red]Error:[/bold red] Image file not found: {image_path}"
|
|
59
|
+
)
|
|
60
|
+
return False
|
|
61
|
+
|
|
62
|
+
self.current_image = load_image(image_path)
|
|
63
|
+
rprint(f"[bold blue]Loaded image:[/bold blue] {image_path}")
|
|
64
|
+
return True
|
|
65
|
+
except Exception as e:
|
|
66
|
+
rprint(f"[bold red]Error loading image:[/bold red] {str(e)}")
|
|
67
|
+
return False
|
|
68
|
+
|
|
69
|
+
def add_to_history(self, role: str, text: str) -> None:
|
|
70
|
+
"""Add a message to the conversation history."""
|
|
71
|
+
content = [{"type": "text", "text": text}]
|
|
72
|
+
self.history.append({"role": role, "content": content})
|
|
73
|
+
|
|
74
|
+
def generate_response(self) -> str:
|
|
75
|
+
"""Generate a response from the model based on the conversation history."""
|
|
76
|
+
if self.current_image is None:
|
|
77
|
+
return "Please load an image first using the /image command."
|
|
78
|
+
|
|
79
|
+
messages = []
|
|
80
|
+
for i, message in enumerate(self.history):
|
|
81
|
+
skip_token = True
|
|
82
|
+
if i == len(self.history) - 1 and message["role"] == "user":
|
|
83
|
+
skip_token = False
|
|
84
|
+
messages.append(
|
|
85
|
+
get_message_json(
|
|
86
|
+
self.model.config.model_type,
|
|
87
|
+
message["content"][0]["text"],
|
|
88
|
+
role=message["role"],
|
|
89
|
+
skip_image_token=skip_token,
|
|
90
|
+
)
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
text_prompt = self.processor.apply_chat_template(
|
|
94
|
+
messages, add_generation_prompt=True
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
inputs = self.processor(
|
|
98
|
+
text=[text_prompt],
|
|
99
|
+
images=[self.current_image],
|
|
100
|
+
padding=True,
|
|
101
|
+
return_tensors="np",
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
pixel_values = mx.array(inputs["pixel_values"])
|
|
105
|
+
input_ids = mx.array(inputs["input_ids"])
|
|
106
|
+
mask = mx.array(inputs["attention_mask"])
|
|
107
|
+
|
|
108
|
+
detokenizer = self.processor.detokenizer
|
|
109
|
+
detokenizer.reset()
|
|
110
|
+
|
|
111
|
+
tic = time.perf_counter()
|
|
112
|
+
|
|
113
|
+
generator = generate_step(
|
|
114
|
+
input_ids,
|
|
115
|
+
self.model,
|
|
116
|
+
pixel_values,
|
|
117
|
+
mask,
|
|
118
|
+
temperature=self.temperature,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
# Use print instead of rprint to avoid rich console's automatic newlines
|
|
122
|
+
rprint("[bold green]Assistant:[/bold green]", end=" ", flush=True)
|
|
123
|
+
for (token, prob), n in zip(generator, range(self.max_tokens)):
|
|
124
|
+
if n == 0:
|
|
125
|
+
prompt_time = time.perf_counter() - tic
|
|
126
|
+
tic = time.perf_counter()
|
|
127
|
+
|
|
128
|
+
if token == self.processor.tokenizer.eos_token_id and n > 0:
|
|
129
|
+
break
|
|
130
|
+
|
|
131
|
+
detokenizer.add_token(token)
|
|
132
|
+
|
|
133
|
+
if self.verbose:
|
|
134
|
+
rprint(detokenizer.last_segment, end="", flush=True)
|
|
135
|
+
|
|
136
|
+
detokenizer.finalize()
|
|
137
|
+
return detokenizer.text
|
|
138
|
+
|
|
139
|
+
def handle_command(self, command: str, args: str) -> bool:
|
|
140
|
+
"""Handle special commands. Returns True if should continue chat, False if should exit."""
|
|
141
|
+
if command == "/exit":
|
|
142
|
+
rprint("[bold yellow]Goodbye![/bold yellow]")
|
|
143
|
+
return False
|
|
144
|
+
elif command == "/help":
|
|
145
|
+
self.print_help()
|
|
146
|
+
elif command == "/clear":
|
|
147
|
+
self.history.clear()
|
|
148
|
+
rprint("[bold blue]Conversation history cleared.[/bold blue]")
|
|
149
|
+
elif command == "/image":
|
|
150
|
+
if not args:
|
|
151
|
+
rprint("[bold red]Error:[/bold red] Please provide an image path")
|
|
152
|
+
return True
|
|
153
|
+
self.process_image(args.strip())
|
|
154
|
+
else:
|
|
155
|
+
rprint(f"[bold red]Unknown command:[/bold red] {command}")
|
|
156
|
+
return True
|
|
157
|
+
|
|
158
|
+
def chat_loop(self) -> None:
|
|
159
|
+
"""Main chat loop for interaction."""
|
|
160
|
+
while True:
|
|
161
|
+
try:
|
|
162
|
+
user_input = Prompt.ask("\n[bold cyan]You[/bold cyan]").strip()
|
|
163
|
+
|
|
164
|
+
# Handle commands
|
|
165
|
+
if user_input.startswith("/"):
|
|
166
|
+
parts = user_input.split(maxsplit=1)
|
|
167
|
+
command = parts[0].lower()
|
|
168
|
+
args = parts[1] if len(parts) > 1 else ""
|
|
169
|
+
if not self.handle_command(command, args):
|
|
170
|
+
break
|
|
171
|
+
continue
|
|
172
|
+
# Handle regular chat input
|
|
173
|
+
if self.current_image is None:
|
|
174
|
+
rprint(
|
|
175
|
+
"[bold yellow]Please load an image first using the /image command[/bold yellow]"
|
|
176
|
+
)
|
|
177
|
+
continue
|
|
178
|
+
|
|
179
|
+
self.add_to_history("user", user_input)
|
|
180
|
+
response = self.generate_response()
|
|
181
|
+
|
|
182
|
+
if not self.verbose:
|
|
183
|
+
rprint(Panel(Markdown(response), border_style="green"))
|
|
184
|
+
|
|
185
|
+
# Remove the eos token from the response
|
|
186
|
+
response = response.replace("<end_of_utterance>", "")
|
|
187
|
+
|
|
188
|
+
self.add_to_history("assistant", response)
|
|
189
|
+
|
|
190
|
+
except KeyboardInterrupt:
|
|
191
|
+
rprint(
|
|
192
|
+
"\n[bold yellow]Interrupted by user. Type /exit to quit.[/bold yellow]"
|
|
193
|
+
)
|
|
194
|
+
continue
|
|
195
|
+
except Exception as e:
|
|
196
|
+
rprint(f"[bold red]Error:[/bold red] {str(e)}")
|
|
197
|
+
continue
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def main():
|
|
201
|
+
parser = argparse.ArgumentParser(description="MLX Vision Chat CLI")
|
|
202
|
+
parser.add_argument(
|
|
203
|
+
"--model",
|
|
204
|
+
default="mlx-community/idefics2-8b-chatty-4bit",
|
|
205
|
+
help="Path to the model or model identifier",
|
|
206
|
+
)
|
|
207
|
+
parser.add_argument("--verbose", action="store_false", help="Enable verbose output")
|
|
208
|
+
parser.add_argument(
|
|
209
|
+
"--temperature", type=float, default=0.7, help="Temperature for the model"
|
|
210
|
+
)
|
|
211
|
+
parser.add_argument(
|
|
212
|
+
"--max-tokens",
|
|
213
|
+
type=int,
|
|
214
|
+
default=1000,
|
|
215
|
+
help="Maximum number of new tokens to generate",
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
args = parser.parse_args()
|
|
219
|
+
|
|
220
|
+
try:
|
|
221
|
+
chat = MLXVisionChat(
|
|
222
|
+
model_path=args.model,
|
|
223
|
+
temperature=args.temperature,
|
|
224
|
+
max_tokens=args.max_tokens,
|
|
225
|
+
verbose=args.verbose,
|
|
226
|
+
)
|
|
227
|
+
chat.chat_loop()
|
|
228
|
+
except Exception as e:
|
|
229
|
+
rprint(f"[bold red]Fatal error:[/bold red] {str(e)}")
|
|
230
|
+
sys.exit(1)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
if __name__ == "__main__":
|
|
234
|
+
main()
|