xinference 0.13.0__py3-none-any.whl → 0.13.2__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 (70) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +123 -3
  3. xinference/client/restful/restful_client.py +131 -2
  4. xinference/core/model.py +93 -24
  5. xinference/core/supervisor.py +132 -15
  6. xinference/core/worker.py +165 -8
  7. xinference/deploy/cmdline.py +5 -0
  8. xinference/model/audio/chattts.py +46 -14
  9. xinference/model/audio/core.py +23 -15
  10. xinference/model/core.py +12 -3
  11. xinference/model/embedding/core.py +25 -16
  12. xinference/model/flexible/__init__.py +40 -0
  13. xinference/model/flexible/core.py +228 -0
  14. xinference/model/flexible/launchers/__init__.py +15 -0
  15. xinference/model/flexible/launchers/transformers_launcher.py +63 -0
  16. xinference/model/flexible/utils.py +33 -0
  17. xinference/model/image/core.py +21 -14
  18. xinference/model/image/custom.py +1 -1
  19. xinference/model/image/model_spec.json +14 -0
  20. xinference/model/image/stable_diffusion/core.py +43 -6
  21. xinference/model/llm/__init__.py +0 -2
  22. xinference/model/llm/core.py +3 -2
  23. xinference/model/llm/ggml/llamacpp.py +1 -10
  24. xinference/model/llm/llm_family.json +292 -36
  25. xinference/model/llm/llm_family.py +97 -52
  26. xinference/model/llm/llm_family_modelscope.json +220 -27
  27. xinference/model/llm/pytorch/core.py +0 -80
  28. xinference/model/llm/sglang/core.py +7 -2
  29. xinference/model/llm/utils.py +4 -2
  30. xinference/model/llm/vllm/core.py +3 -0
  31. xinference/model/rerank/core.py +24 -25
  32. xinference/types.py +0 -1
  33. xinference/web/ui/build/asset-manifest.json +3 -3
  34. xinference/web/ui/build/index.html +1 -1
  35. xinference/web/ui/build/static/js/{main.0fb6f3ab.js → main.95c1d652.js} +3 -3
  36. xinference/web/ui/build/static/js/main.95c1d652.js.map +1 -0
  37. xinference/web/ui/node_modules/.cache/babel-loader/07ce9e632e6aff24d7aa3ad8e48224433bbfeb0d633fca723453f1fcae0c9f1c.json +1 -0
  38. xinference/web/ui/node_modules/.cache/babel-loader/40f17338fc75ae095de7d2b4d8eae0d5ca0193a7e2bcece4ee745b22a7a2f4b7.json +1 -0
  39. xinference/web/ui/node_modules/.cache/babel-loader/5262556baf9207738bf6a8ba141ec6599d0a636345c245d61fdf88d3171998cb.json +1 -0
  40. xinference/web/ui/node_modules/.cache/babel-loader/709711edada3f1596b309d571285fd31f1c364d66f4425bc28723d0088cc351a.json +1 -0
  41. xinference/web/ui/node_modules/.cache/babel-loader/70fa8c07463a5fe57c68bf92502910105a8f647371836fe8c3a7408246ca7ba0.json +1 -0
  42. xinference/web/ui/node_modules/.cache/babel-loader/f3e02274cb1964e99b1fe69cbb6db233d3d8d7dd05d50ebcdb8e66d50b224b7b.json +1 -0
  43. {xinference-0.13.0.dist-info → xinference-0.13.2.dist-info}/METADATA +9 -11
  44. {xinference-0.13.0.dist-info → xinference-0.13.2.dist-info}/RECORD +49 -58
  45. xinference/model/llm/ggml/chatglm.py +0 -457
  46. xinference/thirdparty/ChatTTS/__init__.py +0 -1
  47. xinference/thirdparty/ChatTTS/core.py +0 -200
  48. xinference/thirdparty/ChatTTS/experimental/__init__.py +0 -0
  49. xinference/thirdparty/ChatTTS/experimental/llm.py +0 -40
  50. xinference/thirdparty/ChatTTS/infer/__init__.py +0 -0
  51. xinference/thirdparty/ChatTTS/infer/api.py +0 -125
  52. xinference/thirdparty/ChatTTS/model/__init__.py +0 -0
  53. xinference/thirdparty/ChatTTS/model/dvae.py +0 -155
  54. xinference/thirdparty/ChatTTS/model/gpt.py +0 -265
  55. xinference/thirdparty/ChatTTS/utils/__init__.py +0 -0
  56. xinference/thirdparty/ChatTTS/utils/gpu_utils.py +0 -23
  57. xinference/thirdparty/ChatTTS/utils/infer_utils.py +0 -141
  58. xinference/thirdparty/ChatTTS/utils/io_utils.py +0 -14
  59. xinference/web/ui/build/static/js/main.0fb6f3ab.js.map +0 -1
  60. xinference/web/ui/node_modules/.cache/babel-loader/0f6b391abec76271137faad13a3793fe7acc1024e8cd2269c147b653ecd3a73b.json +0 -1
  61. xinference/web/ui/node_modules/.cache/babel-loader/30a0c79d8025d6441eb75b2df5bc2750a14f30119c869ef02570d294dff65c2f.json +0 -1
  62. xinference/web/ui/node_modules/.cache/babel-loader/40486e655c3c5801f087e2cf206c0b5511aaa0dfdba78046b7181bf9c17e54c5.json +0 -1
  63. xinference/web/ui/node_modules/.cache/babel-loader/b5507cd57f16a3a230aa0128e39fe103e928de139ea29e2679e4c64dcbba3b3a.json +0 -1
  64. xinference/web/ui/node_modules/.cache/babel-loader/d779b915f83f9c7b5a72515b6932fdd114f1822cef90ae01cc0d12bca59abc2d.json +0 -1
  65. xinference/web/ui/node_modules/.cache/babel-loader/d87824cb266194447a9c0c69ebab2d507bfc3e3148976173760d18c035e9dd26.json +0 -1
  66. /xinference/web/ui/build/static/js/{main.0fb6f3ab.js.LICENSE.txt → main.95c1d652.js.LICENSE.txt} +0 -0
  67. {xinference-0.13.0.dist-info → xinference-0.13.2.dist-info}/LICENSE +0 -0
  68. {xinference-0.13.0.dist-info → xinference-0.13.2.dist-info}/WHEEL +0 -0
  69. {xinference-0.13.0.dist-info → xinference-0.13.2.dist-info}/entry_points.txt +0 -0
  70. {xinference-0.13.0.dist-info → xinference-0.13.2.dist-info}/top_level.txt +0 -0
