xinference 1.5.0__py3-none-any.whl → 1.5.0.post2__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 CHANGED
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-04-19T20:32:22+0800",
11
+ "date": "2025-04-21T17:53:44+0800",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "ee8d025e1c046b22b3b148e5e97c0e107c979ee3",
15
- "version": "1.5.0"
14
+ "full-revisionid": "a5d4be9f970137bde1d402420f71961826392224",
15
+ "version": "1.5.0.post2"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -1356,7 +1356,12 @@ class SupervisorActor(xo.StatelessActor):
1356
1356
  return model_uid
1357
1357
 
1358
1358
  async def get_launch_builtin_model_progress(self, model_uid: str) -> float:
1359
- info = self._model_uid_to_replica_info[model_uid]
1359
+ try:
1360
+ info = self._model_uid_to_replica_info[model_uid]
1361
+ except KeyError:
1362
+ # Not launched perhaps, just return 0.0 to prevent error
1363
+ return 0.0
1364
+
1360
1365
  all_progress = 0.0
1361
1366
  i = 0
1362
1367
  for rep_model_uid in iter_replica_model_uid(model_uid, info.replica):
@@ -1370,7 +1375,11 @@ class SupervisorActor(xo.StatelessActor):
1370
1375
  return all_progress / i if i > 0 else 0.0
1371
1376
 
1372
1377
  async def cancel_launch_builtin_model(self, model_uid: str):
1373
- info = self._model_uid_to_replica_info[model_uid]
1378
+ try:
1379
+ info = self._model_uid_to_replica_info[model_uid]
1380
+ except KeyError:
1381
+ raise RuntimeError(f"Model {model_uid} has not been launched yet")
1382
+
1374
1383
  coros = []
1375
1384
  for i, rep_model_uid in enumerate(
1376
1385
  iter_replica_model_uid(model_uid, info.replica)
@@ -7946,7 +7946,9 @@
7946
7946
  "virtualenv": {
7947
7947
  "packages": [
7948
7948
  "git+https://github.com/huggingface/transformers@v4.51.3-Qwen2.5-Omni-preview",
7949
- "numpy==1.26.4"
7949
+ "numpy==1.26.4",
7950
+ "qwen_omni_utils",
7951
+ "soundfile"
7950
7952
  ]
7951
7953
  }
7952
7954
  },
@@ -5704,7 +5704,9 @@
5704
5704
  "virtualenv": {
5705
5705
  "packages": [
5706
5706
  "git+https://github.com/huggingface/transformers@v4.51.3-Qwen2.5-Omni-preview",
5707
- "numpy==1.26.4"
5707
+ "numpy==1.26.4",
5708
+ "qwen_omni_utils",
5709
+ "soundfile"
5708
5710
  ]
5709
5711
  }
5710
5712
  },
@@ -128,7 +128,12 @@ class Gemma3ChatModel(PytorchChatModel):
128
128
  ).to(self._device)
129
129
  input_len = inputs["input_ids"].shape[-1]
130
130
 
131
- generation = self._model.generate(**inputs, do_sample=False)
131
+ generation = self._model.generate(
132
+ **inputs,
133
+ do_sample=False,
134
+ max_new_tokens=config.get("max_tokens", 512),
135
+ temperature=config.get("temperature", 1),
136
+ )
132
137
  generation = generation[0][input_len:]
133
138
 
134
139
  decoded = self._processor.decode(generation, skip_special_tokens=True)
@@ -159,7 +164,11 @@ class Gemma3ChatModel(PytorchChatModel):
159
164
 
160
165
  def model_generate():
161
166
  try:
162
- return self._model.generate(**gen_kwargs)
167
+ return self._model.generate(
168
+ **gen_kwargs,
169
+ max_new_tokens=config.get("max_tokens", 512),
170
+ temperature=config.get("temperature", 1),
171
+ )
163
172
  except Exception:
164
173
  nonlocal error
165
174
  error = sys.exc_info()
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.0f6523be.css",
4
- "main.js": "./static/js/main.58bd483c.js",
4
+ "main.js": "./static/js/main.4b67a723.js",
5
5
  "static/media/icon.webp": "./static/media/icon.4603d52c63041e5dfbfd.webp",
6
6
  "index.html": "./index.html",
7
7
  "main.0f6523be.css.map": "./static/css/main.0f6523be.css.map",
8
- "main.58bd483c.js.map": "./static/js/main.58bd483c.js.map"
8
+ "main.4b67a723.js.map": "./static/js/main.4b67a723.js.map"
9
9
  },
10
10
  "entrypoints": [
11
11
  "static/css/main.0f6523be.css",
12
- "static/js/main.58bd483c.js"
12
+ "static/js/main.4b67a723.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.58bd483c.js"></script><link href="./static/css/main.0f6523be.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.4b67a723.js"></script><link href="./static/css/main.0f6523be.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>