nexaai 1.0.14__cp310-cp310-macosx_14_0_universal2.whl → 1.0.15__cp310-cp310-macosx_14_0_universal2.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.
Potentially problematic release.
This version of nexaai might be problematic. Click here for more details.
- nexaai/_stub.cpython-310-darwin.so +0 -0
- nexaai/_version.py +1 -1
- nexaai/binds/libnexa_bridge.dylib +0 -0
- nexaai/binds/nexa_mlx/libnexa_plugin.dylib +0 -0
- nexaai/mlx_backend/vlm/generate_qwen3_vl.py +261 -0
- nexaai/mlx_backend/vlm/interface.py +11 -2
- nexaai/mlx_backend/vlm/main.py +168 -9
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/__init__.py +0 -0
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/base.py +117 -0
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/cache.py +531 -0
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/generate.py +701 -0
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/rope_utils.py +255 -0
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/sample_utils.py +303 -0
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/tokenizer_utils.py +407 -0
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/processor.py +476 -0
- nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/qwen3vl.py +1223 -0
- nexaai/vlm.py +4 -3
- nexaai/vlm_impl/mlx_vlm_impl.py +3 -1
- nexaai/vlm_impl/pybind_vlm_impl.py +3 -1
- {nexaai-1.0.14.dist-info → nexaai-1.0.15.dist-info}/METADATA +1 -1
- {nexaai-1.0.14.dist-info → nexaai-1.0.15.dist-info}/RECORD +23 -13
- {nexaai-1.0.14.dist-info → nexaai-1.0.15.dist-info}/WHEEL +0 -0
- {nexaai-1.0.14.dist-info → nexaai-1.0.15.dist-info}/top_level.txt +0 -0
nexaai/vlm.py
CHANGED
|
@@ -18,7 +18,8 @@ class VLM(BaseModel):
|
|
|
18
18
|
@classmethod
|
|
19
19
|
def _load_from(cls,
|
|
20
20
|
local_path: str,
|
|
21
|
-
mmproj_path: str,
|
|
21
|
+
mmproj_path: str = None,
|
|
22
|
+
model_name: Optional[str] = None,
|
|
22
23
|
m_cfg: ModelConfig = ModelConfig(),
|
|
23
24
|
plugin_id: Union[PluginID, str] = PluginID.LLAMA_CPP,
|
|
24
25
|
device_id: Optional[str] = None
|
|
@@ -40,10 +41,10 @@ class VLM(BaseModel):
|
|
|
40
41
|
|
|
41
42
|
if plugin_value == "mlx":
|
|
42
43
|
from nexaai.vlm_impl.mlx_vlm_impl import MlxVlmImpl
|
|
43
|
-
return MlxVlmImpl._load_from(local_path, mmproj_path, m_cfg, plugin_id, device_id)
|
|
44
|
+
return MlxVlmImpl._load_from(local_path, mmproj_path, model_name, m_cfg, plugin_id, device_id)
|
|
44
45
|
else:
|
|
45
46
|
from nexaai.vlm_impl.pybind_vlm_impl import PyBindVLMImpl
|
|
46
|
-
return PyBindVLMImpl._load_from(local_path, mmproj_path, m_cfg, plugin_id, device_id)
|
|
47
|
+
return PyBindVLMImpl._load_from(local_path, mmproj_path, model_name, m_cfg, plugin_id, device_id)
|
|
47
48
|
|
|
48
49
|
@abstractmethod
|
|
49
50
|
def eject(self):
|
nexaai/vlm_impl/mlx_vlm_impl.py
CHANGED
|
@@ -16,7 +16,8 @@ class MlxVlmImpl(VLM):
|
|
|
16
16
|
@classmethod
|
|
17
17
|
def _load_from(cls,
|
|
18
18
|
local_path: str,
|
|
19
|
-
mmproj_path: str,
|
|
19
|
+
mmproj_path: str = None,
|
|
20
|
+
model_name: Optional[str] = None,
|
|
20
21
|
m_cfg: ModelConfig = ModelConfig(),
|
|
21
22
|
plugin_id: Union[PluginID, str] = PluginID.MLX,
|
|
22
23
|
device_id: Optional[str] = None
|
|
@@ -39,6 +40,7 @@ class MlxVlmImpl(VLM):
|
|
|
39
40
|
# Create instance and load MLX VLM
|
|
40
41
|
instance = cls(m_cfg)
|
|
41
42
|
instance._mlx_vlm = MLXVLMInterface(
|
|
43
|
+
model_name=model_name,
|
|
42
44
|
model_path=local_path,
|
|
43
45
|
mmproj_path=mmproj_path, # MLX VLM may not use this, but pass it anyway
|
|
44
46
|
context_length=m_cfg.n_ctx,
|
|
@@ -20,7 +20,8 @@ class PyBindVLMImpl(VLM):
|
|
|
20
20
|
@classmethod
|
|
21
21
|
def _load_from(cls,
|
|
22
22
|
local_path: str,
|
|
23
|
-
mmproj_path: str,
|
|
23
|
+
mmproj_path: str = None,
|
|
24
|
+
model_name: Optional[str] = None,
|
|
24
25
|
m_cfg: ModelConfig = ModelConfig(),
|
|
25
26
|
plugin_id: Union[PluginID, str] = PluginID.LLAMA_CPP,
|
|
26
27
|
device_id: Optional[str] = None
|
|
@@ -67,6 +68,7 @@ class PyBindVLMImpl(VLM):
|
|
|
67
68
|
handle = vlm_bind.create_vlm(
|
|
68
69
|
model_path=local_path,
|
|
69
70
|
mmproj_path=mmproj_path,
|
|
71
|
+
# model_name=model_name, # TODO: enable model_name in pybind later
|
|
70
72
|
model_config=config,
|
|
71
73
|
plugin_id=plugin_id_str,
|
|
72
74
|
device_id=device_id
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
nexaai/__init__.py,sha256=jXdC4vv6DBK1fVewYTYSUhOOYfvf_Mk81UIeMGGIKUg,2029
|
|
2
|
-
nexaai/_stub.cpython-310-darwin.so,sha256=
|
|
3
|
-
nexaai/_version.py,sha256=
|
|
2
|
+
nexaai/_stub.cpython-310-darwin.so,sha256=ApM6sjhrVabkKiqqlR5MbAEp8Z7YLkh8b-Pyr_ypeQs,66768
|
|
3
|
+
nexaai/_version.py,sha256=HloCCPv8Vk0kU4i_K0MutKdONW91ZAEc9UCaEQX7BKY,139
|
|
4
4
|
nexaai/asr.py,sha256=NljMXDErwPNMOPaRkJZMEDka9Nk8xyur7L8i924TStY,2054
|
|
5
5
|
nexaai/base.py,sha256=N8PRgDFA-XPku2vWnQIofQ7ipz3pPlO6f8YZGnuhquE,982
|
|
6
6
|
nexaai/common.py,sha256=yBnIbqYaQYnfrl7IczOBh6MDibYZVxwaRJEglYcKgGs,3422
|
|
@@ -11,14 +11,14 @@ nexaai/llm.py,sha256=S1o_k2VQoF5w2wO25f142OO1R75TP89Ii69VZv8pIGo,3567
|
|
|
11
11
|
nexaai/rerank.py,sha256=vWaBucoQ1wz-2iYnZqyFIcEjm-4Xcs1KDbFN5X8zzDQ,1872
|
|
12
12
|
nexaai/runtime.py,sha256=mxxHYsb5iBUAm2K_u-XJWr_U-spJ9S4eApc8kf9myjw,1957
|
|
13
13
|
nexaai/tts.py,sha256=ZnBpWUxIfHhh7KfEjddtH7hHOTa91zg7ogGLakMIALo,2167
|
|
14
|
-
nexaai/vlm.py,sha256=
|
|
14
|
+
nexaai/vlm.py,sha256=OCxwML-Z5uVGp3fjzJVtbCxfTLpgxkhQ8Wo6MVysoiw,4733
|
|
15
15
|
nexaai/asr_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
nexaai/asr_impl/mlx_asr_impl.py,sha256=eosd8-TIWAOwV0HltmoFrLwzXHcU4jyxtncvuZE9pgA,3257
|
|
17
17
|
nexaai/asr_impl/pybind_asr_impl.py,sha256=pE9Hb_hMi5yAc4MF83bLVOb8zDtreCkB3_u7XED9YpA,1516
|
|
18
18
|
nexaai/binds/__init__.py,sha256=eYuay_8DDXeOUWz2_R9HFSabohxs6hvZn391t2L0Po0,104
|
|
19
19
|
nexaai/binds/common_bind.cpython-310-darwin.so,sha256=nkZyv_jnzSWaLxb2pVlVR4baM2SM9pCLPVLyjKaRfeA,217232
|
|
20
20
|
nexaai/binds/embedder_bind.cpython-310-darwin.so,sha256=uM7T2TOW9CYGHDsiUndGOsgBSIKlyvWzqFwEvUKcwQ8,202064
|
|
21
|
-
nexaai/binds/libnexa_bridge.dylib,sha256=
|
|
21
|
+
nexaai/binds/libnexa_bridge.dylib,sha256=HRSfO9TfK80qq5a4UovDwQX6TAZQHtSfMM2WDCk6cOE,251144
|
|
22
22
|
nexaai/binds/llm_bind.cpython-310-darwin.so,sha256=8ONMAgigH_zgrvFwNi-OUeIFZD4kWyLflntD54gbUa8,182704
|
|
23
23
|
nexaai/binds/vlm_bind.cpython-310-darwin.so,sha256=HV8bwVvJuhX659TQml0fL8FS4sQmaWzKv87vzPgg4sU,182704
|
|
24
24
|
nexaai/binds/nexa_llama_cpp/libggml-base.dylib,sha256=JM4oOkie1su0ES5hMdtILeQHlRukRzH1vTleTupUXhg,650736
|
|
@@ -28,7 +28,7 @@ nexaai/binds/nexa_llama_cpp/libggml.dylib,sha256=aOTj_6RrAMkfDO0ZI28_3nfcC-l4Y3d
|
|
|
28
28
|
nexaai/binds/nexa_llama_cpp/libllama.dylib,sha256=RkBd5usb8RvEIOamvxCW3UvMauI5bC66G_n6hw83NpY,1786128
|
|
29
29
|
nexaai/binds/nexa_llama_cpp/libmtmd.dylib,sha256=o6mQqefzQNF0CS4j6odwJKj0gkXm15hIxwlNt88FOn4,605248
|
|
30
30
|
nexaai/binds/nexa_llama_cpp/libnexa_plugin.dylib,sha256=nU57JdalJwIFAVxqR6I_NwCS0UzMBy8cWNghWQz-I5E,1862104
|
|
31
|
-
nexaai/binds/nexa_mlx/libnexa_plugin.dylib,sha256=
|
|
31
|
+
nexaai/binds/nexa_mlx/libnexa_plugin.dylib,sha256=tNfrIGAF-r2nqcFpPSVN9pjXV47CVXFPZ9_UH-K43T0,598328
|
|
32
32
|
nexaai/binds/nexa_mlx/py-lib/ml.py,sha256=LafDM_TeXmuQkld2tdQxUBGgooT0JPMXngLam2TADqU,23179
|
|
33
33
|
nexaai/binds/nexa_mlx/py-lib/profiling.py,sha256=Dc-mybFwBdCIKFWL7CbSHjkOJGAoYHG7r_e_XPhzwBU,9361
|
|
34
34
|
nexaai/binds/nexa_mlx/py-lib/mlx_audio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -386,8 +386,9 @@ nexaai/mlx_backend/tts/__init__.py,sha256=fuT_9_xpYJ28m4yjly5L2jChUrzlSQz-b_S7nu
|
|
|
386
386
|
nexaai/mlx_backend/tts/interface.py,sha256=0FvZbIyOvg8jERZEQ6bygbv7v02O9xHO4-TPUlar0b4,9568
|
|
387
387
|
nexaai/mlx_backend/vlm/__init__.py,sha256=_25kvMEviX16Hg3bro8Ws70V0eeIEqYKV8ZDXqYzKew,73
|
|
388
388
|
nexaai/mlx_backend/vlm/generate.py,sha256=DqHFEAuqk-nko8ho6U9GAXTDAWz4d8GTe_hCt-XFyCw,19071
|
|
389
|
-
nexaai/mlx_backend/vlm/
|
|
390
|
-
nexaai/mlx_backend/vlm/
|
|
389
|
+
nexaai/mlx_backend/vlm/generate_qwen3_vl.py,sha256=undjso1mfxqpd6FMTksSA5qagRttxAGbOBj1x7cqI1s,9211
|
|
390
|
+
nexaai/mlx_backend/vlm/interface.py,sha256=vFTzJCbqq55ybv_tbDBC9NVn1_sXgCfqXdsV-3ia8vo,16177
|
|
391
|
+
nexaai/mlx_backend/vlm/main.py,sha256=nPcg25jupeDD74uvRoxpWp3Dsulw7WddI7vll6zejak,10664
|
|
391
392
|
nexaai/mlx_backend/vlm/modeling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
392
393
|
nexaai/mlx_backend/vlm/modeling/convert.py,sha256=ia5i9cgTufFGmKyhkYUaW0nfNqT_bMo8i-Hg_zy5JC4,1863
|
|
393
394
|
nexaai/mlx_backend/vlm/modeling/processing_qwen2_5_vl.py,sha256=PdlV1pTp0_b6QPrXNZzA52GBMRjyODWLlN_uzrMtDLQ,10218
|
|
@@ -496,6 +497,15 @@ nexaai/mlx_backend/vlm/modeling/models/qwen2_vl/config.py,sha256=yPnWEyLruqmakMV
|
|
|
496
497
|
nexaai/mlx_backend/vlm/modeling/models/qwen2_vl/language.py,sha256=OeUoAfIg7dNB43tzRTLk3brdPmYFwaf_uUH4a-VwIzo,19189
|
|
497
498
|
nexaai/mlx_backend/vlm/modeling/models/qwen2_vl/qwen2_vl.py,sha256=YysRg1PszpZdsH7hywqN2pIMZAbU1P636KZoSJCNri8,5740
|
|
498
499
|
nexaai/mlx_backend/vlm/modeling/models/qwen2_vl/vision.py,sha256=rcneYZYwP5fx3p8xxXEDGvnWAMIn8DXenqBPLBjmVcI,10555
|
|
500
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/processor.py,sha256=_WZK8uv0LAGHO8V5LwCojyS4UYk0tfICsZ9GM4_Pfxo,19156
|
|
501
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/qwen3vl.py,sha256=LArnNtI98B_GJOblPNijVage9EmVfa-YZYI-2XGFZek,50662
|
|
502
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
503
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/base.py,sha256=4RlZwgz8YX2ngmJNaymxFFpw9hJu-0EMw9xwXpngW9o,3496
|
|
504
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/cache.py,sha256=NMOB6x-RT6svF4H-Ymo5WqnP7ptAal3aaKjWZXWGMsM,17671
|
|
505
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/generate.py,sha256=Mw7Btz0_t7erQOrfWzCXT-ktEwZl61OODcmDMIo3VS0,26719
|
|
506
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/rope_utils.py,sha256=ty0dA3SsEUFtFbHo16tKdnKymrNKKsUO3KMYapMajbY,8704
|
|
507
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/sample_utils.py,sha256=8SEeVwgjuvaYy-4ALAU0RHQMuRr2k7EkXba_csxk498,10673
|
|
508
|
+
nexaai/mlx_backend/vlm/modeling/models/qwen3_vl/llm_common/tokenizer_utils.py,sha256=Gqanx4hBDcon_k5ClhUsS4YpMbZNiee8jvImGS9h43s,13229
|
|
499
509
|
nexaai/mlx_backend/vlm/modeling/models/smolvlm/__init__.py,sha256=nvaihrxZuqymlQZbPCSTKBoxzJYx5fg3U1aM5eXUutw,123
|
|
500
510
|
nexaai/mlx_backend/vlm/modeling/models/smolvlm/smolvlm.py,sha256=i-B_d0AxninzMWSHx-kc2X5nwp-0bmKnibjS7nXeKGA,2363
|
|
501
511
|
nexaai/mlx_backend/vlm/modeling/trainer/__init__.py,sha256=rGAttw-lYQ2HUXVeuDDprKq8ERq3WIIFnRsA9tYwAjo,252
|
|
@@ -516,9 +526,9 @@ nexaai/utils/model_types.py,sha256=-DER8L4lAUR_iLS99F0r57avwqWtuN21ug5pX2p24_E,1
|
|
|
516
526
|
nexaai/utils/progress_tracker.py,sha256=jdUqtmPqyhwC9uSKvQcJEYETwSt-OhP4oitdJ94614o,15394
|
|
517
527
|
nexaai/utils/quantization_utils.py,sha256=4gvp6UQfSO9G1FYBwnFtQspTzH9sDbi1PBXw2t1N69M,7650
|
|
518
528
|
nexaai/vlm_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
519
|
-
nexaai/vlm_impl/mlx_vlm_impl.py,sha256=
|
|
520
|
-
nexaai/vlm_impl/pybind_vlm_impl.py,sha256=
|
|
521
|
-
nexaai-1.0.
|
|
522
|
-
nexaai-1.0.
|
|
523
|
-
nexaai-1.0.
|
|
524
|
-
nexaai-1.0.
|
|
529
|
+
nexaai/vlm_impl/mlx_vlm_impl.py,sha256=pLtWm_ckz8a0U-AtAOMVseFDO4OVPvHyYO2KlfBaGYk,10833
|
|
530
|
+
nexaai/vlm_impl/pybind_vlm_impl.py,sha256=FAbhpRJzHgI78r0mUvKybO97R1szvNhH0aTn_I52oT4,8597
|
|
531
|
+
nexaai-1.0.15.dist-info/METADATA,sha256=nYgvF_Qt5xgdkTQbGiE-zFKRFq09_ycTS4FoFWEm5Tc,1198
|
|
532
|
+
nexaai-1.0.15.dist-info/WHEEL,sha256=T2p57lol9__xkoU6aJTyN1Pm43ZpRU3q6km7mIbrAMs,114
|
|
533
|
+
nexaai-1.0.15.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
|
|
534
|
+
nexaai-1.0.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|