nexaai 1.0.5__cp310-cp310-win_amd64.whl → 1.0.6__cp310-cp310-win_amd64.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.

Binary file
nexaai/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is generated by CMake from _version.py.in
2
2
  # Do not modify this file manually - it will be overwritten
3
3
 
4
- __version__ = "1.0.5"
4
+ __version__ = "1.0.6"
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -3,7 +3,7 @@ import numpy as np
3
3
 
4
4
  from nexaai.common import PluginID
5
5
  from nexaai.embedder import Embedder, EmbeddingConfig
6
- from nexaai.mlx_backend.embedding.interface import Embedder as MLXEmbedderInterface
6
+ from nexaai.mlx_backend.embedding.interface import create_embedder
7
7
  from nexaai.mlx_backend.ml import ModelConfig as MLXModelConfig, SamplerConfig as MLXSamplerConfig, GenerationConfig as MLXGenerationConfig, EmbeddingConfig
8
8
 
9
9
 
@@ -27,11 +27,12 @@ class MLXEmbedderImpl(Embedder):
27
27
  MLXEmbedderImpl instance
28
28
  """
29
29
  try:
30
- # MLX interface is already imported
31
-
32
- # Create instance and load MLX embedder
30
+ # Create instance
33
31
  instance = cls()
34
- instance._mlx_embedder = MLXEmbedderInterface(
32
+
33
+ # Use the factory function to create the appropriate embedder based on model type
34
+ # This will automatically detect if it's JinaV2 or generic model and route correctly
35
+ instance._mlx_embedder = create_embedder(
35
36
  model_path=model_path,
36
37
  tokenizer_path=tokenizer_file
37
38
  )
@@ -820,14 +820,6 @@ class HuggingFaceDownloader:
820
820
  # Create a subdirectory for this specific repo
821
821
  repo_local_dir = self._create_repo_directory(local_dir, repo_id)
822
822
 
823
- # Check if repository already exists (basic check for directory existence)
824
- if not force_download and os.path.exists(repo_local_dir) and os.listdir(repo_local_dir):
825
- print(f"✓ Repository already exists, skipping: {repo_id}")
826
- # Stop progress tracking
827
- if progress_tracker:
828
- progress_tracker.stop_tracking()
829
- return repo_local_dir
830
-
831
823
  try:
832
824
  download_kwargs = {
833
825
  'repo_id': repo_id,
@@ -107,7 +107,7 @@ class DownloadProgressTracker:
107
107
  time_diff = current_time - self.last_time
108
108
 
109
109
  # Only calculate if we have a meaningful time difference (avoid division by very small numbers)
110
- if time_diff > 0.5: # At least 500ms between measurements
110
+ if time_diff > 0.1: # At least 100ms between measurements
111
111
  bytes_diff = current_downloaded - self.last_downloaded
112
112
 
113
113
  # Only calculate speed if bytes actually changed
@@ -118,6 +118,14 @@ class DownloadProgressTracker:
118
118
  self.speed_history.append(speed)
119
119
  if len(self.speed_history) > self.max_speed_history:
120
120
  self.speed_history.pop(0)
121
+
122
+ # Update tracking variables when we actually calculate speed
123
+ self.last_downloaded = current_downloaded
124
+ self.last_time = current_time
125
+ else:
126
+ # First measurement - initialize tracking variables
127
+ self.last_downloaded = current_downloaded
128
+ self.last_time = current_time
121
129
 
122
130
  # Return the average of historical speeds if we have any
123
131
  # This ensures we show the last known speed even when skipping updates
@@ -157,13 +165,9 @@ class DownloadProgressTracker:
157
165
  total_file_sizes += data['total']
158
166
  active_file_count += 1
159
167
 
160
- # Calculate speed
168
+ # Calculate speed (tracking variables are updated internally)
161
169
  speed = self.calculate_speed(total_downloaded)
162
170
 
163
- # Update tracking variables
164
- self.last_downloaded = total_downloaded
165
- self.last_time = time.time()
166
-
167
171
  # Determine total size - prioritize pre-fetched repo size, then aggregate file sizes
168
172
  if self.total_repo_size > 0:
169
173
  # Use pre-fetched repository info if available
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nexaai
3
- Version: 1.0.5
3
+ Version: 1.0.6
4
4
  Summary: Python bindings for NexaSDK C-lib backend
5
5
  Author-email: "Nexa AI, Inc." <dev@nexa.ai>
6
6
  Project-URL: Homepage, https://github.com/NexaAI/nexasdk-bridge
@@ -21,6 +21,7 @@ Provides-Extra: mlx
21
21
  Requires-Dist: mlx; extra == "mlx"
22
22
  Requires-Dist: mlx-lm; extra == "mlx"
23
23
  Requires-Dist: mlx-vlm; extra == "mlx"
24
+ Requires-Dist: mlx-embeddings; extra == "mlx"
24
25
  Requires-Dist: tokenizers; extra == "mlx"
25
26
  Requires-Dist: safetensors; extra == "mlx"
26
27
  Requires-Dist: Pillow; extra == "mlx"
@@ -1,6 +1,6 @@
1
1
  nexaai/__init__.py,sha256=Lt8NU57eTMtWrDYzpFeYR9XtGAPXqizynP83TPU0UW0,2105
2
- nexaai/_stub.cp310-win_amd64.pyd,sha256=p44ZGmcsoolJ5aI2Oqu053_P9hSscKzoTQfDG6Lk4S0,10752
3
- nexaai/_version.py,sha256=gMJqvRn_xrvChdUIgn-DExgBJixnRda2-paThBgt3s0,142
2
+ nexaai/_stub.cp310-win_amd64.pyd,sha256=ixiLcSG3qbpKZOzmKE4LI1qbMBRDS0ahDA4N73hfA_s,10752
3
+ nexaai/_version.py,sha256=xr9lbDfNlYCDUxvax64Rr07-umle9SxhNdf5PrLPcZc,142
4
4
  nexaai/asr.py,sha256=_fsGaxpiU137bUtO5ujtFSYCI1RLsyeEm3Gf4GhHVRk,2118
5
5
  nexaai/base.py,sha256=qQBCiQVNzgpkQjZX9aiFDEdbAAe56TROKC3WnWra2Zg,1021
6
6
  nexaai/common.py,sha256=6keIpdX5XS5us4z79EMoa6RSkVze9SbbXax13IJ9yvs,3525
@@ -16,25 +16,25 @@ nexaai/asr_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  nexaai/asr_impl/mlx_asr_impl.py,sha256=XwMX3LYMeulp8cDS0TCCYcjvttFHAyDWQ_oMvABwQmI,3349
17
17
  nexaai/asr_impl/pybind_asr_impl.py,sha256=20o5SOPzhF9x41ra8L_qIM7YxCkYeLb5csSrNde-dds,1560
18
18
  nexaai/binds/__init__.py,sha256=tYvy0pFhoY29GstDT5r-oRiPRarPLECvJAkcamJItOg,83
19
- nexaai/binds/common_bind.cp310-win_amd64.pyd,sha256=wXqQGKiddXq8rQA2SluwuCmfvKlLK9bNt3IyhP-Q2t8,201216
20
- nexaai/binds/embedder_bind.cp310-win_amd64.pyd,sha256=jhCkw3xHYir2zJBnSwbLH6dsWuD4loaU2F44cvlShD4,182784
19
+ nexaai/binds/common_bind.cp310-win_amd64.pyd,sha256=jsvdVyvw4jrfOb7GJzYuPZ6feGueOCZJKHzuyVLJRwQ,201216
20
+ nexaai/binds/embedder_bind.cp310-win_amd64.pyd,sha256=TY3-wJB8eE2hCe5sIF8rjqBhlHayx1Bppewve3asYOo,182784
21
21
  nexaai/binds/libcrypto-3-x64.dll,sha256=-Lau6pL5DpDXzpg9MED63gCeL8oRrSLI_e2LeaxIHqk,7314432
22
22
  nexaai/binds/libssl-3-x64.dll,sha256=Tzzyu5jRpUugFxr_65hbFlAtFpjxIDpOYMU1E0ijkJw,1313792
23
- nexaai/binds/llm_bind.cp310-win_amd64.pyd,sha256=mbtjTaQ_Cc90HYs76QCs_T5DY_fZ7VpfzoTYGPSX2Vg,162816
24
- nexaai/binds/nexa_bridge.dll,sha256=taCRtuNWJQVvEv_2d2K1o0FAmHPDPD5Uez2npNkT700,178688
25
- nexaai/binds/nexa_llama_cpp/ggml-base.dll,sha256=b1Ei-roaQLUBPNd4PxCUAMAR4jyv-GIwbA144xttdXY,514560
26
- nexaai/binds/nexa_llama_cpp/ggml-cpu.dll,sha256=PNt0gYfIfuywKVYr4DyTTeVv8QN2-9nDKA6pI08TtkQ,663552
27
- nexaai/binds/nexa_llama_cpp/ggml-cuda.dll,sha256=4dJy4K4ZCCYMkL-9zcMsn10By_sMK_pfiqL7X3EOJSI,315100160
28
- nexaai/binds/nexa_llama_cpp/ggml-vulkan.dll,sha256=yJrka26Udhgzu3ZJKEldeHP1G0yw6Jo6830CD0mFifE,26204160
29
- nexaai/binds/nexa_llama_cpp/ggml.dll,sha256=WaVwGkJbgg2Cq6lJTKEZop0Av74YUh8M_-oovSdhtJ0,66560
30
- nexaai/binds/nexa_llama_cpp/llama.dll,sha256=oWDzqoNqkx4Klli2ZNEtBVIZuQ9ri1IyuK8mQNB7wlw,1587712
31
- nexaai/binds/nexa_llama_cpp/mtmd.dll,sha256=0UfR_8qiJMnIOCdHT9i9lZjBs2mKazhCm-1exSFCbVY,560128
32
- nexaai/binds/nexa_llama_cpp/nexa_plugin.dll,sha256=HcqcbJbEDPVTphVdqTt3CxQjFeQtQZAMSW1omX0JcKM,1384448
23
+ nexaai/binds/llm_bind.cp310-win_amd64.pyd,sha256=7R5F5lhVcCnVHGdYF3v5nfYNORB72Mdkv2P2qPy6lvM,162816
24
+ nexaai/binds/nexa_bridge.dll,sha256=HPmi_3ah0Tfflg2c52V5LJCCE4Q0L3dyoIjHtbtrg-c,178688
25
+ nexaai/binds/nexa_llama_cpp/ggml-base.dll,sha256=q0cKUS_Ny5NZ6LSLFFDphwsEdygLYtQknctZ0rL5LPA,532480
26
+ nexaai/binds/nexa_llama_cpp/ggml-cpu.dll,sha256=5C9KSQgfKI1a-18pjKH8d1p_BZeN1Siylq5wlZMvvb4,672768
27
+ nexaai/binds/nexa_llama_cpp/ggml-cuda.dll,sha256=IZSfyCWXRnhCgj4KGrFLP_gXsohPr3zJlPRQHyORfb4,313528832
28
+ nexaai/binds/nexa_llama_cpp/ggml-vulkan.dll,sha256=fi25ekvSN45PtklozUZJJpIyYZ38DGrd9hKtUwgFFvQ,36627456
29
+ nexaai/binds/nexa_llama_cpp/ggml.dll,sha256=64D9Ls_3Vc2mf2vj7IdJcGXM0EZ3Q1o6ERd4wP_pqbQ,66560
30
+ nexaai/binds/nexa_llama_cpp/llama.dll,sha256=QQIfVffMZDoEzCwUhHDQTCOOuYzdB54toJq_cUhExoE,1611776
31
+ nexaai/binds/nexa_llama_cpp/mtmd.dll,sha256=XLlN_FZYmkoPVylASGXaSWlAPf3L0eP1ye8r0ZSO7LM,561152
32
+ nexaai/binds/nexa_llama_cpp/nexa_plugin.dll,sha256=2Ovy5zYQQ740cw5AF-xvh1qDMzNx54iF6j4XwvR0nEg,1405440
33
33
  nexaai/cv_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  nexaai/cv_impl/mlx_cv_impl.py,sha256=QLd_8w90gtxH8kmssaDYatCTRvQNIJuUGKZNnYrmx6E,3317
35
35
  nexaai/cv_impl/pybind_cv_impl.py,sha256=aSOCAxmHrwJbEkSN6VX3Cykqlj_9RIpVrZXILul04GA,1096
36
36
  nexaai/embedder_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- nexaai/embedder_impl/mlx_embedder_impl.py,sha256=MN5vAGohgyEreLn3H7dg2JeWp2v8emLhrfIDGndk-us,4498
37
+ nexaai/embedder_impl/mlx_embedder_impl.py,sha256=Kzd-veLNl95FbI2oEJMtr6qKbjtPDDajzsGUVjJfTRA,4598
38
38
  nexaai/embedder_impl/pybind_embedder_impl.py,sha256=FoLsUrzF5cNtEsSFchPlapkdqLGFOUGNPx0Kc8hdCvA,3589
39
39
  nexaai/image_gen_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  nexaai/image_gen_impl/mlx_image_gen_impl.py,sha256=peUE9ue9ApaPlZVOICBWiHtd13sY40OWQbE8EjfIUMU,11511
@@ -50,12 +50,12 @@ nexaai/tts_impl/mlx_tts_impl.py,sha256=LcH9bVdIl3Q6lOzSUB_X2s-_nWFmlCl1yL7XSUK0f
50
50
  nexaai/tts_impl/pybind_tts_impl.py,sha256=n3z4zmPQayQJgAwcvETw0IBUCp8IYROuYFSg0tAy_8Y,1487
51
51
  nexaai/utils/avatar_fetcher.py,sha256=D01f8je-37Nd68zGw8MYK2m7y3fvGlC6h0KR-aN9kdU,3925
52
52
  nexaai/utils/decode.py,sha256=0Z9jDH4ICzw4YXj8nD4L-sMouDaev-TISGRQ4KzidWE,421
53
- nexaai/utils/model_manager.py,sha256=Ksl-tKq-a3miTUxEn6-SSOC_KVdn6RPjcUdkWmDDwCk,49767
54
- nexaai/utils/progress_tracker.py,sha256=FmJBoOlzfQdc-TmccEav0cBR_iSNrrcskG3Fm1OrEJA,15482
53
+ nexaai/utils/model_manager.py,sha256=up1XFhefax7PJuAZnlKz9Ws2Tfq-alKOFOCKGRIRBQM,49344
54
+ nexaai/utils/progress_tracker.py,sha256=1emMhW5D-_O0ZnMQERXvpedchsFVPOk03jYAy4nqRJs,15788
55
55
  nexaai/vlm_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  nexaai/vlm_impl/mlx_vlm_impl.py,sha256=oY_qb9z_iF0zArBuY5CCYIvZcA3R0i_NKXrr_r-QSgg,10989
57
57
  nexaai/vlm_impl/pybind_vlm_impl.py,sha256=Hu8g8OXyPn8OzLQOpRSE5lfGmhjChiKj7fMRB8mC_cI,9147
58
- nexaai-1.0.5.dist-info/METADATA,sha256=JhdQmzKpw_EKjD-jcgZHKzn-KRMIoQEKbRGPlTwxrm8,1182
59
- nexaai-1.0.5.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
60
- nexaai-1.0.5.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
61
- nexaai-1.0.5.dist-info/RECORD,,
58
+ nexaai-1.0.6.dist-info/METADATA,sha256=jHbKP4pRUM150VRZuTSljyxvZ5_wayIusQ2bmhuqcp4,1229
59
+ nexaai-1.0.6.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
60
+ nexaai-1.0.6.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
61
+ nexaai-1.0.6.dist-info/RECORD,,
File without changes