xinference 0.16.1__py3-none-any.whl → 0.16.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.
- xinference/_version.py +3 -3
- xinference/constants.py +1 -0
- xinference/core/worker.py +3 -1
- xinference/model/audio/core.py +6 -2
- xinference/model/core.py +3 -1
- xinference/model/embedding/core.py +6 -2
- xinference/model/image/core.py +6 -2
- xinference/model/image/ocr/got_ocr2.py +3 -0
- xinference/model/llm/__init__.py +33 -0
- xinference/model/llm/core.py +3 -1
- xinference/model/llm/llm_family.py +68 -2
- xinference/model/llm/llm_family_openmind_hub.json +1359 -0
- xinference/model/rerank/core.py +9 -1
- xinference/model/utils.py +7 -0
- xinference/model/video/core.py +6 -2
- xinference/web/ui/build/asset-manifest.json +3 -3
- xinference/web/ui/build/index.html +1 -1
- xinference/web/ui/build/static/js/{main.b76aeeb7.js → main.2f269bb3.js} +3 -3
- xinference/web/ui/build/static/js/main.2f269bb3.js.map +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/1f269fb2a368363c1cb2237825f1dba093b6bdd8c44cc05954fd19ec2c1fff03.json +1 -0
- {xinference-0.16.1.dist-info → xinference-0.16.2.dist-info}/METADATA +2 -2
- {xinference-0.16.1.dist-info → xinference-0.16.2.dist-info}/RECORD +27 -26
- xinference/web/ui/build/static/js/main.b76aeeb7.js.map +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/32ea2c04cf0bba2761b4883d2c40cc259952c94d2d6bb774e510963ca37aac0a.json +0 -1
- /xinference/web/ui/build/static/js/{main.b76aeeb7.js.LICENSE.txt → main.2f269bb3.js.LICENSE.txt} +0 -0
- {xinference-0.16.1.dist-info → xinference-0.16.2.dist-info}/LICENSE +0 -0
- {xinference-0.16.1.dist-info → xinference-0.16.2.dist-info}/WHEEL +0 -0
- {xinference-0.16.1.dist-info → xinference-0.16.2.dist-info}/entry_points.txt +0 -0
- {xinference-0.16.1.dist-info → xinference-0.16.2.dist-info}/top_level.txt +0 -0
xinference/model/rerank/core.py
CHANGED
|
@@ -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[
|
|
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
|
xinference/model/video/core.py
CHANGED
|
@@ -97,7 +97,9 @@ def generate_video_description(
|
|
|
97
97
|
|
|
98
98
|
def match_diffusion(
|
|
99
99
|
model_name: str,
|
|
100
|
-
download_hub: Optional[
|
|
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[
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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>
|