xinference 0.16.1__py3-none-any.whl → 0.16.3__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.

Potentially problematic release.


This version of xinference might be problematic. Click here for more details.

Files changed (39) hide show
  1. xinference/_version.py +3 -3
  2. xinference/conftest.py +0 -8
  3. xinference/constants.py +2 -0
  4. xinference/core/model.py +34 -2
  5. xinference/core/supervisor.py +5 -5
  6. xinference/core/utils.py +9 -10
  7. xinference/core/worker.py +8 -5
  8. xinference/deploy/cmdline.py +5 -0
  9. xinference/deploy/utils.py +7 -4
  10. xinference/model/audio/core.py +6 -2
  11. xinference/model/audio/model_spec.json +1 -1
  12. xinference/model/core.py +3 -1
  13. xinference/model/embedding/core.py +6 -2
  14. xinference/model/image/core.py +6 -2
  15. xinference/model/image/ocr/got_ocr2.py +3 -0
  16. xinference/model/llm/__init__.py +33 -0
  17. xinference/model/llm/core.py +4 -4
  18. xinference/model/llm/llm_family.json +87 -0
  19. xinference/model/llm/llm_family.py +68 -2
  20. xinference/model/llm/llm_family_modelscope.json +91 -0
  21. xinference/model/llm/llm_family_openmind_hub.json +1359 -0
  22. xinference/model/llm/vllm/core.py +2 -1
  23. xinference/model/rerank/core.py +9 -1
  24. xinference/model/utils.py +7 -0
  25. xinference/model/video/core.py +6 -2
  26. xinference/web/ui/build/asset-manifest.json +3 -3
  27. xinference/web/ui/build/index.html +1 -1
  28. xinference/web/ui/build/static/js/{main.b76aeeb7.js → main.2f269bb3.js} +3 -3
  29. xinference/web/ui/build/static/js/main.2f269bb3.js.map +1 -0
  30. xinference/web/ui/node_modules/.cache/babel-loader/1f269fb2a368363c1cb2237825f1dba093b6bdd8c44cc05954fd19ec2c1fff03.json +1 -0
  31. {xinference-0.16.1.dist-info → xinference-0.16.3.dist-info}/METADATA +5 -4
  32. {xinference-0.16.1.dist-info → xinference-0.16.3.dist-info}/RECORD +37 -36
  33. xinference/web/ui/build/static/js/main.b76aeeb7.js.map +0 -1
  34. xinference/web/ui/node_modules/.cache/babel-loader/32ea2c04cf0bba2761b4883d2c40cc259952c94d2d6bb774e510963ca37aac0a.json +0 -1
  35. /xinference/web/ui/build/static/js/{main.b76aeeb7.js.LICENSE.txt → main.2f269bb3.js.LICENSE.txt} +0 -0
  36. {xinference-0.16.1.dist-info → xinference-0.16.3.dist-info}/LICENSE +0 -0
  37. {xinference-0.16.1.dist-info → xinference-0.16.3.dist-info}/WHEEL +0 -0
  38. {xinference-0.16.1.dist-info → xinference-0.16.3.dist-info}/entry_points.txt +0 -0
  39. {xinference-0.16.1.dist-info → xinference-0.16.3.dist-info}/top_level.txt +0 -0
@@ -163,7 +163,6 @@ if VLLM_INSTALLED and vllm.__version__ >= "0.5.1":
163
163
  VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-v2-chat-0628")
164
164
  VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-v2.5")
165
165
 
166
-
167
166
  if VLLM_INSTALLED and vllm.__version__ >= "0.5.3":
168
167
  VLLM_SUPPORTED_CHAT_MODELS.append("gemma-2-it")
169
168
  VLLM_SUPPORTED_CHAT_MODELS.append("mistral-nemo-instruct")
@@ -177,6 +176,8 @@ if VLLM_INSTALLED and vllm.__version__ >= "0.6.1":
177
176
  VLLM_SUPPORTED_VISION_MODEL_LIST.append("internvl2")
178
177
 
179
178
  if VLLM_INSTALLED and vllm.__version__ >= "0.6.3":
179
+ VLLM_SUPPORTED_MODELS.append("llama-3.2-vision")
180
+ VLLM_SUPPORTED_VISION_MODEL_LIST.append("llama-3.2-vision-instruct")
180
181
  VLLM_SUPPORTED_VISION_MODEL_LIST.append("qwen2-vl-instruct")
