xinference 1.4.1__py3-none-any.whl → 1.5.0.post1__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/api/restful_api.py +50 -1
- xinference/client/restful/restful_client.py +82 -2
- xinference/constants.py +3 -0
- xinference/core/chat_interface.py +297 -83
- xinference/core/model.py +1 -0
- xinference/core/progress_tracker.py +16 -8
- xinference/core/supervisor.py +45 -1
- xinference/core/worker.py +262 -37
- xinference/deploy/cmdline.py +33 -1
- xinference/model/audio/core.py +11 -1
- xinference/model/audio/megatts.py +105 -0
- xinference/model/audio/model_spec.json +24 -1
- xinference/model/audio/model_spec_modelscope.json +26 -1
- xinference/model/core.py +14 -0
- xinference/model/embedding/core.py +6 -1
- xinference/model/flexible/core.py +6 -1
- xinference/model/image/core.py +6 -1
- xinference/model/image/model_spec.json +17 -1
- xinference/model/image/model_spec_modelscope.json +17 -1
- xinference/model/llm/__init__.py +0 -4
- xinference/model/llm/core.py +4 -0
- xinference/model/llm/llama_cpp/core.py +40 -16
- xinference/model/llm/llm_family.json +415 -84
- xinference/model/llm/llm_family.py +24 -1
- xinference/model/llm/llm_family_modelscope.json +449 -0
- xinference/model/llm/mlx/core.py +16 -2
- xinference/model/llm/transformers/__init__.py +14 -0
- xinference/model/llm/transformers/core.py +30 -6
- xinference/model/llm/transformers/gemma3.py +17 -2
- xinference/model/llm/transformers/intern_vl.py +28 -18
- xinference/model/llm/transformers/minicpmv26.py +21 -2
- xinference/model/llm/transformers/qwen-omni.py +308 -0
- xinference/model/llm/transformers/qwen2_audio.py +1 -1
- xinference/model/llm/transformers/qwen2_vl.py +20 -4
- xinference/model/llm/utils.py +11 -1
- xinference/model/llm/vllm/core.py +35 -0
- xinference/model/llm/vllm/distributed_executor.py +8 -2
- xinference/model/rerank/core.py +6 -1
- xinference/model/utils.py +118 -1
- xinference/model/video/core.py +6 -1
- xinference/thirdparty/megatts3/__init__.py +0 -0
- xinference/thirdparty/megatts3/tts/frontend_function.py +175 -0
- xinference/thirdparty/megatts3/tts/gradio_api.py +93 -0
- xinference/thirdparty/megatts3/tts/infer_cli.py +277 -0
- xinference/thirdparty/megatts3/tts/modules/aligner/whisper_small.py +318 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/ar_dur_predictor.py +362 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/layers.py +64 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/nar_tts_modules.py +73 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/rel_transformer.py +403 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/rot_transformer.py +649 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/seq_utils.py +342 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/transformer.py +767 -0
- xinference/thirdparty/megatts3/tts/modules/llm_dit/cfm.py +309 -0
- xinference/thirdparty/megatts3/tts/modules/llm_dit/dit.py +180 -0
- xinference/thirdparty/megatts3/tts/modules/llm_dit/time_embedding.py +44 -0
- xinference/thirdparty/megatts3/tts/modules/llm_dit/transformer.py +230 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/decoder/diag_gaussian.py +67 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/decoder/hifigan_modules.py +283 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/decoder/seanet_encoder.py +38 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/decoder/wavvae_v3.py +60 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/encoder/common_modules/conv.py +154 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/encoder/common_modules/lstm.py +51 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/encoder/common_modules/seanet.py +126 -0
- xinference/thirdparty/megatts3/tts/utils/audio_utils/align.py +36 -0
- xinference/thirdparty/megatts3/tts/utils/audio_utils/io.py +95 -0
- xinference/thirdparty/megatts3/tts/utils/audio_utils/plot.py +90 -0
- xinference/thirdparty/megatts3/tts/utils/commons/ckpt_utils.py +171 -0
- xinference/thirdparty/megatts3/tts/utils/commons/hparams.py +215 -0
- xinference/thirdparty/megatts3/tts/utils/text_utils/dict.json +1 -0
- xinference/thirdparty/megatts3/tts/utils/text_utils/ph_tone_convert.py +94 -0
- xinference/thirdparty/megatts3/tts/utils/text_utils/split_text.py +90 -0
- xinference/thirdparty/megatts3/tts/utils/text_utils/text_encoder.py +280 -0
- xinference/types.py +10 -0
- xinference/utils.py +54 -0
- xinference/web/ui/build/asset-manifest.json +6 -6
- xinference/web/ui/build/index.html +1 -1
- xinference/web/ui/build/static/css/main.0f6523be.css +2 -0
- xinference/web/ui/build/static/css/main.0f6523be.css.map +1 -0
- xinference/web/ui/build/static/js/main.58bd483c.js +3 -0
- xinference/web/ui/build/static/js/main.58bd483c.js.map +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/3bff8cbe9141f937f4d98879a9771b0f48e0e4e0dbee8e647adbfe23859e7048.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/4500b1a622a031011f0a291701e306b87e08cbc749c50e285103536b85b6a914.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/51709f5d3e53bcf19e613662ef9b91fb9174942c5518987a248348dd4e1e0e02.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/69081049f0c7447544b7cfd73dd13d8846c02fe5febe4d81587e95c89a412d5b.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/b8551e9775a01b28ae674125c688febe763732ea969ae344512e64ea01bf632e.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/bf2b211b0d1b6465eff512d64c869d748f803c5651a7c24e48de6ea3484a7bfe.json +1 -0
- xinference/web/ui/src/locales/en.json +2 -1
- xinference/web/ui/src/locales/zh.json +2 -1
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/METADATA +129 -114
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/RECORD +96 -60
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/WHEEL +1 -1
- xinference/web/ui/build/static/css/main.b494ae7e.css +0 -2
- xinference/web/ui/build/static/css/main.b494ae7e.css.map +0 -1
- xinference/web/ui/build/static/js/main.5ca4eea1.js +0 -3
- xinference/web/ui/build/static/js/main.5ca4eea1.js.map +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/0f0967acaec5df1d45b80010949c258d64297ebbb0f44b8bb3afcbd45c6f0ec4.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/27bcada3ee8f89d21184b359f022fc965f350ffaca52c9814c29f1fc37121173.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/68249645124f37d01eef83b1d897e751f895bea919b6fb466f907c1f87cebc84.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/e547bbb18abb4a474b675a8d5782d25617566bea0af8caa9b836ce5649e2250a.json +0 -1
- /xinference/web/ui/build/static/js/{main.5ca4eea1.js.LICENSE.txt → main.58bd483c.js.LICENSE.txt} +0 -0
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/entry_points.txt +0 -0
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info/licenses}/LICENSE +0 -0
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# Copyright 2025 ByteDance and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import json
|
|
16
|
+
import re
|
|
17
|
+
import six
|
|
18
|
+
from six.moves import range # pylint: disable=redefined-builtin
|
|
19
|
+
|
|
20
|
+
PAD = "<pad>"
|
|
21
|
+
EOS = "<EOS>"
|
|
22
|
+
UNK = "<UNK>"
|
|
23
|
+
SEG = "|"
|
|
24
|
+
PUNCS = '!,.?;:'
|
|
25
|
+
RESERVED_TOKENS = [PAD, EOS, UNK]
|
|
26
|
+
NUM_RESERVED_TOKENS = len(RESERVED_TOKENS)
|
|
27
|
+
PAD_ID = RESERVED_TOKENS.index(PAD) # Normally 0
|
|
28
|
+
EOS_ID = RESERVED_TOKENS.index(EOS) # Normally 1
|
|
29
|
+
UNK_ID = RESERVED_TOKENS.index(UNK) # Normally 2
|
|
30
|
+
|
|
31
|
+
if six.PY2:
|
|
32
|
+
RESERVED_TOKENS_BYTES = RESERVED_TOKENS
|
|
33
|
+
else:
|
|
34
|
+
RESERVED_TOKENS_BYTES = [bytes(PAD, "ascii"), bytes(EOS, "ascii")]
|
|
35
|
+
|
|
36
|
+
# Regular expression for unescaping token strings.
|
|
37
|
+
# '\u' is converted to '_'
|
|
38
|
+
# '\\' is converted to '\'
|
|
39
|
+
# '\213;' is converted to unichr(213)
|
|
40
|
+
_UNESCAPE_REGEX = re.compile(r"\\u|\\\\|\\([0-9]+);")
|
|
41
|
+
_ESCAPE_CHARS = set(u"\\_u;0123456789")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def strip_ids(ids, ids_to_strip):
|
|
45
|
+
"""Strip ids_to_strip from the end ids."""
|
|
46
|
+
ids = list(ids)
|
|
47
|
+
while ids and ids[-1] in ids_to_strip:
|
|
48
|
+
ids.pop()
|
|
49
|
+
return ids
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class TextEncoder(object):
|
|
53
|
+
"""Base class for converting from ints to/from human readable strings."""
|
|
54
|
+
|
|
55
|
+
def __init__(self, num_reserved_ids=NUM_RESERVED_TOKENS):
|
|
56
|
+
self._num_reserved_ids = num_reserved_ids
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def num_reserved_ids(self):
|
|
60
|
+
return self._num_reserved_ids
|
|
61
|
+
|
|
62
|
+
def encode(self, s):
|
|
63
|
+
"""Transform a human-readable string into a sequence of int ids.
|
|
64
|
+
|
|
65
|
+
The ids should be in the range [num_reserved_ids, vocab_size). Ids [0,
|
|
66
|
+
num_reserved_ids) are reserved.
|
|
67
|
+
|
|
68
|
+
EOS is not appended.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
s: human-readable string to be converted.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
ids: list of integers
|
|
75
|
+
"""
|
|
76
|
+
return [int(w) + self._num_reserved_ids for w in s.split()]
|
|
77
|
+
|
|
78
|
+
def decode(self, ids, strip_extraneous=False):
|
|
79
|
+
"""Transform a sequence of int ids into a human-readable string.
|
|
80
|
+
|
|
81
|
+
EOS is not expected in ids.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
ids: list of integers to be converted.
|
|
85
|
+
strip_extraneous: bool, whether to strip off extraneous tokens
|
|
86
|
+
(EOS and PAD).
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
s: human-readable string.
|
|
90
|
+
"""
|
|
91
|
+
if strip_extraneous:
|
|
92
|
+
ids = strip_ids(ids, list(range(self._num_reserved_ids or 0)))
|
|
93
|
+
return " ".join(self.decode_list(ids))
|
|
94
|
+
|
|
95
|
+
def decode_list(self, ids):
|
|
96
|
+
"""Transform a sequence of int ids into a their string versions.
|
|
97
|
+
|
|
98
|
+
This method supports transforming individual input/output ids to their
|
|
99
|
+
string versions so that sequence to/from text conversions can be visualized
|
|
100
|
+
in a human readable format.
|
|
101
|
+
|
|
102
|
+
Args:
|
|
103
|
+
ids: list of integers to be converted.
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
strs: list of human-readable string.
|
|
107
|
+
"""
|
|
108
|
+
decoded_ids = []
|
|
109
|
+
for id_ in ids:
|
|
110
|
+
if 0 <= id_ < self._num_reserved_ids:
|
|
111
|
+
decoded_ids.append(RESERVED_TOKENS[int(id_)])
|
|
112
|
+
else:
|
|
113
|
+
decoded_ids.append(id_ - self._num_reserved_ids)
|
|
114
|
+
return [str(d) for d in decoded_ids]
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def vocab_size(self):
|
|
118
|
+
raise NotImplementedError()
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class TokenTextEncoder(TextEncoder):
|
|
122
|
+
"""Encoder based on a user-supplied vocabulary (file or list)."""
|
|
123
|
+
|
|
124
|
+
def __init__(self,
|
|
125
|
+
vocab_filename,
|
|
126
|
+
reverse=False,
|
|
127
|
+
vocab_list=None,
|
|
128
|
+
replace_oov=None,
|
|
129
|
+
num_reserved_ids=NUM_RESERVED_TOKENS):
|
|
130
|
+
"""Initialize from a file or list, one token per line.
|
|
131
|
+
|
|
132
|
+
Handling of reserved tokens works as follows:
|
|
133
|
+
- When initializing from a list, we add reserved tokens to the vocab.
|
|
134
|
+
- When initializing from a file, we do not add reserved tokens to the vocab.
|
|
135
|
+
- When saving vocab files, we save reserved tokens to the file.
|
|
136
|
+
|
|
137
|
+
Args:
|
|
138
|
+
vocab_filename: If not None, the full filename to read vocab from. If this
|
|
139
|
+
is not None, then vocab_list should be None.
|
|
140
|
+
reverse: Boolean indicating if tokens should be reversed during encoding
|
|
141
|
+
and decoding.
|
|
142
|
+
vocab_list: If not None, a list of elements of the vocabulary. If this is
|
|
143
|
+
not None, then vocab_filename should be None.
|
|
144
|
+
replace_oov: If not None, every out-of-vocabulary token seen when
|
|
145
|
+
encoding will be replaced by this string (which must be in vocab).
|
|
146
|
+
num_reserved_ids: Number of IDs to save for reserved tokens like <EOS>.
|
|
147
|
+
"""
|
|
148
|
+
super(TokenTextEncoder, self).__init__(num_reserved_ids=num_reserved_ids)
|
|
149
|
+
self._reverse = reverse
|
|
150
|
+
self._replace_oov = replace_oov
|
|
151
|
+
if vocab_filename:
|
|
152
|
+
self._init_vocab_from_file(vocab_filename)
|
|
153
|
+
else:
|
|
154
|
+
assert vocab_list is not None
|
|
155
|
+
self._init_vocab_from_list(vocab_list)
|
|
156
|
+
self.pad_index = self.token_to_id[PAD]
|
|
157
|
+
self.eos_index = self.token_to_id[EOS]
|
|
158
|
+
self.unk_index = self.token_to_id[UNK]
|
|
159
|
+
self.seg_index = self.token_to_id[SEG] if SEG in self.token_to_id else self.eos_index
|
|
160
|
+
|
|
161
|
+
def encode(self, s):
|
|
162
|
+
"""Converts a space-separated string of tokens to a list of ids."""
|
|
163
|
+
if isinstance(s, str):
|
|
164
|
+
sentence = s
|
|
165
|
+
tokens = sentence.strip().split()
|
|
166
|
+
else:
|
|
167
|
+
tokens = s
|
|
168
|
+
if self._replace_oov is not None:
|
|
169
|
+
tokens = [t if t in self.token_to_id else self._replace_oov
|
|
170
|
+
for t in tokens]
|
|
171
|
+
ret = [self.token_to_id[tok] for tok in tokens]
|
|
172
|
+
return ret[::-1] if self._reverse else ret
|
|
173
|
+
|
|
174
|
+
def decode(self, ids, strip_eos=False, strip_padding=False):
|
|
175
|
+
if strip_padding and self.pad() in list(ids):
|
|
176
|
+
pad_pos = list(ids).index(self.pad())
|
|
177
|
+
ids = ids[:pad_pos]
|
|
178
|
+
if strip_eos and self.eos() in list(ids):
|
|
179
|
+
eos_pos = list(ids).index(self.eos())
|
|
180
|
+
ids = ids[:eos_pos]
|
|
181
|
+
return " ".join(self.decode_list(ids))
|
|
182
|
+
|
|
183
|
+
def decode_list(self, ids):
|
|
184
|
+
seq = reversed(ids) if self._reverse else ids
|
|
185
|
+
return [self._safe_id_to_token(i) for i in seq]
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def vocab_size(self):
|
|
189
|
+
return len(self.id_to_token)
|
|
190
|
+
|
|
191
|
+
def __len__(self):
|
|
192
|
+
return self.vocab_size
|
|
193
|
+
|
|
194
|
+
def _safe_id_to_token(self, idx):
|
|
195
|
+
return self.id_to_token.get(idx, "ID_%d" % idx)
|
|
196
|
+
|
|
197
|
+
def _init_vocab_from_file(self, filename):
|
|
198
|
+
"""Load vocab from a file.
|
|
199
|
+
|
|
200
|
+
Args:
|
|
201
|
+
filename: The file to load vocabulary from.
|
|
202
|
+
"""
|
|
203
|
+
with open(filename) as f:
|
|
204
|
+
tokens = [token.strip() for token in f.readlines()]
|
|
205
|
+
|
|
206
|
+
def token_gen():
|
|
207
|
+
for token in tokens:
|
|
208
|
+
yield token
|
|
209
|
+
|
|
210
|
+
self._init_vocab(token_gen(), add_reserved_tokens=False)
|
|
211
|
+
|
|
212
|
+
def _init_vocab_from_list(self, vocab_list):
|
|
213
|
+
"""Initialize tokens from a list of tokens.
|
|
214
|
+
|
|
215
|
+
It is ok if reserved tokens appear in the vocab list. They will be
|
|
216
|
+
removed. The set of tokens in vocab_list should be unique.
|
|
217
|
+
|
|
218
|
+
Args:
|
|
219
|
+
vocab_list: A list of tokens.
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
def token_gen():
|
|
223
|
+
for token in vocab_list:
|
|
224
|
+
if token not in RESERVED_TOKENS:
|
|
225
|
+
yield token
|
|
226
|
+
|
|
227
|
+
self._init_vocab(token_gen())
|
|
228
|
+
|
|
229
|
+
def _init_vocab(self, token_generator, add_reserved_tokens=True):
|
|
230
|
+
"""Initialize vocabulary with tokens from token_generator."""
|
|
231
|
+
|
|
232
|
+
self.id_to_token = {}
|
|
233
|
+
non_reserved_start_index = 0
|
|
234
|
+
|
|
235
|
+
if add_reserved_tokens:
|
|
236
|
+
self.id_to_token.update(enumerate(RESERVED_TOKENS))
|
|
237
|
+
non_reserved_start_index = len(RESERVED_TOKENS)
|
|
238
|
+
|
|
239
|
+
self.id_to_token.update(
|
|
240
|
+
enumerate(token_generator, start=non_reserved_start_index))
|
|
241
|
+
|
|
242
|
+
# _token_to_id is the reverse of _id_to_token
|
|
243
|
+
self.token_to_id = dict((v, k) for k, v in six.iteritems(self.id_to_token))
|
|
244
|
+
|
|
245
|
+
def pad(self):
|
|
246
|
+
return self.pad_index
|
|
247
|
+
|
|
248
|
+
def eos(self):
|
|
249
|
+
return self.eos_index
|
|
250
|
+
|
|
251
|
+
def unk(self):
|
|
252
|
+
return self.unk_index
|
|
253
|
+
|
|
254
|
+
def seg(self):
|
|
255
|
+
return self.seg_index
|
|
256
|
+
|
|
257
|
+
def store_to_file(self, filename):
|
|
258
|
+
"""Write vocab file to disk.
|
|
259
|
+
|
|
260
|
+
Vocab files have one token per line. The file ends in a newline. Reserved
|
|
261
|
+
tokens are written to the vocab file as well.
|
|
262
|
+
|
|
263
|
+
Args:
|
|
264
|
+
filename: Full path of the file to store the vocab to.
|
|
265
|
+
"""
|
|
266
|
+
with open(filename, "w") as f:
|
|
267
|
+
for i in range(len(self.id_to_token)):
|
|
268
|
+
f.write(self.id_to_token[i] + "\n")
|
|
269
|
+
|
|
270
|
+
def sil_phonemes(self):
|
|
271
|
+
return [p for p in self.id_to_token.values() if is_sil_phoneme(p)]
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def build_token_encoder(token_list_file):
|
|
275
|
+
token_list = json.load(open(token_list_file))
|
|
276
|
+
return TokenTextEncoder(None, vocab_list=token_list, replace_oov='<UNK>')
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
def is_sil_phoneme(p):
|
|
280
|
+
return p == '' or not p[0].isalpha() or p == 'sil' or p == 'sp' or p == 'XX'
|
xinference/types.py
CHANGED
|
@@ -176,10 +176,18 @@ class Completion(TypedDict):
|
|
|
176
176
|
usage: CompletionUsage
|
|
177
177
|
|
|
178
178
|
|
|
179
|
+
class ChatCompletionAudio(TypedDict):
|
|
180
|
+
id: str
|
|
181
|
+
data: str
|
|
182
|
+
expires_at: int
|
|
183
|
+
transcript: str
|
|
184
|
+
|
|
185
|
+
|
|
179
186
|
class ChatCompletionMessage(TypedDict):
|
|
180
187
|
role: str
|
|
181
188
|
reasoning_content: NotRequired[str]
|
|
182
189
|
content: Optional[str]
|
|
190
|
+
audio: NotRequired[ChatCompletionAudio]
|
|
183
191
|
user: NotRequired[str]
|
|
184
192
|
tool_calls: NotRequired[List]
|
|
185
193
|
|
|
@@ -334,6 +342,8 @@ class PytorchModelConfig(TypedDict, total=False):
|
|
|
334
342
|
max_num_seqs: int
|
|
335
343
|
enable_tensorizer: Optional[bool]
|
|
336
344
|
reasoning_content: bool
|
|
345
|
+
min_pixels: NotRequired[int]
|
|
346
|
+
max_pixels: NotRequired[int]
|
|
337
347
|
|
|
338
348
|
|
|
339
349
|
def get_pydantic_model_from_method(
|
xinference/utils.py
CHANGED
|
@@ -12,9 +12,63 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
import os
|
|
16
|
+
import subprocess
|
|
17
|
+
import sys
|
|
18
|
+
from typing import Optional
|
|
19
|
+
|
|
15
20
|
|
|
16
21
|
def cuda_count():
|
|
17
22
|
import torch
|
|
18
23
|
|
|
19
24
|
# even if install torch cpu, this interface would return 0.
|
|
20
25
|
return torch.cuda.device_count()
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def get_real_path(path: str) -> Optional[str]:
|
|
29
|
+
# parsing soft links
|
|
30
|
+
if os.path.isdir(path):
|
|
31
|
+
files = os.listdir(path)
|
|
32
|
+
# dir has files
|
|
33
|
+
if files:
|
|
34
|
+
resolved_file = os.path.realpath(os.path.join(path, files[0]))
|
|
35
|
+
if resolved_file:
|
|
36
|
+
return os.path.dirname(resolved_file)
|
|
37
|
+
return None
|
|
38
|
+
else:
|
|
39
|
+
return os.path.realpath(path)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def get_pip_config_args() -> dict[str, str]:
|
|
43
|
+
"""
|
|
44
|
+
Parse pip config and return a dict with keys matching install_packages kwargs:
|
|
45
|
+
index_url, extra_index_url, find_links, trusted_host.
|
|
46
|
+
"""
|
|
47
|
+
key_map = {
|
|
48
|
+
"global.index-url": "index_url",
|
|
49
|
+
"global.extra-index-url": "extra_index_url",
|
|
50
|
+
"global.trusted-host": "trusted_host",
|
|
51
|
+
"global.find-links": "find_links",
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
try:
|
|
55
|
+
result = subprocess.run(
|
|
56
|
+
[sys.executable, "-m", "pip", "config", "list"],
|
|
57
|
+
capture_output=True,
|
|
58
|
+
text=True,
|
|
59
|
+
check=True,
|
|
60
|
+
)
|
|
61
|
+
args: dict[str, str] = {}
|
|
62
|
+
for line in result.stdout.splitlines():
|
|
63
|
+
if "=" not in line:
|
|
64
|
+
continue
|
|
65
|
+
raw_key, raw_value = line.split("=", 1)
|
|
66
|
+
key = raw_key.strip()
|
|
67
|
+
value = raw_value.strip().strip("'\"")
|
|
68
|
+
mapped_key = key_map.get(key)
|
|
69
|
+
if mapped_key and value:
|
|
70
|
+
args[mapped_key] = value
|
|
71
|
+
|
|
72
|
+
return args
|
|
73
|
+
except subprocess.CalledProcessError:
|
|
74
|
+
return {}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"main.css": "./static/css/main.
|
|
4
|
-
"main.js": "./static/js/main.
|
|
3
|
+
"main.css": "./static/css/main.0f6523be.css",
|
|
4
|
+
"main.js": "./static/js/main.58bd483c.js",
|
|
5
5
|
"static/media/icon.webp": "./static/media/icon.4603d52c63041e5dfbfd.webp",
|
|
6
6
|
"index.html": "./index.html",
|
|
7
|
-
"main.
|
|
8
|
-
"main.
|
|
7
|
+
"main.0f6523be.css.map": "./static/css/main.0f6523be.css.map",
|
|
8
|
+
"main.58bd483c.js.map": "./static/js/main.58bd483c.js.map"
|
|
9
9
|
},
|
|
10
10
|
"entrypoints": [
|
|
11
|
-
"static/css/main.
|
|
12
|
-
"static/js/main.
|
|
11
|
+
"static/css/main.0f6523be.css",
|
|
12
|
+
"static/js/main.58bd483c.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.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>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.container{cursor:pointer;display:block}.container,.descriptionCard{border-radius:20px;height:300px;position:relative;width:300px}.descriptionCard{left:-1px;padding:20px;top:-1px}.cardTitle{display:flex;justify-content:space-between}.iconButtonBox{align-items:center;display:flex}.drawerCard{min-height:100%;padding:20px 80px 0;position:relative;width:60vw}.p{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;font-size:14px;overflow:hidden;padding:0 10px;text-overflow:ellipsis;word-break:break-word}.pasteText{color:#1976d2;cursor:pointer;font-size:18px!important;margin-inline:10px}.pasteText:hover{color:#1976d2b3}.copyToCommandLine{color:#1976d2;cursor:pointer;font-size:16px!important}.copyToCommandLine:hover{color:#1976d2b3}.formContainer{height:80%;overflow:scroll;padding:0 10px 160px}.buttonsContainer{bottom:50px;left:100px;position:absolute;right:100px}.buttons{align-items:center;display:flex;gap:20px;justify-content:space-between}.css-1be5mm1-MuiLinearProgress-root-MuiMobileStepper-progress,.css-r5rjnf-MuiLinearProgress-root-MuiMobileStepper-progress{width:100%!important}.instructionText{color:#666;font-size:12px;font-style:italic;margin:30px 0;text-align:center}.iconRow{bottom:20px;justify-content:space-between;left:20px;position:absolute;right:20px}.iconItem,.iconRow{align-items:center;display:flex}.iconItem{flex-direction:column;margin:20px}.boldIconText{font-size:1.2em;font-weight:700}.muiIcon{font-size:1.5em}.smallText{font-size:.8em}.dialogBox{height:607px;margin:32px;overflow-x:scroll;width:1241px}.dialogTitle{display:flex;justify-content:space-between;padding:20px 20px 7px}.dialogTitle-model_name{font-size:18px;font-weight:700}.pathBox{cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:160px}.pathBox2{width:300px}.empty{color:#555;font-size:20px;left:50%;position:absolute;top:30%;-webkit-transform:translate(-50%);transform:translate(-50%)}.deleteDialog{align-items:center;display:flex}.warningIcon{color:#ed6c02;margin-right:10px}.jsonDialog{border-radius:8px;color:#000;display:flex;flex-direction:column;padding:10px 30px}.jsonDialog-title{align-items:center;display:flex;justify-content:space-between;margin:10px 0 20px}.title-name{font-size:16px;font-weight:700}.main-box{height:500px;width:700px}.but-box{display:flex;justify-content:end;margin-top:20px}.drawer{bottom:0;left:0;opacity:0;position:fixed;right:0;top:0;transition:visibility .3s ease,opacity .3s ease;visibility:hidden;z-index:1000}.drawer.open{opacity:1;visibility:visible}.drawer-overlay{background-color:rgba(0,0,0,.5);left:0;z-index:999}.drawer-content,.drawer-overlay{bottom:0;position:absolute;right:0;top:0}.drawer-content{background-color:#fff;box-shadow:-2px 0 10px rgba(0,0,0,.1);overflow-y:auto;-webkit-transform:translateX(100%);transform:translateX(100%);transition:-webkit-transform .3s ease;transition:transform .3s ease;transition:transform .3s ease,-webkit-transform .3s ease;z-index:1000}.drawer.open .drawer-content{-webkit-transform:translateX(0);transform:translateX(0)}.copyText{color:#666;cursor:pointer;font-size:14px!important}.copyText:hover{color:#1976d2}.formBox{max-height:80vh;max-width:50vw;min-width:50vw;overflow:auto;padding:40px 20px 0 0;position:relative;transition:all .4s ease-in-out}.broaden{max-width:100%;min-width:100%;padding-right:0}.show-json{align-items:center;display:flex;right:60px;top:90px}.icon,.show-json{position:absolute}.icon{cursor:pointer;margin-left:20px;right:-40px}.icon:hover{color:#1976d2}.arrow{font-size:24px!important}.jsonBox{min-height:80vh;position:relative;transition:all .4s ease-in-out;width:100%}.hide{overflow:hidden;-webkit-transform:translate(30vw);transform:translate(30vw);width:0}.checkboxWrapper{align-items:center;display:flex;flex-wrap:wrap;width:100%}.jsonBox-header{align-items:center;display:flex;justify-content:space-between}.jsonBox-title{font-weight:700;line-height:40px}.textarea{background-color:initial;border:1px solid #ddd;border-radius:5px;color:#666;height:calc(100% - 40px);padding:5px 10px;resize:none;width:100%}.addBtn{margin-left:20px!important}.item{border:1px solid #ddd;border-radius:10px;margin:10px 50px 0;overflow:hidden;padding:20px;position:relative}.item:hover .deleteBtn{-webkit-transform:translateX(-50px);transform:translateX(-50px)}.deleteBtn{background-color:#1976d2;border-radius:25px;height:50px;line-height:70px;position:absolute;right:20px;text-align:center;top:calc(50% - 25px);-webkit-transform:translateX(80px);transform:translateX(80px);transition:all .3s ease-in-out;width:50px}.deleteBtn:hover{box-shadow:0 0 10px #aaa;cursor:pointer}.deleteIcon{color:#fff;font-size:28px!important}.chat_template_box{align-items:start;display:flex;gap:10px}.chat_template_test{width:30%}.chat_template_test_mainBox{border:1px solid #ccc;border-radius:4px;height:137px;overflow:scroll;padding:10px}.chat_template_test_tip{color:rgba(0,0,0,.6);font-size:10px;margin:4px 14px 0}.test_res_box{border:1px solid #ddd;border-radius:4px;margin-top:5px;min-height:55px;padding:10px}.css-19qh8xo-MuiInputBase-input-MuiOutlinedInput-input.Mui-disabled{-webkit-text-fill-color:#000!important}
|
|
2
|
+
/*# sourceMappingURL=main.0f6523be.css.map*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/css/main.0f6523be.css","mappings":"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","sources":["scenes/launch_model/styles/modelCardStyle.css","components/copyComponent/style.css","scenes/register_model/styles/registerModelStyle.css"],"sourcesContent":[".container {\n display: block;\n position: relative;\n width: 300px;\n height: 300px;\n cursor: pointer;\n border-radius: 20px;\n}\n.descriptionCard {\n position: relative;\n top: -1px;\n left: -1px;\n width: 300px;\n height: 300px;\n padding: 20px;\n border-radius: 20px;\n}\n.cardTitle {\n display: flex;\n justify-content: space-between;\n}\n.iconButtonBox {\n display: flex;\n align-items: center;\n}\n.drawerCard {\n position: relative;\n padding: 20px 80px 0;\n min-height: 100%;\n width: 60vw;\n}\n.p {\n display: -webkit-box;\n -webkit-line-clamp: 4;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n font-size: 14px;\n padding: 0px 10px;\n}\n.pasteText {\n font-size: 18px !important;\n color: #1976d2;\n cursor: pointer;\n margin-inline: 10px;\n}\n.pasteText:hover {\n color: #1976d2b3;\n}\n.copyToCommandLine {\n font-size: 16px !important;\n color: #1976d2;\n cursor: pointer;\n}\n.copyToCommandLine:hover {\n color: #1976d2b3;\n}\n.formContainer {\n height: 80%;\n overflow: scroll;\n padding: 0 10px;\n padding-bottom: 160px;\n}\n.buttonsContainer {\n position: absolute;\n bottom: 50px;\n left: 100px;\n right: 100px;\n}\n.buttons {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n}\n.css-1be5mm1-MuiLinearProgress-root-MuiMobileStepper-progress {\n width: 100% !important;\n}\n.css-r5rjnf-MuiLinearProgress-root-MuiMobileStepper-progress {\n width: 100% !important;\n}\n.instructionText {\n font-size: 12px;\n color: #666666;\n font-style: italic;\n margin: 30px 0;\n text-align: center;\n}\n.iconRow {\n position: absolute;\n bottom: 20px;\n left: 20px;\n right: 20px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.iconItem {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 20px;\n}\n.boldIconText {\n font-weight: bold;\n font-size: 1.2em;\n}\n.muiIcon {\n font-size: 1.5em;\n}\n.smallText {\n font-size: 0.8em;\n}\n.dialogBox {\n width: 1241px;\n height: 607px;\n margin: 32px;\n overflow-x: scroll;\n}\n.dialogTitle {\n display: flex;\n justify-content: space-between;\n padding: 20px 20px 7px;\n}\n.dialogTitle-model_name {\n font-size: 18px;\n font-weight: 700;\n}\n.pathBox {\n width: 160px;\n cursor: pointer;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.pathBox2 {\n width: 300px;\n}\n.empty {\n position: absolute;\n left: 50%;\n top: 30%;\n font-size: 20px;\n color: #555;\n transform: translate(-50%, 0);\n}\n.deleteDialog {\n display: flex;\n align-items: center;\n}\n.warningIcon {\n margin-right: 10px;\n color: rgb(237, 108, 2);\n}\n.jsonDialog {\n display: flex;\n flex-direction: column;\n padding: 10px 30px;\n color: #000;\n border-radius: 8px;\n}\n.jsonDialog-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 10px 0 20px 0;\n}\n.title-name {\n font-size: 16px;\n font-weight: 700;\n}\n.main-box {\n width: 700px;\n height: 500px;\n}\n.but-box {\n display: flex;\n justify-content: end;\n margin-top: 20px;\n}\n.drawer {\n z-index: 1000;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n visibility: hidden;\n opacity: 0;\n transition: visibility 0.3s ease, opacity 0.3s ease;\n}\n.drawer.open {\n visibility: visible;\n opacity: 1;\n}\n.drawer-overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 999;\n}\n.drawer-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: white;\n z-index: 1000;\n box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);\n transition: transform 0.3s ease;\n transform: translateX(100%);\n overflow-y: auto;\n}\n.drawer.open .drawer-content {\n transform: translateX(0);\n}\n",".copyText {\n font-size: 14px !important;\n color: #666;\n cursor: pointer;\n}\n\n.copyText:hover {\n color: #1976d2;\n}\n",".formBox {\n position: relative;\n max-width: 50vw;\n min-width: 50vw;\n max-height: 80vh;\n overflow: auto;\n padding: 40px 20px 0 0;\n transition: all 0.4s ease-in-out;\n}\n\n.broaden {\n max-width: 100%;\n min-width: 100%;\n padding-right: 0;\n}\n\n.show-json {\n display: flex;\n align-items: center;\n position: absolute;\n top: 90px;\n right: 60px;\n}\n\n.icon {\n position: absolute;\n right: -40px;\n cursor: pointer;\n margin-left: 20px;\n}\n\n.icon:hover {\n color: #1976d2;\n}\n\n.arrow {\n font-size: 24px !important;\n}\n\n.jsonBox {\n position: relative;\n min-height: 80vh;\n width: 100%;\n transition: all 0.4s ease-in-out;\n}\n\n.hide {\n width: 0;\n transform: translate(30vw, 0);\n overflow: hidden;\n}\n\n.checkboxWrapper {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n}\n\n.jsonBox-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.jsonBox-title {\n line-height: 40px;\n font-weight: 700;\n}\n\n.textarea {\n width: 100%;\n height: calc(100% - 40px);\n padding: 5px 10px;\n border: 1px solid #ddd;\n border-radius: 5px;\n resize: none;\n color: #666;\n background-color: transparent;\n}\n\n.addBtn {\n margin-left: 20px !important;\n}\n\n.item {\n position: relative;\n border: 1px solid #ddd;\n margin: 10px 50px 0;\n padding: 20px;\n border-radius: 10px;\n overflow: hidden;\n}\n\n.item:hover .deleteBtn {\n transform: translateX(-50px);\n}\n\n.deleteBtn {\n position: absolute;\n right: 20px;\n top: calc(50% - 25px);\n width: 50px;\n height: 50px;\n transform: translateX(80px);\n text-align: center;\n line-height: 70px;\n border-radius: 25px;\n background-color: #1976d2;\n transition: all 0.3s ease-in-out;\n}\n\n.deleteBtn:hover {\n cursor: pointer;\n box-shadow: 0 0 10px #aaa;\n}\n\n.deleteIcon {\n font-size: 28px !important;\n color: #fff;\n}\n\n.chat_template_box {\n display: flex;\n align-items: start;\n gap: 10px;\n}\n\n.chat_template_test {\n width: 30%;\n}\n\n.chat_template_test_mainBox {\n height: 137px;\n padding: 10px;\n border: 1px solid #ccc;\n border-radius: 4px;\n overflow: scroll;\n}\n\n.chat_template_test_tip {\n font-size: 10px;\n margin: 4px 14px 0;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.test_res_box {\n border: 1px solid #ddd;\n min-height: 55px;\n padding: 10px;\n margin-top: 5px;\n border-radius: 4px;\n}\n\n.css-19qh8xo-MuiInputBase-input-MuiOutlinedInput-input.Mui-disabled {\n -webkit-text-fill-color: #000 !important;\n}\n"],"names":[],"sourceRoot":""}
|