xinference 0.14.1.post1__py3-none-any.whl → 0.14.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.
- xinference/_version.py +3 -3
- xinference/api/restful_api.py +15 -34
- xinference/client/restful/restful_client.py +2 -2
- xinference/core/chat_interface.py +45 -10
- xinference/core/image_interface.py +9 -0
- xinference/core/model.py +8 -5
- xinference/core/scheduler.py +1 -2
- xinference/core/worker.py +49 -42
- xinference/deploy/cmdline.py +2 -2
- xinference/deploy/test/test_cmdline.py +7 -7
- xinference/model/audio/chattts.py +24 -9
- xinference/model/audio/core.py +8 -2
- xinference/model/audio/fish_speech.py +228 -0
- xinference/model/audio/model_spec.json +8 -0
- xinference/model/embedding/core.py +23 -1
- xinference/model/image/model_spec.json +2 -1
- xinference/model/image/model_spec_modelscope.json +2 -1
- xinference/model/image/stable_diffusion/core.py +49 -1
- xinference/model/llm/__init__.py +26 -27
- xinference/model/llm/{ggml/llamacpp.py → llama_cpp/core.py} +2 -35
- xinference/model/llm/llm_family.json +606 -1266
- xinference/model/llm/llm_family.py +16 -139
- xinference/model/llm/llm_family_modelscope.json +276 -313
- xinference/model/llm/lmdeploy/__init__.py +0 -0
- xinference/model/llm/lmdeploy/core.py +557 -0
- xinference/model/llm/memory.py +9 -9
- xinference/model/llm/sglang/core.py +2 -2
- xinference/model/llm/{pytorch → transformers}/chatglm.py +6 -13
- xinference/model/llm/{pytorch → transformers}/cogvlm2.py +4 -45
- xinference/model/llm/transformers/cogvlm2_video.py +524 -0
- xinference/model/llm/{pytorch → transformers}/core.py +3 -10
- xinference/model/llm/{pytorch → transformers}/glm4v.py +2 -23
- xinference/model/llm/transformers/intern_vl.py +540 -0
- xinference/model/llm/{pytorch → transformers}/internlm2.py +4 -8
- xinference/model/llm/{pytorch → transformers}/minicpmv25.py +2 -23
- xinference/model/llm/{pytorch → transformers}/minicpmv26.py +66 -41
- xinference/model/llm/{pytorch → transformers}/utils.py +1 -2
- xinference/model/llm/{pytorch → transformers}/yi_vl.py +2 -24
- xinference/model/llm/utils.py +85 -70
- xinference/model/llm/vllm/core.py +110 -11
- xinference/model/utils.py +1 -95
- xinference/thirdparty/fish_speech/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/callbacks/__init__.py +3 -0
- xinference/thirdparty/fish_speech/fish_speech/callbacks/grad_norm.py +113 -0
- xinference/thirdparty/fish_speech/fish_speech/configs/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/configs/lora/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/conversation.py +2 -0
- xinference/thirdparty/fish_speech/fish_speech/datasets/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/datasets/concat_repeat.py +53 -0
- xinference/thirdparty/fish_speech/fish_speech/datasets/protos/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/datasets/protos/text_data_pb2.py +33 -0
- xinference/thirdparty/fish_speech/fish_speech/datasets/protos/text_data_stream.py +36 -0
- xinference/thirdparty/fish_speech/fish_speech/datasets/semantic.py +496 -0
- xinference/thirdparty/fish_speech/fish_speech/datasets/vqgan.py +147 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/__init__.py +3 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/core.py +40 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/locale/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/locale/en_US.json +122 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/locale/es_ES.json +122 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/locale/ja_JP.json +123 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/locale/pt_BR.json +133 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/locale/zh_CN.json +122 -0
- xinference/thirdparty/fish_speech/fish_speech/i18n/scan.py +122 -0
- xinference/thirdparty/fish_speech/fish_speech/models/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/lit_module.py +202 -0
- xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/llama.py +779 -0
- xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/lora.py +92 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/__init__.py +3 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/lit_module.py +442 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/discriminator.py +44 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/firefly.py +625 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/fsq.py +139 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/reference.py +115 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/wavenet.py +225 -0
- xinference/thirdparty/fish_speech/fish_speech/models/vqgan/utils.py +94 -0
- xinference/thirdparty/fish_speech/fish_speech/scheduler.py +40 -0
- xinference/thirdparty/fish_speech/fish_speech/text/__init__.py +4 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_class.py +172 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_constant.py +30 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_util.py +342 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/cardinal.py +32 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/date.py +75 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/digit.py +32 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/fraction.py +35 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/money.py +43 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/percentage.py +33 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/telephone.py +51 -0
- xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/text.py +177 -0
- xinference/thirdparty/fish_speech/fish_speech/text/clean.py +69 -0
- xinference/thirdparty/fish_speech/fish_speech/text/spliter.py +130 -0
- xinference/thirdparty/fish_speech/fish_speech/train.py +139 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/__init__.py +23 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/braceexpand.py +217 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/context.py +13 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/file.py +16 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/instantiators.py +50 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/logger.py +55 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/logging_utils.py +48 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/rich_utils.py +100 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/spectrogram.py +122 -0
- xinference/thirdparty/fish_speech/fish_speech/utils/utils.py +114 -0
- xinference/thirdparty/fish_speech/fish_speech/webui/__init__.py +0 -0
- xinference/thirdparty/fish_speech/fish_speech/webui/launch_utils.py +120 -0
- xinference/thirdparty/fish_speech/fish_speech/webui/manage.py +1237 -0
- xinference/thirdparty/fish_speech/tools/__init__.py +0 -0
- xinference/thirdparty/fish_speech/tools/api.py +495 -0
- xinference/thirdparty/fish_speech/tools/auto_rerank.py +159 -0
- xinference/thirdparty/fish_speech/tools/download_models.py +55 -0
- xinference/thirdparty/fish_speech/tools/extract_model.py +21 -0
- xinference/thirdparty/fish_speech/tools/file.py +108 -0
- xinference/thirdparty/fish_speech/tools/gen_ref.py +36 -0
- xinference/thirdparty/fish_speech/tools/llama/__init__.py +0 -0
- xinference/thirdparty/fish_speech/tools/llama/build_dataset.py +169 -0
- xinference/thirdparty/fish_speech/tools/llama/eval_in_context.py +171 -0
- xinference/thirdparty/fish_speech/tools/llama/generate.py +698 -0
- xinference/thirdparty/fish_speech/tools/llama/merge_lora.py +95 -0
- xinference/thirdparty/fish_speech/tools/llama/quantize.py +497 -0
- xinference/thirdparty/fish_speech/tools/llama/rebuild_tokenizer.py +57 -0
- xinference/thirdparty/fish_speech/tools/merge_asr_files.py +55 -0
- xinference/thirdparty/fish_speech/tools/post_api.py +164 -0
- xinference/thirdparty/fish_speech/tools/sensevoice/__init__.py +0 -0
- xinference/thirdparty/fish_speech/tools/sensevoice/auto_model.py +573 -0
- xinference/thirdparty/fish_speech/tools/sensevoice/fun_asr.py +332 -0
- xinference/thirdparty/fish_speech/tools/sensevoice/vad_utils.py +61 -0
- xinference/thirdparty/fish_speech/tools/smart_pad.py +47 -0
- xinference/thirdparty/fish_speech/tools/vqgan/__init__.py +0 -0
- xinference/thirdparty/fish_speech/tools/vqgan/create_train_split.py +83 -0
- xinference/thirdparty/fish_speech/tools/vqgan/extract_vq.py +227 -0
- xinference/thirdparty/fish_speech/tools/vqgan/inference.py +120 -0
- xinference/thirdparty/fish_speech/tools/webui.py +619 -0
- xinference/thirdparty/fish_speech/tools/whisper_asr.py +176 -0
- xinference/thirdparty/internvl/__init__.py +0 -0
- xinference/thirdparty/internvl/conversation.py +393 -0
- xinference/thirdparty/omnilmm/model/utils.py +16 -1
- xinference/web/ui/build/asset-manifest.json +3 -3
- xinference/web/ui/build/index.html +1 -1
- xinference/web/ui/build/static/js/main.661c7b0a.js +3 -0
- xinference/web/ui/build/static/js/{main.17ca0398.js.map → main.661c7b0a.js.map} +1 -1
- xinference/web/ui/node_modules/.cache/babel-loader/070d8c6b3b0f3485c6d3885f0b6bbfdf9643e088a468acbd5d596f2396071c16.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/213b5913e164773c2b0567455377765715f5f07225fbac77ad8e1e9dc9648a47.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/4de9a6942c5f1749d6cbfdd54279699975f16016b182848bc253886f52ec2ec3.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/5391543180fead1eeef5364300301498d58a7d91d62de3841a32768b67f4552f.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/5c26a23b5eacf5b752a08531577ae3840bb247745ef9a39583dc2d05ba93a82a.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/714c37ce0ec5b5c591033f02be2f3f491fdd70da3ef568ee4a4f94689a3d5ca2.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/822586ed1077201b64b954f12f25e3f9b45678c1acbabe53d8af3ca82ca71f33.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/978b57d1a04a701bc3fcfebc511f5f274eed6ed7eade67f6fb76c27d5fd9ecc8.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/a797831de0dc74897f4b50b3426555d748f328b4c2cc391de709eadaf6a5f3e3.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/bd6ad8159341315a1764c397621a560809f7eb7219ab5174c801fca7e969d943.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/e64b7e8cedcf43d4c95deba60ec1341855c887705805bb62431693118b870c69.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/e91938976f229ce986b2907e51e1f00540b584ced0a315d498c172d13220739d.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/f72f011744c4649fabddca6f7a9327861ac0a315a89b1a2e62a39774e7863845.json +1 -0
- {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/METADATA +22 -13
- {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/RECORD +170 -79
- xinference/locale/utils.py +0 -39
- xinference/locale/zh_CN.json +0 -26
- xinference/model/llm/ggml/tools/__init__.py +0 -15
- xinference/model/llm/ggml/tools/convert_ggml_to_gguf.py +0 -498
- xinference/model/llm/ggml/tools/gguf.py +0 -884
- xinference/model/llm/pytorch/__init__.py +0 -13
- xinference/model/llm/pytorch/baichuan.py +0 -81
- xinference/model/llm/pytorch/falcon.py +0 -138
- xinference/model/llm/pytorch/intern_vl.py +0 -352
- xinference/model/llm/pytorch/vicuna.py +0 -69
- xinference/web/ui/build/static/js/main.17ca0398.js +0 -3
- xinference/web/ui/node_modules/.cache/babel-loader/1444c41a4d04494f1cbc2d8c1537df107b451cb569cb2c1fbf5159f3a4841a5f.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/2f40209b32e7e46a2eab6b8c8a355eb42c3caa8bc3228dd929f32fd2b3940294.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/44774c783428f952d8e2e4ad0998a9c5bc16a57cd9c68b7c5ff18aaa5a41d65c.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/5262556baf9207738bf6a8ba141ec6599d0a636345c245d61fdf88d3171998cb.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/6450605fac003812485f6251b9f0caafbf2e5bfc3bbe2f000050d9e2fdb8dcd3.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/71684495d995c7e266eecc6a0ad8ea0284cc785f80abddf863789c57a6134969.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/80acd1edf31542ab1dcccfad02cb4b38f3325cff847a781fcce97500cfd6f878.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/8a9742ddd8ba8546ef42dc14caca443f2b4524fabed7bf269e0eff3b7b64ee7d.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/d06a96a3c9c32e42689094aa3aaad41c8125894e956b8f84a70fadce6e3f65b3.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/d93730e2b5d7e8c957b4d0965d2ed1dac9045a649adbd47c220d11f255d4b1e0.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/e656dc00b4d8b387f0a81ba8fc558767df1601c66369e2eb86a5ef27cf080572.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/f28b83886159d83b84f099b05d607a822dca4dd7f2d8aa6d56fe08bab0b5b086.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/f3e02274cb1964e99b1fe69cbb6db233d3d8d7dd05d50ebcdb8e66d50b224b7b.json +0 -1
- /xinference/{locale → model/llm/llama_cpp}/__init__.py +0 -0
- /xinference/model/llm/{ggml → transformers}/__init__.py +0 -0
- /xinference/model/llm/{pytorch → transformers}/compression.py +0 -0
- /xinference/model/llm/{pytorch → transformers}/deepseek_vl.py +0 -0
- /xinference/model/llm/{pytorch → transformers}/llama_2.py +0 -0
- /xinference/model/llm/{pytorch → transformers}/omnilmm.py +0 -0
- /xinference/model/llm/{pytorch → transformers}/qwen_vl.py +0 -0
- /xinference/model/llm/{pytorch → transformers}/tensorizer_utils.py +0 -0
- /xinference/web/ui/build/static/js/{main.17ca0398.js.LICENSE.txt → main.661c7b0a.js.LICENSE.txt} +0 -0
- {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/LICENSE +0 -0
- {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/WHEEL +0 -0
- {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/entry_points.txt +0 -0
- {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{CssBaseline,ThemeProvider}from'@mui/material';import Snackbar from'@mui/material/Snackbar';import React,{useEffect,useState}from'react';import{useCookies}from'react-cookie';import{HashRouter}from'react-router-dom';import{Alert}from'./components/alertComponent';import{ApiContextProvider}from'./components/apiContext';import AuthAlertDialog from'./components/authAlertDialog';import{getEndpoint}from'./components/utils';import WraperRoutes from'./router/index';import{useMode}from'./theme';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";function App(){var _useMode=useMode(),_useMode2=_slicedToArray(_useMode,1),theme=_useMode2[0];var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],setCookie=_useCookies2[1],removeCookie=_useCookies2[2];var _useState=useState(''),_useState2=_slicedToArray(_useState,2),msg=_useState2[0],setMsg=_useState2[1];var endPoint=getEndpoint();useEffect(function(){// token possible value: no_auth / need_auth / <real bearer token>\nfetch(endPoint+'/v1/cluster/auth',{method:'GET',headers:{'Content-Type':'application/json'}}).then(function(res){if(!res.ok){res.json().then(function(errorData){setMsg(\"Server error: \".concat(res.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{res.json().then(function(data){if(!data.auth&&cookie.token!=='no_auth'){setCookie('token','no_auth',{path:'/'});}else if(data.auth&&!sessionStorage.getItem('token')){removeCookie('token',{path:'/'});}else if(!data.auth&&sessionStorage.getItem('token')){sessionStorage.removeItem('token');}});}});},[]);var handleClose=function handleClose(event,reason){if(reason==='clickaway'){return;}setMsg('');};return/*#__PURE__*/_jsxs(\"div\",{className:\"app\",children:[/*#__PURE__*/_jsx(Snackbar,{open:msg!=='',autoHideDuration:10000,anchorOrigin:{vertical:'top',horizontal:'center'},onClose:handleClose,children:/*#__PURE__*/_jsx(Alert,{severity:\"error\",onClose:handleClose,sx:{width:'100%'},children:msg})}),/*#__PURE__*/_jsx(HashRouter,{children:/*#__PURE__*/_jsx(ThemeProvider,{theme:theme,children:/*#__PURE__*/_jsxs(ApiContextProvider,{children:[/*#__PURE__*/_jsx(CssBaseline,{}),/*#__PURE__*/_jsx(AuthAlertDialog,{}),/*#__PURE__*/_jsx(WraperRoutes,{})]})})})]});}export default App;","map":{"version":3,"names":["CssBaseline","ThemeProvider","Snackbar","React","useEffect","useState","useCookies","HashRouter","Alert","ApiContextProvider","AuthAlertDialog","getEndpoint","WraperRoutes","useMode","jsx","_jsx","jsxs","_jsxs","App","_useMode","_useMode2","_slicedToArray","theme","_useCookies","_useCookies2","cookie","setCookie","removeCookie","_useState","_useState2","msg","setMsg","endPoint","fetch","method","headers","then","res","ok","json","errorData","concat","status","detail","data","auth","token","path","sessionStorage","getItem","removeItem","handleClose","event","reason","className","children","open","autoHideDuration","anchorOrigin","vertical","horizontal","onClose","severity","sx","width"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/App.js"],"sourcesContent":["import { CssBaseline, ThemeProvider } from '@mui/material'\nimport Snackbar from '@mui/material/Snackbar'\nimport React, { useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { HashRouter } from 'react-router-dom'\n\nimport { Alert } from './components/alertComponent'\nimport { ApiContextProvider } from './components/apiContext'\nimport AuthAlertDialog from './components/authAlertDialog'\nimport { getEndpoint } from './components/utils'\nimport WraperRoutes from './router/index'\nimport { useMode } from './theme'\n\nfunction App() {\n const [theme] = useMode()\n const [cookie, setCookie, removeCookie] = useCookies(['token'])\n const [msg, setMsg] = useState('')\n\n const endPoint = getEndpoint()\n\n useEffect(() => {\n // token possible value: no_auth / need_auth / <real bearer token>\n fetch(endPoint + '/v1/cluster/auth', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n }).then((res) => {\n if (!res.ok) {\n res.json().then((errorData) => {\n setMsg(\n `Server error: ${res.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n res.json().then((data) => {\n if (!data.auth && cookie.token !== 'no_auth') {\n setCookie('token', 'no_auth', { path: '/' })\n } else if (data.auth && !sessionStorage.getItem('token')) {\n removeCookie('token', { path: '/' })\n } else if (!data.auth && sessionStorage.getItem('token')) {\n sessionStorage.removeItem('token')\n }\n })\n }\n })\n }, [])\n\n const handleClose = (event, reason) => {\n if (reason === 'clickaway') {\n return\n }\n setMsg('')\n }\n\n return (\n <div className=\"app\">\n <Snackbar\n open={msg !== ''}\n autoHideDuration={10000}\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n onClose={handleClose}\n >\n <Alert severity=\"error\" onClose={handleClose} sx={{ width: '100%' }}>\n {msg}\n </Alert>\n </Snackbar>\n <HashRouter>\n <ThemeProvider theme={theme}>\n <ApiContextProvider>\n <CssBaseline />\n <AuthAlertDialog />\n <WraperRoutes />\n </ApiContextProvider>\n </ThemeProvider>\n </HashRouter>\n </div>\n )\n}\n\nexport default App\n"],"mappings":"6IAAA,OAASA,WAAW,CAAEC,aAAa,KAAQ,eAAe,CAC1D,MAAO,CAAAC,QAAQ,KAAM,wBAAwB,CAC7C,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAClD,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,UAAU,KAAQ,kBAAkB,CAE7C,OAASC,KAAK,KAAQ,6BAA6B,CACnD,OAASC,kBAAkB,KAAQ,yBAAyB,CAC5D,MAAO,CAAAC,eAAe,KAAM,8BAA8B,CAC1D,OAASC,WAAW,KAAQ,oBAAoB,CAChD,MAAO,CAAAC,YAAY,KAAM,gBAAgB,CACzC,OAASC,OAAO,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEjC,QAAS,CAAAC,GAAGA,CAAA,CAAG,CACb,IAAAC,QAAA,CAAgBN,OAAO,CAAC,CAAC,CAAAO,SAAA,CAAAC,cAAA,CAAAF,QAAA,IAAlBG,KAAK,CAAAF,SAAA,IACZ,IAAAG,WAAA,CAA0CjB,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAAkB,YAAA,CAAAH,cAAA,CAAAE,WAAA,IAAxDE,MAAM,CAAAD,YAAA,IAAEE,SAAS,CAAAF,YAAA,IAAEG,YAAY,CAAAH,YAAA,IACtC,IAAAI,SAAA,CAAsBvB,QAAQ,CAAC,EAAE,CAAC,CAAAwB,UAAA,CAAAR,cAAA,CAAAO,SAAA,IAA3BE,GAAG,CAAAD,UAAA,IAAEE,MAAM,CAAAF,UAAA,IAElB,GAAM,CAAAG,QAAQ,CAAGrB,WAAW,CAAC,CAAC,CAE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,CAAC,EAAE,CAAC,CACZ,CAAC,CAED,mBACEd,KAAA,QAAKqC,SAAS,CAAC,KAAK,CAAAC,QAAA,eAClBxC,IAAA,CAACb,QAAQ,EACPsD,IAAI,CAAE1B,GAAG,GAAK,EAAG,CACjB2B,gBAAgB,CAAE,KAAM,CACxBC,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDC,OAAO,CAAEV,WAAY,CAAAI,QAAA,cAErBxC,IAAA,CAACP,KAAK,EAACsD,QAAQ,CAAC,OAAO,CAACD,OAAO,CAAEV,WAAY,CAACY,EAAE,CAAE,CAAEC,KAAK,CAAE,MAAO,CAAE,CAAAT,QAAA,CACjEzB,GAAG,CACC,CAAC,CACA,CAAC,cACXf,IAAA,CAACR,UAAU,EAAAgD,QAAA,cACTxC,IAAA,CAACd,aAAa,EAACqB,KAAK,CAAEA,KAAM,CAAAiC,QAAA,cAC1BtC,KAAA,CAACR,kBAAkB,EAAA8C,QAAA,eACjBxC,IAAA,CAACf,WAAW,GAAE,CAAC,cACfe,IAAA,CAACL,eAAe,GAAE,CAAC,cACnBK,IAAA,CAACH,YAAY,GAAE,CAAC,EACE,CAAC,CACR,CAAC,CACN,CAAC,EACV,CAAC,CAEV,CAEA,cAAe,CAAAM,GAAG","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box}from'@mui/material';import Paper from'@mui/material/Paper';import Grid from'@mui/material/Unstable_Grid2';import React,{useContext,useEffect}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import TableTitle from'../../components/tableTitle';import Title from'../../components/Title';import NodeInfo from'./nodeInfo';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var ClusterInfo=function ClusterInfo(){var endPoint=useContext(ApiContext).endPoint;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();useEffect(function(){if(cookie.token===''||cookie.token===undefined||cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){navigate('/login',{replace:true});}},[cookie.token]);var handleGoBack=function handleGoBack(){var lastUrl=sessionStorage.getItem('lastActiveUrl');if(lastUrl==='launch_model'){navigate(sessionStorage.getItem('modelType'));}else if(lastUrl==='running_models'){navigate(sessionStorage.getItem('runningModelType'));}else if(lastUrl==='register_model'){navigate(sessionStorage.getItem('registerModelType'));}else{navigate('/launch_model/llm');}};return/*#__PURE__*/_jsxs(Box,{sx:{height:'100%',width:'100%',padding:'20px 20px 0 20px'},children:[/*#__PURE__*/_jsx(Title,{title:\"Cluster Information\"}),/*#__PURE__*/_jsxs(Grid,{container:true,spacing:3,style:{width:'100%'},children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Supervisor\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Supervisor\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Workers\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Worker\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Worker Details\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Worker-Details\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})})]})]});};export default ClusterInfo;","map":{"version":3,"names":["Box","Paper","Grid","React","useContext","useEffect","useCookies","useNavigate","ApiContext","TableTitle","Title","NodeInfo","jsx","_jsx","jsxs","_jsxs","ClusterInfo","endPoint","_useCookies","_useCookies2","_slicedToArray","cookie","navigate","token","undefined","sessionStorage","getItem","replace","handleGoBack","lastUrl","sx","height","width","padding","children","title","container","spacing","style","item","xs","display","overflow","flexDirection","nodeRole","endpoint"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/cluster_info/index.js"],"sourcesContent":["import { Box } from '@mui/material'\nimport Paper from '@mui/material/Paper'\nimport Grid from '@mui/material/Unstable_Grid2'\nimport React, { useContext, useEffect } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport TableTitle from '../../components/tableTitle'\nimport Title from '../../components/Title'\nimport NodeInfo from './nodeInfo'\n\nconst ClusterInfo = () => {\n const endPoint = useContext(ApiContext).endPoint\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n useEffect(() => {\n if (\n cookie.token === '' ||\n cookie.token === undefined ||\n (cookie.token !== 'no_auth' && !sessionStorage.getItem('token'))\n ) {\n navigate('/login', { replace: true })\n }\n }, [cookie.token])\n\n const handleGoBack = () => {\n const lastUrl = sessionStorage.getItem('lastActiveUrl')\n if (lastUrl === 'launch_model') {\n navigate(sessionStorage.getItem('modelType'))\n } else if (lastUrl === 'running_models') {\n navigate(sessionStorage.getItem('runningModelType'))\n } else if (lastUrl === 'register_model') {\n navigate(sessionStorage.getItem('registerModelType'))\n } else {\n navigate('/launch_model/llm')\n }\n }\n\n return (\n <Box\n sx={{\n height: '100%',\n width: '100%',\n padding: '20px 20px 0 20px',\n }}\n >\n <Title title=\"Cluster Information\" />\n <Grid container spacing={3} style={{ width: '100%' }}>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Supervisor</TableTitle>\n <NodeInfo\n nodeRole=\"Supervisor\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Workers</TableTitle>\n <NodeInfo\n nodeRole=\"Worker\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Worker Details</TableTitle>\n <NodeInfo\n nodeRole=\"Worker-Details\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n </Grid>\n </Box>\n )\n}\n\nexport default ClusterInfo\n"],"mappings":"6IAAA,OAASA,GAAG,KAAQ,eAAe,CACnC,MAAO,CAAAC,KAAK,KAAM,qBAAqB,CACvC,MAAO,CAAAC,IAAI,KAAM,8BAA8B,CAC/C,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,KAAQ,OAAO,CACpD,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,UAAU,KAAM,6BAA6B,CACpD,MAAO,CAAAC,KAAK,KAAM,wBAAwB,CAC1C,MAAO,CAAAC,QAAQ,KAAM,YAAY,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEjC,GAAM,CAAAC,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAA,CAAS,CACxB,GAAM,CAAAC,QAAQ,CAAGb,UAAU,CAAC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d,KAAK,EACJ6B,EAAE,CAAE,CACFG,OAAO,CAAE,CAAC,CACVQ,OAAO,CAAE,MAAM,CACfC,QAAQ,CAAE,MAAM,CAChBC,aAAa,CAAE,QACjB,CAAE,CAAAT,QAAA,eAEFrB,IAAA,CAACJ,UAAU,EAAAyB,QAAA,CAAC,gBAAc,CAAY,CAAC,cACvCrB,IAAA,CAACF,QAAQ,EACPiC,QAAQ,CAAC,gBAAgB,CACzBC,QAAQ,CAAE5B,QAAS,CACnBI,MAAM,CAAEA,MAAO,CACfO,YAAY,CAAEA,YAAa,CAC5B,CAAC,EACG,CAAC,CACJ,CAAC,EACH,CAAC,EACJ,CAAC,CAEV,CAAC,CAED,cAAe,CAAAZ,WAAW","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _defineProperty from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import AddIcon from'@mui/icons-material/Add';import DeleteIcon from'@mui/icons-material/Delete';import{Alert,Box,Button,FormControlLabel,Radio,RadioGroup,TextField,Tooltip}from'@mui/material';import React,{useEffect,useState}from'react';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";var modelFormatArr=[{value:'pytorch',label:'PyTorch'},{value:'ggmlv3',label:'GGML'},{value:'ggufv2',label:'GGUF'},{value:'gptq',label:'GPTQ'},{value:'awq',label:'AWQ'}];var AddModelSpecs=function AddModelSpecs(_ref){var isJump=_ref.isJump,formData=_ref.formData,specsDataArr=_ref.specsDataArr,onGetArr=_ref.onGetArr,scrollRef=_ref.scrollRef;var _useState=useState(0),_useState2=_slicedToArray(_useState,2),count=_useState2[0],setCount=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),specsArr=_useState4[0],setSpecsArr=_useState4[1];var _useState5=useState([]),_useState6=_slicedToArray(_useState5,2),pathArr=_useState6[0],setPathArr=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),modelSizeAlertId=_useState8[0],setModelSizeAlertId=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),quantizationAlertId=_useState10[0],setQuantizationAlertId=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),isError=_useState12[0],setIsError=_useState12[1];var _useState13=useState(false),_useState14=_slicedToArray(_useState13,2),isAdd=_useState14[0],setIsAdd=_useState14[1];useEffect(function(){if(isJump){var dataArr=specsDataArr.map(function(item,index){var model_uri=item.model_uri,model_size_in_billions=item.model_size_in_billions,model_format=item.model_format,quantizations=item.quantizations,model_file_name_template=item.model_file_name_template;var size=model_size_in_billions;if(typeof size!=='number')size=size.split('_').join('.');return{id:index,model_uri:model_uri,model_size_in_billions:size,model_format:model_format,quantizations:quantizations,model_file_name_template:model_file_name_template};});setCount(dataArr.length);setSpecsArr(dataArr);var subPathArr=[];specsDataArr.forEach(function(item){if(item.model_format!=='ggmlv3'&&item.model_format!=='ggufv2'){subPathArr.push(item.model_uri);}else{subPathArr.push(item.model_uri+'/'+item.model_file_name_template);}});setPathArr(subPathArr);}else{setSpecsArr([_objectSpread({id:count},formData)]);setCount(count+1);setPathArr([formData.model_uri]);}},[]);useEffect(function(){var arr=specsArr.map(function(item){var uri=item.model_uri,size=item.model_size_in_billions,modelFormat=item.model_format,quantizations=item.quantizations,model_file_name_template=item.model_file_name_template;var handleSize=parseInt(size)===parseFloat(size)?Number(size):size.split('.').join('_');var handleQuantization=quantizations;if(modelFormat==='pytorch'){handleQuantization=['none'];}else if(handleQuantization[0]===''&&(modelFormat==='ggmlv3'||modelFormat==='ggufv2')){handleQuantization=['default'];}return{model_uri:uri,model_size_in_billions:handleSize,model_format:modelFormat,quantizations:handleQuantization,model_file_name_template:model_file_name_template};});setIsError(true);if(modelSizeAlertId.length===0&&quantizationAlertId.length===0){setIsError(false);}onGetArr(arr,isError);isAdd&&handleScrollBottom();setIsAdd(false);},[specsArr,isError]);var handleAddSpecs=function handleAddSpecs(){setCount(count+1);var item={id:count,model_uri:'/path/to/llama-1',model_size_in_billions:7,model_format:'pytorch',quantizations:[]};setSpecsArr([].concat(_toConsumableArray(specsArr),[item]));setIsAdd(true);setPathArr([].concat(_toConsumableArray(pathArr),['/path/to/llama-1']));};var handleUpdateSpecsArr=function handleUpdateSpecsArr(index,type,newValue){if(type==='model_format'){var subPathArr=_toConsumableArray(pathArr);if(specsArr[index].model_format!=='ggmlv3'&&specsArr[index].model_format!=='ggufv2'){pathArr[index]=specsArr[index].model_uri;}else{pathArr[index]=specsArr[index].model_uri+'/'+specsArr[index].model_file_name_template;}setPathArr(subPathArr);}setSpecsArr(specsArr.map(function(item,subIndex){if(subIndex===index){if(type==='quantizations'){return _objectSpread(_objectSpread({},item),{},_defineProperty({},type,[newValue]));}else if(type==='model_format'){if(newValue==='ggmlv3'||newValue==='ggufv2'){var _getPathComponents=getPathComponents(pathArr[index]),baseDir=_getPathComponents.baseDir,filename=_getPathComponents.filename;var obj=_objectSpread(_objectSpread({},item),{},{model_format:newValue,quantizations:[''],model_uri:baseDir,model_file_name_template:filename});return obj;}else{var _ref2;var id=item.id,model_size_in_billions=item.model_size_in_billions,model_format=item.model_format;return _ref2={id:id,model_uri:pathArr[index],model_size_in_billions:model_size_in_billions,model_format:model_format},_defineProperty(_ref2,type,newValue),_defineProperty(_ref2,\"quantizations\",['']),_ref2;}}else if(type==='model_uri'){var _subPathArr=_toConsumableArray(pathArr);_subPathArr[index]=newValue;setPathArr(_subPathArr);if(item.model_format==='ggmlv3'||item.model_format==='ggufv2'){var _getPathComponents2=getPathComponents(newValue),_baseDir=_getPathComponents2.baseDir,_filename=_getPathComponents2.filename;var _obj=_objectSpread(_objectSpread({},item),{},{model_uri:_baseDir,model_file_name_template:_filename});return _obj;}else{return _objectSpread(_objectSpread({},item),{},_defineProperty({},type,newValue));}}else{return _objectSpread(_objectSpread({},item),{},_defineProperty({},type,newValue));}}return item;}));};var handleDeleteSpecs=function handleDeleteSpecs(index){setSpecsArr(specsArr.filter(function(_,subIndex){return index!==subIndex;}));};var getPathComponents=function getPathComponents(path){var normalizedPath=path.replace(/\\\\/g,'/');var baseDir=normalizedPath.substring(0,normalizedPath.lastIndexOf('/'));var filename=normalizedPath.substring(normalizedPath.lastIndexOf('/')+1);return{baseDir:baseDir,filename:filename};};var handleModelSize=function handleModelSize(index,value,id){setModelSizeAlertId(modelSizeAlertId.filter(function(item){return item!==id;}));handleUpdateSpecsArr(index,'model_size_in_billions',value);if(value!==''&&(!Number(value)||Number(value)<=0)){var modelSizeAlertIdArr=Array.from(new Set([].concat(_toConsumableArray(modelSizeAlertId),[id])));setModelSizeAlertId(modelSizeAlertIdArr);}};var handleQuantization=function handleQuantization(model_format,index,value,id){setQuantizationAlertId(quantizationAlertId.filter(function(item){return item!==id;}));handleUpdateSpecsArr(index,'quantizations',value);if((model_format==='gptq'||model_format==='awq')&&value===''){var quantizationAlertIdArr=Array.from(new Set([].concat(_toConsumableArray(quantizationAlertId),[id])));setQuantizationAlertId(quantizationAlertIdArr);}};var handleScrollBottom=function handleScrollBottom(){scrollRef.current.scrollTo({top:scrollRef.current.scrollHeight,behavior:'smooth'});};return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{style:{marginBottom:'20px'},children:\"Model Specs\"}),/*#__PURE__*/_jsx(Button,{variant:\"contained\",size:\"small\",endIcon:/*#__PURE__*/_jsx(AddIcon,{}),className:\"addBtn\",onClick:handleAddSpecs,children:\"more\"})]}),/*#__PURE__*/_jsx(\"div\",{className:\"specs_container\",children:specsArr.map(function(item,index){return/*#__PURE__*/_jsxs(\"div\",{className:\"item\",children:[/*#__PURE__*/_jsx(\"label\",{style:{paddingLeft:5},children:\"Model Format\"}),/*#__PURE__*/_jsx(RadioGroup,{value:item.model_format,onChange:function onChange(e){handleUpdateSpecsArr(index,'model_format',e.target.value);if(e.target.value==='gptq'||e.target.value==='awq'){var quantizationAlertIdArr=Array.from(new Set([].concat(_toConsumableArray(quantizationAlertId),[item.id])));setQuantizationAlertId(quantizationAlertIdArr);}},children:/*#__PURE__*/_jsx(Box,{sx:styles.checkboxWrapper,children:modelFormatArr.map(function(item){return/*#__PURE__*/_jsx(Box,{sx:{marginLeft:'10px'},children:/*#__PURE__*/_jsx(FormControlLabel,{value:item.value,control:/*#__PURE__*/_jsx(Radio,{}),label:item.label})},item.value);})})}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"}),/*#__PURE__*/_jsx(TextField,{error:item.model_uri!==''?false:true,style:{minWidth:'60%'},label:\"Model Path\",size:\"small\",value:item.model_format!=='ggmlv3'&&item.model_format!=='ggufv2'?item.model_uri:item.model_uri+'/'+item.model_file_name_template,onChange:function onChange(e){handleUpdateSpecsArr(index,'model_uri',e.target.value);},helperText:\"For PyTorch, provide the model directory. For GGML/GGUF, provide the model file path.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"}),/*#__PURE__*/_jsx(TextField,{error:Number(item.model_size_in_billions)>0?false:true,label:\"Model Size in Billions\",size:\"small\",value:item.model_size_in_billions,onChange:function onChange(e){handleModelSize(index,e.target.value,item.id);}}),modelSizeAlertId.includes(item.id)&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter a number greater than 0.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"}),item.model_format!=='pytorch'&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{style:{minWidth:'60%'},label:item.model_format==='gptq'||item.model_format==='awq'?'Quantization':'Quantization (Optional)',size:\"small\",value:item.quantizations[0],onChange:function onChange(e){handleQuantization(item.model_format,index,e.target.value,item.id);},helperText:item.model_format==='gptq'||item.model_format==='awq'?'For GPTQ/AWQ models, please be careful to fill in the quantization corresponding to the model you want to register.':''}),item.model_format!=='ggmlv3'&&item.model_format!=='ggufv2'&&quantizationAlertId.includes(item.id)&&item.quantizations[0]==''&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Quantization cannot be left empty.\"})]}),specsArr.length>1&&/*#__PURE__*/_jsx(Tooltip,{title:\"Delete specs\",placement:\"top\",children:/*#__PURE__*/_jsx(\"div\",{className:\"deleteBtn\",onClick:function onClick(){return handleDeleteSpecs(index);},children:/*#__PURE__*/_jsx(DeleteIcon,{className:\"deleteIcon\"})})})]},item.id);})})]});};export default AddModelSpecs;var styles={baseFormControl:{width:'100%',margin:'normal',size:'small'},checkboxWrapper:{display:'flex',flexWrap:'wrap',alignItems:'center',width:'100%'}};","map":{"version":3,"names":["AddIcon","DeleteIcon","Alert","Box","Button","FormControlLabel","Radio","RadioGroup","TextField","Tooltip","React","useEffect","useState","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","modelFormatArr","value","label","AddModelSpecs","_ref","isJump","formData","specsDataArr","onGetArr","scrollRef","_useState","_useState2","_slicedToArray","count","setCount","_useState3","_useState4","specsArr","setSpecsArr","_useState5","_useState6","pathArr","setPathArr","_useState7","_useState8","modelSizeAlertId","setModelSizeAlertId","_useState9","_useState10","quantizationAlertId","setQuantizationAlertId","_useState11","_useState12","isError","setIsError","_useState13","_useState14","isAdd","setIsAdd","dataArr","map","item","index","model_uri","model_size_in_billions","model_format","quantizations","model_file_name_template","size","split","join","id","length","subPathArr","forEach","push","_objectSpread","arr","uri","modelFormat","handleSize","parseInt","parseFloat","Number","handleQuantization","handleScrollBottom","handleAddSpecs","concat","_toConsumableArray","handleUpdateSpecsArr","type","newValue","subIndex","_defineProperty","_getPathComponents","getPathComponents","baseDir","filename","obj","_ref2","_getPathComponents2","handleDeleteSpecs","filter","_","path","normalizedPath","replace","substring","lastIndexOf","handleModelSize","modelSizeAlertIdArr","Array","from","Set","quantizationAlertIdArr","current","scrollTo","top","scrollHeight","behavior","children","style","marginBottom","variant","endIcon","className","onClick","paddingLeft","onChange","e","target","sx","styles","checkboxWrapper","marginLeft","control","padding","error","minWidth","helperText","includes","severity","title","placement","baseFormControl","width","margin","display","flexWrap","alignItems"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/register_model/components/addModelSpecs.js"],"sourcesContent":["import AddIcon from '@mui/icons-material/Add'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport {\n Alert,\n Box,\n Button,\n FormControlLabel,\n Radio,\n RadioGroup,\n TextField,\n Tooltip,\n} from '@mui/material'\nimport React, { useEffect, useState } from 'react'\n\nconst modelFormatArr = [\n { value: 'pytorch', label: 'PyTorch' },\n { value: 'ggmlv3', label: 'GGML' },\n { value: 'ggufv2', label: 'GGUF' },\n { value: 'gptq', label: 'GPTQ' },\n { value: 'awq', label: 'AWQ' },\n]\n\nconst AddModelSpecs = ({\n isJump,\n formData,\n specsDataArr,\n onGetArr,\n scrollRef,\n}) => {\n const [count, setCount] = useState(0)\n const [specsArr, setSpecsArr] = useState([])\n const [pathArr, setPathArr] = useState([])\n const [modelSizeAlertId, setModelSizeAlertId] = useState([])\n const [quantizationAlertId, setQuantizationAlertId] = useState([])\n const [isError, setIsError] = useState(false)\n const [isAdd, setIsAdd] = useState(false)\n\n useEffect(() => {\n if (isJump) {\n const dataArr = specsDataArr.map((item, index) => {\n const {\n model_uri,\n model_size_in_billions,\n model_format,\n quantizations,\n model_file_name_template,\n } = item\n let size = model_size_in_billions\n if (typeof size !== 'number') size = size.split('_').join('.')\n\n return {\n id: index,\n model_uri,\n model_size_in_billions: size,\n model_format,\n quantizations,\n model_file_name_template,\n }\n })\n setCount(dataArr.length)\n setSpecsArr(dataArr)\n\n const subPathArr = []\n specsDataArr.forEach((item) => {\n if (item.model_format !== 'ggmlv3' && item.model_format !== 'ggufv2') {\n subPathArr.push(item.model_uri)\n } else {\n subPathArr.push(item.model_uri + '/' + item.model_file_name_template)\n }\n })\n setPathArr(subPathArr)\n } else {\n setSpecsArr([\n {\n id: count,\n ...formData,\n },\n ])\n setCount(count + 1)\n setPathArr([formData.model_uri])\n }\n }, [])\n\n useEffect(() => {\n const arr = specsArr.map((item) => {\n const {\n model_uri: uri,\n model_size_in_billions: size,\n model_format: modelFormat,\n quantizations,\n model_file_name_template,\n } = item\n const handleSize =\n parseInt(size) === parseFloat(size)\n ? Number(size)\n : size.split('.').join('_')\n\n let handleQuantization = quantizations\n if (modelFormat === 'pytorch') {\n handleQuantization = ['none']\n } else if (\n handleQuantization[0] === '' &&\n (modelFormat === 'ggmlv3' || modelFormat === 'ggufv2')\n ) {\n handleQuantization = ['default']\n }\n\n return {\n model_uri: uri,\n model_size_in_billions: handleSize,\n model_format: modelFormat,\n quantizations: handleQuantization,\n model_file_name_template,\n }\n })\n setIsError(true)\n if (modelSizeAlertId.length === 0 && quantizationAlertId.length === 0) {\n setIsError(false)\n }\n onGetArr(arr, isError)\n isAdd && handleScrollBottom()\n setIsAdd(false)\n }, [specsArr, isError])\n\n const handleAddSpecs = () => {\n setCount(count + 1)\n const item = {\n id: count,\n model_uri: '/path/to/llama-1',\n model_size_in_billions: 7,\n model_format: 'pytorch',\n quantizations: [],\n }\n setSpecsArr([...specsArr, item])\n setIsAdd(true)\n setPathArr([...pathArr, '/path/to/llama-1'])\n }\n\n const handleUpdateSpecsArr = (index, type, newValue) => {\n if (type === 'model_format') {\n const subPathArr = [...pathArr]\n if (\n specsArr[index].model_format !== 'ggmlv3' &&\n specsArr[index].model_format !== 'ggufv2'\n ) {\n pathArr[index] = specsArr[index].model_uri\n } else {\n pathArr[index] =\n specsArr[index].model_uri +\n '/' +\n specsArr[index].model_file_name_template\n }\n setPathArr(subPathArr)\n }\n\n setSpecsArr(\n specsArr.map((item, subIndex) => {\n if (subIndex === index) {\n if (type === 'quantizations') {\n return { ...item, [type]: [newValue] }\n } else if (type === 'model_format') {\n if (newValue === 'ggmlv3' || newValue === 'ggufv2') {\n const { baseDir, filename } = getPathComponents(pathArr[index])\n const obj = {\n ...item,\n model_format: newValue,\n quantizations: [''],\n model_uri: baseDir,\n model_file_name_template: filename,\n }\n return obj\n } else {\n const { id, model_size_in_billions, model_format } = item\n return {\n id,\n model_uri: pathArr[index],\n model_size_in_billions,\n model_format,\n [type]: newValue,\n quantizations: [''],\n }\n }\n } else if (type === 'model_uri') {\n const subPathArr = [...pathArr]\n subPathArr[index] = newValue\n setPathArr(subPathArr)\n if (\n item.model_format === 'ggmlv3' ||\n item.model_format === 'ggufv2'\n ) {\n const { baseDir, filename } = getPathComponents(newValue)\n const obj = {\n ...item,\n model_uri: baseDir,\n model_file_name_template: filename,\n }\n return obj\n } else {\n return { ...item, [type]: newValue }\n }\n } else {\n return { ...item, [type]: newValue }\n }\n }\n return item\n })\n )\n }\n\n const handleDeleteSpecs = (index) => {\n setSpecsArr(specsArr.filter((_, subIndex) => index !== subIndex))\n }\n\n const getPathComponents = (path) => {\n const normalizedPath = path.replace(/\\\\/g, '/')\n const baseDir = normalizedPath.substring(0, normalizedPath.lastIndexOf('/'))\n const filename = normalizedPath.substring(\n normalizedPath.lastIndexOf('/') + 1\n )\n return { baseDir, filename }\n }\n\n const handleModelSize = (index, value, id) => {\n setModelSizeAlertId(modelSizeAlertId.filter((item) => item !== id))\n handleUpdateSpecsArr(index, 'model_size_in_billions', value)\n if (value !== '' && (!Number(value) || Number(value) <= 0)) {\n const modelSizeAlertIdArr = Array.from(new Set([...modelSizeAlertId, id]))\n setModelSizeAlertId(modelSizeAlertIdArr)\n }\n }\n\n const handleQuantization = (model_format, index, value, id) => {\n setQuantizationAlertId(quantizationAlertId.filter((item) => item !== id))\n handleUpdateSpecsArr(index, 'quantizations', value)\n if ((model_format === 'gptq' || model_format === 'awq') && value === '') {\n const quantizationAlertIdArr = Array.from(\n new Set([...quantizationAlertId, id])\n )\n setQuantizationAlertId(quantizationAlertIdArr)\n }\n }\n\n const handleScrollBottom = () => {\n scrollRef.current.scrollTo({\n top: scrollRef.current.scrollHeight,\n behavior: 'smooth',\n })\n }\n\n return (\n <>\n <div>\n <label style={{ marginBottom: '20px' }}>Model Specs</label>\n <Button\n variant=\"contained\"\n size=\"small\"\n endIcon={<AddIcon />}\n className=\"addBtn\"\n onClick={handleAddSpecs}\n >\n more\n </Button>\n </div>\n <div className=\"specs_container\">\n {specsArr.map((item, index) => (\n <div className=\"item\" key={item.id}>\n <label\n style={{\n paddingLeft: 5,\n }}\n >\n Model Format\n </label>\n <RadioGroup\n value={item.model_format}\n onChange={(e) => {\n handleUpdateSpecsArr(index, 'model_format', e.target.value)\n if (e.target.value === 'gptq' || e.target.value === 'awq') {\n const quantizationAlertIdArr = Array.from(\n new Set([...quantizationAlertId, item.id])\n )\n setQuantizationAlertId(quantizationAlertIdArr)\n }\n }}\n >\n <Box sx={styles.checkboxWrapper}>\n {modelFormatArr.map((item) => (\n <Box key={item.value} sx={{ marginLeft: '10px' }}>\n <FormControlLabel\n value={item.value}\n control={<Radio />}\n label={item.label}\n />\n </Box>\n ))}\n </Box>\n </RadioGroup>\n <Box padding=\"15px\"></Box>\n\n <TextField\n error={item.model_uri !== '' ? false : true}\n style={{ minWidth: '60%' }}\n label=\"Model Path\"\n size=\"small\"\n value={\n item.model_format !== 'ggmlv3' && item.model_format !== 'ggufv2'\n ? item.model_uri\n : item.model_uri + '/' + item.model_file_name_template\n }\n onChange={(e) => {\n handleUpdateSpecsArr(index, 'model_uri', e.target.value)\n }}\n helperText=\"For PyTorch, provide the model directory. For GGML/GGUF, provide the model file path.\"\n />\n <Box padding=\"15px\"></Box>\n\n <TextField\n error={Number(item.model_size_in_billions) > 0 ? false : true}\n label=\"Model Size in Billions\"\n size=\"small\"\n value={item.model_size_in_billions}\n onChange={(e) => {\n handleModelSize(index, e.target.value, item.id)\n }}\n />\n {modelSizeAlertId.includes(item.id) && (\n <Alert severity=\"error\">\n Please enter a number greater than 0.\n </Alert>\n )}\n <Box padding=\"15px\"></Box>\n\n {item.model_format !== 'pytorch' && (\n <>\n <TextField\n style={{ minWidth: '60%' }}\n label={\n item.model_format === 'gptq' || item.model_format === 'awq'\n ? 'Quantization'\n : 'Quantization (Optional)'\n }\n size=\"small\"\n value={item.quantizations[0]}\n onChange={(e) => {\n handleQuantization(\n item.model_format,\n index,\n e.target.value,\n item.id\n )\n }}\n helperText={\n item.model_format === 'gptq' || item.model_format === 'awq'\n ? 'For GPTQ/AWQ models, please be careful to fill in the quantization corresponding to the model you want to register.'\n : ''\n }\n />\n {item.model_format !== 'ggmlv3' &&\n item.model_format !== 'ggufv2' &&\n quantizationAlertId.includes(item.id) &&\n item.quantizations[0] == '' && (\n <Alert severity=\"error\">\n Quantization cannot be left empty.\n </Alert>\n )}\n </>\n )}\n\n {specsArr.length > 1 && (\n <Tooltip title=\"Delete specs\" placement=\"top\">\n <div\n className=\"deleteBtn\"\n onClick={() => handleDeleteSpecs(index)}\n >\n <DeleteIcon className=\"deleteIcon\" />\n </div>\n </Tooltip>\n )}\n </div>\n ))}\n </div>\n </>\n )\n}\n\nexport default AddModelSpecs\n\nconst styles = {\n baseFormControl: {\n width: '100%',\n margin: 'normal',\n size: 'small',\n },\n checkboxWrapper: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n width: '100%',\n },\n}\n"],"mappings":"6jBAAA,MAAO,CAAAA,OAAO,KAAM,yBAAyB,CAC7C,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OACEC,KAAK,CACLC,GAAG,CACHC,MAAM,CACNC,gBAAgB,CAChBC,KAAK,CACLC,UAAU,CACVC,SAAS,CACTC,OAAO,KACF,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAA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AK,QAAQ,EAC7BJ,IAAI,CAACI,YAAY,GAAK,QAAQ,EAC9BhB,mBAAmB,CAAC2F,QAAQ,CAAC/E,IAAI,CAACU,EAAE,CAAC,EACrCV,IAAI,CAACK,aAAa,CAAC,CAAC,CAAC,EAAI,EAAE,eACzBnD,IAAA,CAACZ,KAAK,EAAC0I,QAAQ,CAAC,OAAO,CAAArB,QAAA,CAAC,oCAExB,CAAO,CACR,EACH,CACH,CAEAnF,QAAQ,CAACmC,MAAM,CAAG,CAAC,eAClBzD,IAAA,CAACL,OAAO,EAACoI,KAAK,CAAC,cAAc,CAACC,SAAS,CAAC,KAAK,CAAAvB,QAAA,cAC3CzG,IAAA,QACE8G,SAAS,CAAC,WAAW,CACrBC,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAAzB,iBAAiB,CAACvC,KAAK,CAAC,EAAC,CAAA0D,QAAA,cAExCzG,IAAA,CAACb,UAAU,EAAC2H,SAAS,CAAC,YAAY,CAAE,CAAC,CAClC,CAAC,CACC,CACV,GAhHwBhE,IAAI,CAACU,EAiH3B,CAAC,EACP,CAAC,CACC,CAAC,EACN,CAAC,CAEP,CAAC,CAED,cAAe,CAAAhD,aAAa,CAE5B,GAAM,CAAA6G,MAAM,CAAG,CACbY,eAAe,CAAE,CACfC,KAAK,CAAE,MAAM,CACbC,MAAM,CAAE,QAAQ,CAChB9E,IAAI,CAAE,OACR,CAAC,CACDiE,eAAe,CAAE,CACfc,OAAO,CAAE,MAAM,CACfC,QAAQ,CAAE,MAAM,CAChBC,UAAU,CAAE,QAAQ,CACpBJ,KAAK,CAAE,MACT,CACF,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,Tab}from'@mui/material';import React,{useEffect}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import Title from'../../components/Title';import RegisterModelComponent from'./registerModel';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var RegisterModel=function RegisterModel(){var _React$useState=React.useState(sessionStorage.getItem('registerModelType')?sessionStorage.getItem('registerModelType'):'/register_model/llm'),_React$useState2=_slicedToArray(_React$useState,2),tabValue=_React$useState2[0],setTabValue=_React$useState2[1];var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();useEffect(function(){if(cookie.token===''||cookie.token===undefined){navigate('/login',{replace:true});return;}if(cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){navigate('/login',{replace:true});return;}},[cookie.token]);var handleTabChange=function handleTabChange(_,newValue){setTabValue(newValue);navigate(newValue);sessionStorage.setItem('registerModelType',newValue);};return/*#__PURE__*/_jsxs(Box,{m:\"20px\",style:{overflow:'hidden'},children:[/*#__PURE__*/_jsx(Title,{title:\"Register Model\"}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(TabContext,{value:tabValue,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:tabValue,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:\"Language Model\",value:\"/register_model/llm\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Model\",value:\"/register_model/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank Model\",value:\"/register_model/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image Model\",value:\"/register_model/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio Model\",value:\"/register_model/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Flexible Model\",value:\"/register_model/flexible\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"LLM\",customData:{version:1,model_name:'custom-llm',model_description:'This is a custom model description.',context_length:2048,model_lang:['en'],model_ability:['generate'],model_family:'',model_specs:[{model_uri:'/path/to/llama-1',model_size_in_billions:7,model_format:'pytorch',quantizations:['none']}],prompt_style:undefined}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"embedding\",customData:{model_name:'custom-embedding',dimensions:768,max_tokens:512,model_uri:'/path/to/embedding-model',language:['en']}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"rerank\",customData:{model_name:'custom-rerank',model_uri:'/path/to/rerank-model',language:['en']}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"image\",customData:{model_name:'custom-image',model_uri:'/path/to/image-model',model_family:'stable_diffusion',controlnet:[]}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"audio\",customData:{model_name:'custom-audio',model_uri:'/path/to/audio-model',multilingual:false,model_family:'whisper'}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/flexible\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"flexible\",customData:{model_name:'flexible-model',model_description:'This is a model description.',model_uri:'/path/to/model',launcher:'xinference.model.flexible.launchers.transformers',launcher_args:'{}'}})})]})]});};export default RegisterModel;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","Tab","React","useEffect","useCookies","useNavigate","ErrorMessageSnackBar","Title","RegisterModelComponent","jsx","_jsx","jsxs","_jsxs","RegisterModel","_React$useState","useState","sessionStorage","getItem","_React$useState2","_slicedToArray","tabValue","setTabValue","_useCookies","_useCookies2","cookie","navigate","token","undefined","replace","handleTabChange","_","newValue","setItem","m","style","overflow","children","title","value","sx","borderBottom","borderColor","onChange","label","padding","modelType","customData","version","model_name","model_description","context_length","model_lang","model_ability","model_family","model_specs","model_uri","model_size_in_billions","model_format","quantizations","prompt_style","dimensions","max_tokens","language","controlnet","multilingual","launcher","launcher_args"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/register_model/index.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Tab } from '@mui/material'\nimport React, { useEffect } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport Title from '../../components/Title'\nimport RegisterModelComponent from './registerModel'\n\nconst RegisterModel = () => {\n const [tabValue, setTabValue] = React.useState(\n sessionStorage.getItem('registerModelType')\n ? sessionStorage.getItem('registerModelType')\n : '/register_model/llm'\n )\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n useEffect(() => {\n if (cookie.token === '' || cookie.token === undefined) {\n navigate('/login', { replace: true })\n return\n }\n if (cookie.token !== 'no_auth' && !sessionStorage.getItem('token')) {\n navigate('/login', { replace: true })\n return\n }\n }, [cookie.token])\n\n const handleTabChange = (_, newValue) => {\n setTabValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('registerModelType', newValue)\n }\n\n return (\n <Box m=\"20px\" style={{ overflow: 'hidden' }}>\n <Title title=\"Register Model\" />\n <ErrorMessageSnackBar />\n <TabContext value={tabValue}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList\n value={tabValue}\n onChange={handleTabChange}\n aria-label=\"tabs\"\n >\n <Tab label=\"Language Model\" value=\"/register_model/llm\" />\n <Tab label=\"Embedding Model\" value=\"/register_model/embedding\" />\n <Tab label=\"Rerank Model\" value=\"/register_model/rerank\" />\n <Tab label=\"Image Model\" value=\"/register_model/image\" />\n <Tab label=\"Audio Model\" value=\"/register_model/audio\" />\n <Tab label=\"Flexible Model\" value=\"/register_model/flexible\" />\n </TabList>\n </Box>\n <TabPanel value=\"/register_model/llm\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"LLM\"\n customData={{\n version: 1,\n model_name: 'custom-llm',\n model_description: 'This is a custom model description.',\n context_length: 2048,\n model_lang: ['en'],\n model_ability: ['generate'],\n model_family: '',\n model_specs: [\n {\n model_uri: '/path/to/llama-1',\n model_size_in_billions: 7,\n model_format: 'pytorch',\n quantizations: ['none'],\n },\n ],\n prompt_style: undefined,\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/embedding\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"embedding\"\n customData={{\n model_name: 'custom-embedding',\n dimensions: 768,\n max_tokens: 512,\n model_uri: '/path/to/embedding-model',\n language: ['en'],\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/rerank\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"rerank\"\n customData={{\n model_name: 'custom-rerank',\n model_uri: '/path/to/rerank-model',\n language: ['en'],\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/image\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"image\"\n customData={{\n model_name: 'custom-image',\n model_uri: '/path/to/image-model',\n model_family: 'stable_diffusion',\n controlnet: [],\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/audio\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"audio\"\n customData={{\n model_name: 'custom-audio',\n model_uri: '/path/to/audio-model',\n multilingual: false,\n model_family: 'whisper',\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/flexible\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"flexible\"\n customData={{\n model_name: 'flexible-model',\n model_description: 'This is a model description.',\n model_uri: '/path/to/model',\n launcher: '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AgB,CAC5BC,iBAAiB,CAAE,8BAA8B,CACjDM,SAAS,CAAE,gBAAgB,CAC3BU,QAAQ,CAAE,kDAAkD,CAC5DC,aAAa,CAAE,IACjB,CAAE,CACH,CAAC,CACM,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAArD,aAAa","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/xinference/web/ui/build/static/js/{main.17ca0398.js.LICENSE.txt → main.661c7b0a.js.LICENSE.txt}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|