@@ -18,7 +18,7 @@ import os
18
18
  import uuid
19
19
  from collections import defaultdict
20
20
  from collections.abc import Sequence
21
- from typing import Dict, List, Optional, Tuple
21
+ from typing import Dict, List, Literal, Optional, Tuple
22
22
 
23
23
  import numpy as np
24
24
  import torch
@@ -285,7 +285,12 @@ def cache(model_spec: RerankModelSpec):
285
285
 
286
286
 
287
287
  def create_rerank_model_instance(
288
- subpool_addr: str, devices: List[str], model_uid: str, model_name: str, **kwargs
288
+ subpool_addr: str,
289
+ devices: List[str],
290
+ model_uid: str,
291
+ model_name: str,
292
+ download_hub: Optional[Literal["huggingface", "modelscope", "csghub"]] = None,
293
+ **kwargs,
289
294
  ) -> Tuple[RerankModel, RerankModelDescription]:
290
295
  from ..utils import download_from_modelscope
291
296
  from . import BUILTIN_RERANK_MODELS, MODELSCOPE_RERANK_MODELS
@@ -298,30 +303,24 @@ def create_rerank_model_instance(
298
303
  break
299
304
 
300
305
  if model_spec is None:
301
- if download_from_modelscope():
302
- if model_name in MODELSCOPE_RERANK_MODELS:
303
- logger.debug(f"Rerank model {model_name} found in ModelScope.")
304
- model_spec = MODELSCOPE_RERANK_MODELS[model_name]
305
- else:
306
- logger.debug(
307
- f"Rerank model {model_name} not found in ModelScope, "
308
- f"now try to download from huggingface."
309
- )
310
- if model_name in BUILTIN_RERANK_MODELS:
311
- model_spec = BUILTIN_RERANK_MODELS[model_name]
312
- else:
313
- raise ValueError(
314
- f"Rerank model {model_name} not found, available"
315
- f"model list: {BUILTIN_RERANK_MODELS.keys()}"
316
- )
306
+ if download_hub == "huggingface" and model_name in BUILTIN_RERANK_MODELS:
307
+ logger.debug(f"Rerank model {model_name} found in Huggingface.")
308
+ model_spec = BUILTIN_RERANK_MODELS[model_name]
309
+ elif download_hub == "modelscope" and model_name in MODELSCOPE_RERANK_MODELS:
310
+ logger.debug(f"Rerank model {model_name} found in ModelScope.")
311
+ model_spec = MODELSCOPE_RERANK_MODELS[model_name]
312
+ elif download_from_modelscope() and model_name in MODELSCOPE_RERANK_MODELS:
313
+ logger.debug(f"Rerank model {model_name} found in ModelScope.")
314
+ model_spec = MODELSCOPE_RERANK_MODELS[model_name]
315
+ elif model_name in BUILTIN_RERANK_MODELS:
316
+ logger.debug(f"Rerank model {model_name} found in Huggingface.")
317
+ model_spec = BUILTIN_RERANK_MODELS[model_name]
317
318
  else:
318
- if model_name in BUILTIN_RERANK_MODELS:
319
- model_spec = BUILTIN_RERANK_MODELS[model_name]
320
- else:
321
- raise ValueError(
322
- f"Rerank model {model_name} not found, available"
323
- f"model list: {BUILTIN_RERANK_MODELS.keys()}"
324
- )
319
+ raise ValueError(
320
+ f"Rerank model {model_name} not found, available"
321
+ f"Huggingface: {BUILTIN_RERANK_MODELS.keys()}"
322
+ f"ModelScope: {MODELSCOPE_RERANK_MODELS.keys()}"
323
+ )
325
324
 
326
325
  model_path = cache(model_spec)
327
326
  use_fp16 = kwargs.pop("use_fp16", False)
xinference/types.py CHANGED
@@ -285,7 +285,6 @@ class LlamaCppModelConfig(TypedDict, total=False):
285
285
  vocab_only: bool
286
286
  use_mmap: bool
287
287
  use_mlock: bool
288
- embedding: bool
289
288
  n_threads: Optional[int]
290
289
  n_batch: int
291
290
  last_n_tokens_size: int
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.4bafd904.css",
4
- "main.js": "./static/js/main.0fb6f3ab.js",
4
+ "main.js": "./static/js/main.95c1d652.js",
5
5
  "static/media/icon.webp": "./static/media/icon.4603d52c63041e5dfbfd.webp",
6
6
  "index.html": "./index.html",
7
7
  "main.4bafd904.css.map": "./static/css/main.4bafd904.css.map",
8
- "main.0fb6f3ab.js.map": "./static/js/main.0fb6f3ab.js.map"
8
+ "main.95c1d652.js.map": "./static/js/main.95c1d652.js.map"
9
9
  },
10
10
  "entrypoints": [
11
11
  "static/css/main.4bafd904.css",
12
- "static/js/main.0fb6f3ab.js"
12
+ "static/js/main.95c1d652.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.0fb6f3ab.js"></script><link href="./static/css/main.4bafd904.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.95c1d652.js"></script><link href="./static/css/main.4bafd904.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>