181
182
 
182
183
 
@@ -268,6 +268,12 @@ class RerankModel:
268
268
  similarity_scores = self._model.compute_score(sentence_combinations)
269
269
  if not isinstance(similarity_scores, Sequence):
270
270
  similarity_scores = [similarity_scores]
271
+ elif (
272
+ isinstance(similarity_scores, list)
273
+ and len(similarity_scores) > 0
274
+ and isinstance(similarity_scores[0], Sequence)
275
+ ):
276
+ similarity_scores = similarity_scores[0]
271
277
 
272
278
  sim_scores_argsort = list(reversed(np.argsort(similarity_scores)))
273
279
  if top_n is not None:
@@ -341,7 +347,9 @@ def create_rerank_model_instance(
341
347
  devices: List[str],
342
348
  model_uid: str,
343
349
  model_name: str,
344
- download_hub: Optional[Literal["huggingface", "modelscope", "csghub"]] = None,
350
+ download_hub: Optional[
351
+ Literal["huggingface", "modelscope", "openmind_hub", "csghub"]
352
+ ] = None,
345
353
  model_path: Optional[str] = None,
346
354
  **kwargs,
347
355
  ) -> Tuple[RerankModel, RerankModelDescription]:
xinference/model/utils.py CHANGED
@@ -54,6 +54,13 @@ def download_from_modelscope() -> bool:
54
54
  return False
55
55
 
56
56
 
57
+ def download_from_openmind_hub() -> bool:
58
+ if os.environ.get(XINFERENCE_ENV_MODEL_SRC):
59
+ return os.environ.get(XINFERENCE_ENV_MODEL_SRC) == "openmind_hub"
60
+ else:
61
+ return False
62
+
63
+
57
64
  def download_from_csghub() -> bool:
58
65
  if os.environ.get(XINFERENCE_ENV_MODEL_SRC) == "csghub":
59
66
  return True
@@ -97,7 +97,9 @@ def generate_video_description(
97
97
 
98
98
  def match_diffusion(
99
99
  model_name: str,
100
- download_hub: Optional[Literal["huggingface", "modelscope", "csghub"]] = None,
100
+ download_hub: Optional[
101
+ Literal["huggingface", "modelscope", "openmind_hub", "csghub"]
102
+ ] = None,
101
103
  ) -> VideoModelFamilyV1:
102
104
  from ..utils import download_from_modelscope
103
105
  from . import BUILTIN_VIDEO_MODELS, MODELSCOPE_VIDEO_MODELS
@@ -157,7 +159,9 @@ def create_video_model_instance(
157
159
  devices: List[str],
158
160
  model_uid: str,
159
161
  model_name: str,
160
- download_hub: Optional[Literal["huggingface", "modelscope", "csghub"]] = None,
162
+ download_hub: Optional[
163
+ Literal["huggingface", "modelscope", "openmind_hub", "csghub"]
164
+ ] = None,
161
165
  model_path: Optional[str] = None,
162
166
  **kwargs,
163
167
  ) -> Tuple[DiffUsersVideoModel, VideoModelDescription]:
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.5061c4c3.css",
4
- "main.js": "./static/js/main.b76aeeb7.js",
4
+ "main.js": "./static/js/main.2f269bb3.js",
5
5
  "static/media/icon.webp": "./static/media/icon.4603d52c63041e5dfbfd.webp",
6
6
  "index.html": "./index.html",
7
7
  "main.5061c4c3.css.map": "./static/css/main.5061c4c3.css.map",
8
- "main.b76aeeb7.js.map": "./static/js/main.b76aeeb7.js.map"
8
+ "main.2f269bb3.js.map": "./static/js/main.2f269bb3.js.map"
9
9
  },
10
10
  "entrypoints": [
11
11
  "static/css/main.5061c4c3.css",
12
- "static/js/main.b76aeeb7.js"
12
+ "static/js/main.2f269bb3.js"
13
13
  ]
14
14
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Xinference</title><script defer="defer" src="./static/js/main.b76aeeb7.js"></script><link href="./static/css/main.5061c4c3.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>Xinference</title><script defer="defer" src="./static/js/main.2f269bb3.js"></script><link href="./static/css/main.5061c4c3.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>