xinference 1.5.0.post2__py3-none-any.whl → 1.6.0__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 +107 -11
- xinference/client/restful/restful_client.py +51 -11
- xinference/constants.py +5 -1
- xinference/core/media_interface.py +758 -0
- xinference/core/model.py +49 -9
- xinference/core/supervisor.py +1 -1
- xinference/core/utils.py +1 -1
- xinference/core/worker.py +33 -39
- xinference/deploy/cmdline.py +17 -0
- xinference/deploy/utils.py +0 -3
- xinference/model/audio/__init__.py +16 -27
- xinference/model/audio/core.py +2 -1
- xinference/model/audio/cosyvoice.py +4 -2
- xinference/model/audio/model_spec.json +63 -46
- xinference/model/audio/model_spec_modelscope.json +31 -14
- xinference/model/embedding/__init__.py +16 -24
- xinference/model/image/__init__.py +15 -25
- xinference/model/llm/__init__.py +40 -115
- xinference/model/llm/core.py +29 -6
- xinference/model/llm/llama_cpp/core.py +30 -347
- xinference/model/llm/llm_family.json +1674 -2203
- xinference/model/llm/llm_family.py +71 -7
- xinference/model/llm/llm_family_csghub.json +0 -32
- xinference/model/llm/llm_family_modelscope.json +1838 -2016
- xinference/model/llm/llm_family_openmind_hub.json +19 -325
- xinference/model/llm/lmdeploy/core.py +7 -2
- xinference/model/llm/mlx/core.py +23 -7
- xinference/model/llm/reasoning_parser.py +281 -5
- xinference/model/llm/sglang/core.py +39 -11
- xinference/model/llm/transformers/chatglm.py +9 -2
- xinference/model/llm/transformers/cogagent.py +10 -12
- xinference/model/llm/transformers/cogvlm2.py +6 -3
- xinference/model/llm/transformers/cogvlm2_video.py +3 -6
- xinference/model/llm/transformers/core.py +58 -60
- xinference/model/llm/transformers/deepseek_v2.py +4 -2
- xinference/model/llm/transformers/deepseek_vl.py +10 -4
- xinference/model/llm/transformers/deepseek_vl2.py +9 -4
- xinference/model/llm/transformers/gemma3.py +4 -5
- xinference/model/llm/transformers/glm4v.py +3 -21
- xinference/model/llm/transformers/glm_edge_v.py +3 -20
- xinference/model/llm/transformers/intern_vl.py +3 -6
- xinference/model/llm/transformers/internlm2.py +1 -1
- xinference/model/llm/transformers/minicpmv25.py +4 -2
- xinference/model/llm/transformers/minicpmv26.py +5 -3
- xinference/model/llm/transformers/omnilmm.py +1 -1
- xinference/model/llm/transformers/opt.py +1 -1
- xinference/model/llm/transformers/ovis2.py +302 -0
- xinference/model/llm/transformers/qwen-omni.py +8 -1
- xinference/model/llm/transformers/qwen2_audio.py +3 -1
- xinference/model/llm/transformers/qwen2_vl.py +5 -1
- xinference/model/llm/transformers/qwen_vl.py +5 -2
- xinference/model/llm/utils.py +96 -45
- xinference/model/llm/vllm/core.py +108 -24
- xinference/model/llm/vllm/distributed_executor.py +8 -7
- xinference/model/llm/vllm/xavier/allocator.py +1 -1
- xinference/model/llm/vllm/xavier/block_manager.py +1 -1
- xinference/model/llm/vllm/xavier/block_tracker.py +3 -3
- xinference/model/llm/vllm/xavier/executor.py +1 -1
- xinference/model/llm/vllm/xavier/test/test_xavier.py +2 -11
- xinference/model/rerank/__init__.py +13 -24
- xinference/model/video/__init__.py +15 -25
- xinference/model/video/core.py +3 -3
- xinference/model/video/diffusers.py +157 -13
- xinference/model/video/model_spec.json +100 -0
- xinference/model/video/model_spec_modelscope.json +104 -0
- xinference/thirdparty/cosyvoice/bin/average_model.py +5 -4
- xinference/thirdparty/cosyvoice/bin/export_jit.py +50 -20
- xinference/thirdparty/cosyvoice/bin/export_onnx.py +136 -51
- xinference/thirdparty/cosyvoice/bin/inference.py +15 -5
- xinference/thirdparty/cosyvoice/bin/train.py +7 -2
- xinference/thirdparty/cosyvoice/cli/cosyvoice.py +72 -52
- xinference/thirdparty/cosyvoice/cli/frontend.py +58 -58
- xinference/thirdparty/cosyvoice/cli/model.py +140 -155
- xinference/thirdparty/cosyvoice/dataset/processor.py +9 -5
- xinference/thirdparty/cosyvoice/flow/decoder.py +656 -54
- xinference/thirdparty/cosyvoice/flow/flow.py +69 -11
- xinference/thirdparty/cosyvoice/flow/flow_matching.py +167 -63
- xinference/thirdparty/cosyvoice/flow/length_regulator.py +1 -0
- xinference/thirdparty/cosyvoice/hifigan/discriminator.py +91 -1
- xinference/thirdparty/cosyvoice/hifigan/f0_predictor.py +4 -1
- xinference/thirdparty/cosyvoice/hifigan/generator.py +4 -1
- xinference/thirdparty/cosyvoice/hifigan/hifigan.py +2 -2
- xinference/thirdparty/cosyvoice/llm/llm.py +198 -18
- xinference/thirdparty/cosyvoice/transformer/embedding.py +12 -4
- xinference/thirdparty/cosyvoice/transformer/upsample_encoder.py +124 -21
- xinference/thirdparty/cosyvoice/utils/class_utils.py +13 -0
- xinference/thirdparty/cosyvoice/utils/common.py +1 -1
- xinference/thirdparty/cosyvoice/utils/file_utils.py +40 -2
- xinference/thirdparty/cosyvoice/utils/frontend_utils.py +7 -0
- xinference/thirdparty/cosyvoice/utils/mask.py +4 -0
- xinference/thirdparty/cosyvoice/utils/train_utils.py +5 -1
- xinference/thirdparty/matcha/hifigan/xutils.py +3 -3
- xinference/types.py +2 -71
- 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 → main.337afe76.css} +2 -2
- xinference/web/ui/build/static/css/main.337afe76.css.map +1 -0
- xinference/web/ui/build/static/js/main.ae579a97.js +3 -0
- xinference/web/ui/build/static/js/main.ae579a97.js.map +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/0196a4b09e3264614e54360d5f832c46b31d964ec58296765ebff191ace6adbf.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/12e02ee790dbf57ead09a241a93bb5f893393aa36628ca741d44390e836a103f.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/18fa271456b31cded36c05c4c71c6b2b1cf4e4128c1e32f0e45d8b9f21764397.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/2fdc61dcb6a9d1fbcb44be592d0e87d8c3f21297a7327559ef5345665f8343f7.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/3d596a3e8dd6430d7ce81d164e32c31f8d47cfa5f725c328a298754d78563e14.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/5c08e2cd07809ed3e41486b16652253404cbb63a3ff8d0366ee50f57e2413cea.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/6798e126f3bc5f95a4c16a9c2ad52ffe77970c62406d83e20604dfda7ffd2247.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/8472e58a31720892d534f3febda31f746b25ec4aa60787eef34217b074e67965.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/b617f7d21a95045fc57b26a9373551740f1978a826134cbf705c3a1bf8714a93.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/c1506cb142151366074975f30fa1ff9cd6e5e978b62a4b074dfc16fe08d70d75.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/c5c7c2cd1b863ce41adff2c4737bba06eef3a1acf28288cb83d992060f6b8923.json +1 -0
- xinference/web/ui/src/locales/en.json +7 -4
- xinference/web/ui/src/locales/zh.json +7 -4
- {xinference-1.5.0.post2.dist-info → xinference-1.6.0.dist-info}/METADATA +56 -36
- {xinference-1.5.0.post2.dist-info → xinference-1.6.0.dist-info}/RECORD +120 -121
- {xinference-1.5.0.post2.dist-info → xinference-1.6.0.dist-info}/WHEEL +1 -1
- xinference/core/image_interface.py +0 -377
- xinference/model/llm/transformers/compression.py +0 -258
- xinference/model/llm/transformers/yi_vl.py +0 -239
- xinference/thirdparty/cosyvoice/bin/export_trt.sh +0 -9
- xinference/web/ui/build/static/css/main.0f6523be.css.map +0 -1
- xinference/web/ui/build/static/js/main.4b67a723.js +0 -3
- xinference/web/ui/build/static/js/main.4b67a723.js.map +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/0f0adb2283a8f469d097a7a0ebb754624fa52414c83b83696c41f2e6a737ceda.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/51709f5d3e53bcf19e613662ef9b91fb9174942c5518987a248348dd4e1e0e02.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/8157db83995c671eb57abc316c337f867d1dc63fb83520bb4ff351fee57dcce2.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/8f9af2979e45d4648f0cfae108363e58ee421c29a9d4e7329b6f06d9adfd4133.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/9c8b1a86e7c65b2b2599a205e30920652d6c2105f926508ef5bcf29a3ef4ce76.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/b8551e9775a01b28ae674125c688febe763732ea969ae344512e64ea01bf632e.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/e4ba658c6b3b0490910acdae0c535a892257efb61539a24adf8038fc653bd22f.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/efe7cd132c27a8f9fd5352a394c491fd5fb0da0348cf9fcbd923164a32365eab.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/f04f666b77b44d7be3e16034d6b0074de2ba9c254f1fae15222b3148608fa8b3.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/f199e8173f6409a5802ed44acb95f218388131136504b2e9132129e150c92f9a.json +0 -1
- /xinference/web/ui/build/static/js/{main.4b67a723.js.LICENSE.txt → main.ae579a97.js.LICENSE.txt} +0 -0
- {xinference-1.5.0.post2.dist-info → xinference-1.6.0.dist-info}/entry_points.txt +0 -0
- {xinference-1.5.0.post2.dist-info → xinference-1.6.0.dist-info}/licenses/LICENSE +0 -0
- {xinference-1.5.0.post2.dist-info → xinference-1.6.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"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 _defineProperty from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{AddCircle}from'@mui/icons-material';import DeleteIcon from'@mui/icons-material/Delete';import{Alert,Autocomplete,Box,IconButton,Snackbar,TextField}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\";var AddPair=function AddPair(_ref){var customData=_ref.customData,pairData=_ref.pairData,_ref$tipOptions=_ref.tipOptions,tipOptions=_ref$tipOptions===void 0?[]:_ref$tipOptions,onGetArr=_ref.onGetArr,onJudgeArr=_ref.onJudgeArr;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),openSnackbar=_useState2[0],setOpenSnackbar=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),arr=_useState4[0],setArr=_useState4[1];var _useState5=useState(0),_useState6=_slicedToArray(_useState5,2),arrId=_useState6[0],setArrId=_useState6[1];var _useState7=useState(-1),_useState8=_slicedToArray(_useState7,2),defaultIndex=_useState8[0],setDefaultIndex=_useState8[1];var _useState9=useState(false),_useState10=_slicedToArray(_useState9,2),isNotUniqueKey=_useState10[0],setIsNotUniqueKey=_useState10[1];useEffect(function(){onGetArr(arr);},[arr]);useEffect(function(){var dataArr=[];pairData.forEach(function(item,index){var _dataArr$push;dataArr.push((_dataArr$push={id:index},_defineProperty(_dataArr$push,customData.key,item[customData.key]),_defineProperty(_dataArr$push,customData.value,item[customData.value]),_dataArr$push));});setArrId(pairData.length);setArr(dataArr);},[pairData]);var updateArr=function updateArr(index,type,newValue){setArr(arr.map(function(pair,subIndex){if(subIndex===index){return _objectSpread(_objectSpread({},pair),{},_defineProperty({},type,newValue));}return pair;}));if(type===customData.key){setDefaultIndex(-1);setIsNotUniqueKey(false);arr.forEach(function(pair){if(pair[customData.key]===newValue){setDefaultIndex(index);setIsNotUniqueKey(true);}});}};var handleDeleteArr=function handleDeleteArr(index){setDefaultIndex(-1);setArr(arr.filter(function(_,subIndex){return index!==subIndex;}));onGetArr(arr);};return/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(Box,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',margin:'20px 0 0 15px'},children:[/*#__PURE__*/_jsx(\"div\",{children:customData.title}),/*#__PURE__*/_jsx(IconButton,{color:\"primary\",onClick:function onClick(){setArrId(arrId+1);var obj={id:arrId};obj[customData.key]='';obj[customData.value]='';onJudgeArr(arr,[customData.key,customData.value])?setArr([].concat(_toConsumableArray(arr),[obj])):setOpenSnackbar(true);},children:/*#__PURE__*/_jsx(AddCircle,{})})]}),/*#__PURE__*/_jsx(Box,{children:arr.map(function(item,index){return/*#__PURE__*/_jsxs(Box,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',justifyContent:'space-between',alignItems:'center',marginTop:'10px',marginLeft:'10px'},children:[tipOptions.length?/*#__PURE__*/_jsx(Autocomplete,{style:{width:'44%'},disablePortal:true,options:tipOptions,value:item[customData.key],inputValue:item[customData.key],onInputChange:function onInputChange(_,newValue){updateArr(index,customData.key,newValue);},renderInput:function renderInput(params){return/*#__PURE__*/_jsx(TextField,_objectSpread(_objectSpread({className:\"textHighlight\"},params),{},{label:customData.key}));}}):/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",label:customData.key,value:item[customData.key],onChange:function onChange(e){updateArr(index,customData.key,e.target.value);},style:{width:'44%'}}),/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",label:customData.value,value:item[customData.value],onChange:function onChange(e){updateArr(index,customData.value,e.target.value);},style:{width:'44%'}}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(){return handleDeleteArr(index);},style:{marginLeft:'10px'},children:/*#__PURE__*/_jsx(DeleteIcon,{})})]}),isNotUniqueKey&&defaultIndex===index&&/*#__PURE__*/_jsxs(Alert,{severity:\"error\",children:[customData.key,\" must be unique\"]})]},item.id);})})]}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:openSnackbar,onClose:function onClose(){return setOpenSnackbar(false);},message:\"Please fill in the complete parameters before adding!!\"},'top'+'center')]});};export default AddPair;","map":{"version":3,"names":["AddCircle","DeleteIcon","Alert","Autocomplete","Box","IconButton","Snackbar","TextField","React","useEffect","useState","jsx","_jsx","jsxs","_jsxs","AddPair","_ref","customData","pairData","_ref$tipOptions","tipOptions","onGetArr","onJudgeArr","_useState","_useState2","_slicedToArray","openSnackbar","setOpenSnackbar","_useState3","_useState4","arr","setArr","_useState5","_useState6","arrId","setArrId","_useState7","_useState8","defaultIndex","setDefaultIndex","_useState9","_useState10","isNotUniqueKey","setIsNotUniqueKey","dataArr","forEach","item","index","_dataArr$push","push","id","_defineProperty","key","value","length","updateArr","type","newValue","map","pair","subIndex","_objectSpread","handleDeleteArr","filter","_","children","style","display","alignItems","margin","title","color","onClick","obj","concat","_toConsumableArray","justifyContent","marginTop","marginLeft","width","disablePortal","options","inputValue","onInputChange","renderInput","params","className","label","onChange","e","target","severity","anchorOrigin","vertical","horizontal","open","onClose","message"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/components/addPair.js"],"sourcesContent":["import { AddCircle } from '@mui/icons-material'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport {\n Alert,\n Autocomplete,\n Box,\n IconButton,\n Snackbar,\n TextField,\n} from '@mui/material'\nimport React, { useEffect, useState } from 'react'\n\nconst AddPair = ({\n customData,\n pairData,\n tipOptions = [],\n onGetArr,\n onJudgeArr,\n}) => {\n const [openSnackbar, setOpenSnackbar] = useState(false)\n const [arr, setArr] = useState([])\n const [arrId, setArrId] = useState(0)\n const [defaultIndex, setDefaultIndex] = useState(-1)\n const [isNotUniqueKey, setIsNotUniqueKey] = useState(false)\n\n useEffect(() => {\n onGetArr(arr)\n }, [arr])\n\n useEffect(() => {\n const dataArr = []\n pairData.forEach((item, index) => {\n dataArr.push({\n id: index,\n [customData.key]: item[customData.key],\n [customData.value]: item[customData.value],\n })\n })\n setArrId(pairData.length)\n setArr(dataArr)\n }, [pairData])\n\n const updateArr = (index, type, newValue) => {\n setArr(\n arr.map((pair, subIndex) => {\n if (subIndex === index) {\n return { ...pair, [type]: newValue }\n }\n return pair\n })\n )\n if (type === customData.key) {\n setDefaultIndex(-1)\n setIsNotUniqueKey(false)\n arr.forEach((pair) => {\n if (pair[customData.key] === newValue) {\n setDefaultIndex(index)\n setIsNotUniqueKey(true)\n }\n })\n }\n }\n\n const handleDeleteArr = (index) => {\n setDefaultIndex(-1)\n setArr(\n arr.filter((_, subIndex) => {\n return index !== subIndex\n })\n )\n onGetArr(arr)\n }\n\n return (\n <div>\n <Box>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n margin: '20px 0 0 15px',\n }}\n >\n <div>{customData.title}</div>\n <IconButton\n color=\"primary\"\n onClick={() => {\n setArrId(arrId + 1)\n let obj = { id: arrId }\n obj[customData.key] = ''\n obj[customData.value] = ''\n onJudgeArr(arr, [customData.key, customData.value])\n ? setArr([...arr, obj])\n : setOpenSnackbar(true)\n }}\n >\n <AddCircle />\n </IconButton>\n </div>\n <Box>\n {arr.map((item, index) => {\n return (\n <Box key={item.id}>\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginTop: '10px',\n marginLeft: '10px',\n }}\n >\n {tipOptions.length ? (\n <Autocomplete\n style={{ width: '44%' }}\n disablePortal\n options={tipOptions}\n value={item[customData.key]}\n inputValue={item[customData.key]}\n onInputChange={(_, newValue) => {\n updateArr(index, customData.key, newValue)\n }}\n renderInput={(params) => (\n <TextField\n className=\"textHighlight\"\n {...params}\n label={customData.key}\n />\n )}\n />\n ) : (\n <TextField\n className=\"textHighlight\"\n label={customData.key}\n value={item[customData.key]}\n onChange={(e) => {\n updateArr(index, customData.key, e.target.value)\n }}\n style={{ width: '44%' }}\n />\n )}\n <TextField\n className=\"textHighlight\"\n label={customData.value}\n value={item[customData.value]}\n onChange={(e) => {\n updateArr(index, customData.value, e.target.value)\n }}\n style={{ width: '44%' }}\n />\n <IconButton\n aria-label=\"delete\"\n onClick={() => handleDeleteArr(index)}\n style={{ marginLeft: '10px' }}\n >\n <DeleteIcon />\n </IconButton>\n </div>\n {isNotUniqueKey && defaultIndex === index && (\n <Alert severity=\"error\">\n {customData.key} must be unique\n </Alert>\n )}\n </Box>\n )\n })}\n </Box>\n </Box>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={openSnackbar}\n onClose={() => setOpenSnackbar(false)}\n message=\"Please fill in the complete parameters before adding!!\"\n key={'top' + 'center'}\n />\n </div>\n )\n}\n\nexport default AddPair\n"],"mappings":"6jBAAA,OAASA,SAAS,KAAQ,qBAAqB,CAC/C,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OACEC,KAAK,CACLC,YAAY,CACZC,GAAG,CACHC,UAAU,CACVC,QAAQ,CACRC,SAAS,KACJ,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAElD,GAAM,CAAAC,OAAO,CAAG,QAAV,CAAAA,OAAOA,CAAAC,IAAA,CAMP,IALJ,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,eAAA,CAAAH,IAAA,CACRI,UAAU,CAAVA,UAAU,CAAAD,eAAA,UAAG,EAAE,CAAAA,eAAA,CACfE,QAAQ,CAAAL,IAAA,CAARK,QAAQ,CACRC,UAAU,CAAAN,IAAA,CAAVM,UAAU,CAEV,IAAAC,SAAA,CAAwCb,QAAQ,CAAC,KAAK,CAAC,CAAAc,UAAA,CAAA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KAAM,CAAE,CACzB,CAAC,cACFnE,IAAA,CAACP,UAAU,EACT,aAAW,QAAQ,CACnBmE,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAAV,eAAe,CAACf,KAAK,CAAC,EAAC,CACtCmB,KAAK,CAAE,CAAEY,UAAU,CAAE,MAAO,CAAE,CAAAb,QAAA,cAE9BrD,IAAA,CAACX,UAAU,GAAE,CAAC,CACJ,CAAC,EACV,CAAC,CACLyC,cAAc,EAAIJ,YAAY,GAAKS,KAAK,eACvCjC,KAAA,CAACZ,KAAK,EAACyF,QAAQ,CAAC,OAAO,CAAA1B,QAAA,EACpBhD,UAAU,CAACmC,GAAG,CAAC,iBAClB,EAAO,CACR,GA5DON,IAAI,CAACI,EA6DV,CAAC,CAEV,CAAC,CAAC,CACC,CAAC,EACH,CAAC,cACNtC,IAAA,CAACN,QAAQ,EACPsF,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDC,IAAI,CAAErE,YAAa,CACnBsE,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAArE,eAAe,CAAC,KAAK,CAAC,EAAC,CACtCsE,OAAO,CAAC,wDAAwD,EAC3D,KAAK,CAAG,QACd,CAAC,EACC,CAAC,CAEV,CAAC,CAED,cAAe,CAAAlF,OAAO","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _createForOfIteratorHelper from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Button,Dialog,DialogActions,DialogContent,DialogTitle,TextField}from'@mui/material';import React,{useState}from'react';import{useTranslation}from'react-i18next';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var PasteDialog=function PasteDialog(_ref){var open=_ref.open,onHandleClose=_ref.onHandleClose,onHandleCommandLine=_ref.onHandleCommandLine;var _useTranslation=useTranslation(),t=_useTranslation.t;var _useState=useState(''),_useState2=_slicedToArray(_useState,2),command=_useState2[0],setCommand=_useState2[1];var handleClose=function handleClose(){onHandleClose();setCommand('');};var parseXinferenceCommand=function parseXinferenceCommand(){var params={};var peftModelConfig={lora_list:[],image_lora_load_kwargs:{},image_lora_fuse_kwargs:{}};var quantizationConfig={};var newcommand=command.replace('xinference launch','').trim();var args=newcommand.match(/--[\\w-]+(?:\\s+(?:\"[^\"]*\"|'[^']*'|(?:[^\\s-][^\\s]*\\s*)+))?/g)||[];var _iterator=_createForOfIteratorHelper(args),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var arg=_step.value;var match=arg.trim().match(/^--([\\w-]+)\\s+(?:\"([^\"]+)\"|'([^']+)'|(.+))?$/);if(!match)continue;var key=match[1];var value=match[2]||match[3]||match[4]||'';var normalizedKey=key.replace(/-/g,'_');if(normalizedKey==='gpu_idx'){params[normalizedKey]=value.split(',').map(Number);}else if(normalizedKey==='lora_modules'){var loraPairs=value.split(/\\s+/);for(var i=0;i<loraPairs.length;i+=2){var lora_name=loraPairs[i];var local_path=loraPairs[i+1];if(lora_name&&local_path){peftModelConfig.lora_list.push({lora_name:lora_name,local_path:local_path});}}}else if(normalizedKey==='image_lora_load_kwargs'){var _value$split=value.split(/\\s+/),_value$split2=_slicedToArray(_value$split,2),load_param=_value$split2[0],load_value=_value$split2[1];peftModelConfig.image_lora_load_kwargs[load_param]=load_value;}else if(normalizedKey==='image_lora_fuse_kwargs'){var _value$split3=value.split(/\\s+/),_value$split4=_slicedToArray(_value$split3,2),fuse_param=_value$split4[0],fuse_value=_value$split4[1];peftModelConfig.image_lora_fuse_kwargs[fuse_param]=fuse_value;}else if(normalizedKey==='quantization_config'){var quantizationConfigPairs=value.split(/\\s+/);var k=quantizationConfigPairs[0];var v=quantizationConfigPairs[1];quantizationConfig[k]=v;}else{if(['cpu_offload','reasoning_content'].includes(normalizedKey)){params[normalizedKey]=value==='true'?true:false;}else if(normalizedKey==='size_in_billions'){params['model_size_in_billions']=value;}else{params[normalizedKey]=value;}}}}catch(err){_iterator.e(err);}finally{_iterator.f();}if(peftModelConfig.lora_list.length>0||Object.keys(peftModelConfig.image_lora_load_kwargs).length>0||Object.keys(peftModelConfig.image_lora_fuse_kwargs).length>0){params.peft_model_config=peftModelConfig;}if(quantizationConfig&&Object.keys(quantizationConfig).length>0){params.quantization_config=quantizationConfig;}onHandleCommandLine(params);handleClose();};return/*#__PURE__*/_jsxs(Dialog,{open:open,children:[/*#__PURE__*/_jsx(DialogTitle,{children:t('launchModel.commandLineParsing')}),/*#__PURE__*/_jsx(DialogContent,{children:/*#__PURE__*/_jsx(\"div\",{style:{width:'500px',height:'120px'},children:/*#__PURE__*/_jsx(TextField,{multiline:true,fullWidth:true,rows:5,placeholder:t('launchModel.placeholderTip'),value:command,onChange:function onChange(e){setCommand(e.target.value);}})})}),/*#__PURE__*/_jsxs(DialogActions,{children:[/*#__PURE__*/_jsx(Button,{onClick:handleClose,children:t('launchModel.cancel')}),/*#__PURE__*/_jsx(Button,{autoFocus:true,onClick:parseXinferenceCommand,children:t('launchModel.confirm')})]})]});};export default PasteDialog;","map":{"version":3,"names":["Button","Dialog","DialogActions","DialogContent","DialogTitle","TextField","React","useState","useTranslation","jsx","_jsx","jsxs","_jsxs","PasteDialog","_ref","open","onHandleClose","onHandleCommandLine","_useTranslation","t","_useState","_useState2","_slicedToArray","command","setCommand","handleClose","parseXinferenceCommand","params","peftModelConfig","lora_list","image_lora_load_kwargs","image_lora_fuse_kwargs","quantizationConfig","newcommand","replace","trim","args","match","_iterator","_createForOfIteratorHelper","_step","s","n","done","arg","value","key","normalizedKey","split","map","Number","loraPairs","i","length","lora_name","local_path","push","_value$split","_value$split2","load_param","load_value","_value$split3","_value$split4","fuse_param","fuse_value","quantizationConfigPairs","k","v","includes","err","e","f","Object","keys","peft_model_config","quantization_config","children","style","width","height","multiline","fullWidth","rows","placeholder","onChange","target","onClick","autoFocus"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/components/pasteDialog.js"],"sourcesContent":["import {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n TextField,\n} from '@mui/material'\nimport React, { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\n\nconst PasteDialog = ({ open, onHandleClose, onHandleCommandLine }) => {\n const { t } = useTranslation()\n const [command, setCommand] = useState('')\n\n const handleClose = () => {\n onHandleClose()\n setCommand('')\n }\n\n const parseXinferenceCommand = () => {\n const params = {}\n const peftModelConfig = {\n lora_list: [],\n image_lora_load_kwargs: {},\n image_lora_fuse_kwargs: {},\n }\n const quantizationConfig = {}\n let newcommand = command.replace('xinference launch', '').trim()\n const args =\n newcommand.match(\n /--[\\w-]+(?:\\s+(?:\"[^\"]*\"|'[^']*'|(?:[^\\s-][^\\s]*\\s*)+))?/g\n ) || []\n\n for (const arg of args) {\n const match = arg\n .trim()\n .match(/^--([\\w-]+)\\s+(?:\"([^\"]+)\"|'([^']+)'|(.+))?$/)\n if (!match) continue\n\n const key = match[1]\n const value = match[2] || match[3] || match[4] || ''\n const normalizedKey = key.replace(/-/g, '_')\n\n if (normalizedKey === 'gpu_idx') {\n params[normalizedKey] = value.split(',').map(Number)\n } else if (normalizedKey === 'lora_modules') {\n const loraPairs = value.split(/\\s+/)\n for (let i = 0; i < loraPairs.length; i += 2) {\n const lora_name = loraPairs[i]\n const local_path = loraPairs[i + 1]\n if (lora_name && local_path) {\n peftModelConfig.lora_list.push({ lora_name, local_path })\n }\n }\n } else if (normalizedKey === 'image_lora_load_kwargs') {\n const [load_param, load_value] = value.split(/\\s+/)\n peftModelConfig.image_lora_load_kwargs[load_param] = load_value\n } else if (normalizedKey === 'image_lora_fuse_kwargs') {\n const [fuse_param, fuse_value] = value.split(/\\s+/)\n peftModelConfig.image_lora_fuse_kwargs[fuse_param] = fuse_value\n } else if (normalizedKey === 'quantization_config') {\n const quantizationConfigPairs = value.split(/\\s+/)\n const k = quantizationConfigPairs[0]\n const v = quantizationConfigPairs[1]\n quantizationConfig[k] = v\n } else {\n if (['cpu_offload', 'reasoning_content'].includes(normalizedKey)) {\n params[normalizedKey] = value === 'true' ? true : false\n } else if (normalizedKey === 'size_in_billions') {\n params['model_size_in_billions'] = value\n } else {\n params[normalizedKey] = value\n }\n }\n }\n\n if (\n peftModelConfig.lora_list.length > 0 ||\n Object.keys(peftModelConfig.image_lora_load_kwargs).length > 0 ||\n Object.keys(peftModelConfig.image_lora_fuse_kwargs).length > 0\n ) {\n params.peft_model_config = peftModelConfig\n }\n\n if (quantizationConfig && Object.keys(quantizationConfig).length > 0) {\n params.quantization_config = quantizationConfig\n }\n\n onHandleCommandLine(params)\n handleClose()\n }\n\n return (\n <Dialog open={open}>\n <DialogTitle>{t('launchModel.commandLineParsing')}</DialogTitle>\n <DialogContent>\n <div style={{ width: '500px', height: '120px' }}>\n <TextField\n multiline\n fullWidth\n rows={5}\n placeholder={t('launchModel.placeholderTip')}\n value={command}\n onChange={(e) => {\n setCommand(e.target.value)\n }}\n />\n </div>\n </DialogContent>\n <DialogActions>\n <Button onClick={handleClose}>{t('launchModel.cancel')}</Button>\n <Button autoFocus onClick={parseXinferenceCommand}>\n {t('launchModel.confirm')}\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n\nexport default PasteDialog\n"],"mappings":"kTAAA,OACEA,MAAM,CACNC,MAAM,CACNC,aAAa,CACbC,aAAa,CACbC,WAAW,CACXC,SAAS,KACJ,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,QAAQ,KAAQ,OAAO,CACvC,OAASC,cAAc,KAAQ,eAAe,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE9C,GAAM,CAAAC,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAAC,IAAA,CAAqD,IAA/C,CAAAC,IAAI,CAAAD,I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C,CAEb,CAAC,CAED,cAAe,CAAAN,WAAW","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box,Button,ButtonGroup,Chip,FormControl,InputLabel,MenuItem,Select}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{useCookies}from'react-cookie';import{useTranslation}from'react-i18next';import{ApiContext}from'../../components/apiContext';import fetchWrapper from'../../components/fetchWrapper';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';import ModelCard from'./modelCard';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var modelAbilityArr=['generate','chat','vision','reasoning'];var audioModelTypeArr=['audio2text','text2audio','audio2audio'];var LaunchModelComponent=function LaunchModelComponent(_ref){var modelType=_ref.modelType,gpuAvailable=_ref.gpuAvailable,featureModels=_ref.featureModels;var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi,endPoint=_useContext.endPoint;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState(''),_useState6=_slicedToArray(_useState5,2),LLMModelAbility=_useState6[0],setLLMModelAbility=_useState6[1];var _useState7=useState(''),_useState8=_slicedToArray(_useState7,2),status=_useState8[0],setStatus=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),statusArr=_useState10[0],setStatusArr=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),completeDeleteArr=_useState12[0],setCompleteDeleteArr=_useState12[1];var _useState13=useState([]),_useState14=_slicedToArray(_useState13,2),collectionArr=_useState14[0],setCollectionArr=_useState14[1];var _useState15=useState([]),_useState16=_slicedToArray(_useState15,2),filterArr=_useState16[0],setFilterArr=_useState16[1];var _useTranslation=useTranslation(),t=_useTranslation.t;var _useState17=useState('featured'),_useState18=_slicedToArray(_useState17,2),modelListType=_useState18[0],setModelListType=_useState18[1];var _useState19=useState(''),_useState20=_slicedToArray(_useState19,2),audioModelAbility=_useState20[0],setAudioModelAbility=_useState20[1];var filter=function filter(registration){if(searchTerm!==''){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';var modelDescription=registration.model_description?registration.model_description.toLowerCase():'';if(!modelName.includes(searchTerm.toLowerCase())&&!modelDescription.includes(searchTerm.toLowerCase())){return false;}}if(modelListType==='featured'){if(featureModels.length&&!featureModels.includes(registration.model_name)){return false;}}if(LLMModelAbility&&(Array.isArray(registration.model_ability)&®istration.model_ability.indexOf(LLMModelAbility)<0||typeof registration.model_ability==='string'&®istration.model_ability!==LLMModelAbility))return false;if(audioModelAbility&&(Array.isArray(registration.model_ability)&®istration.model_ability.indexOf(audioModelAbility)<0||typeof registration.model_ability==='string'&®istration.model_ability!==audioModelAbility))return false;if(completeDeleteArr.includes(registration.model_name)){registration.model_specs.forEach(function(item){item.cache_status=Array.isArray(item)?[false]:false;});}if(statusArr.length===1){if(statusArr[0]==='cached'){var _registration$model_s;var judge=((_registration$model_s=registration.model_specs)===null||_registration$model_s===void 0?void 0:_registration$model_s.some(function(spec){return filterCache(spec);}))||(registration===null||registration===void 0?void 0:registration.cache_status);return judge&&!completeDeleteArr.includes(registration.model_name);}else{return collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name);}}else if(statusArr.length>1){var _registration$model_s2;var _judge=((_registration$model_s2=registration.model_specs)===null||_registration$model_s2===void 0?void 0:_registration$model_s2.some(function(spec){return filterCache(spec);}))||(registration===null||registration===void 0?void 0:registration.cache_status);return _judge&&!completeDeleteArr.includes(registration.model_name)&&(collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name));}return true;};var filterCache=function filterCache(spec){if(Array.isArray(spec.cache_status)){var _spec$cache_status;return(_spec$cache_status=spec.cache_status)===null||_spec$cache_status===void 0?void 0:_spec$cache_status.some(function(cs){return cs;});}else{return spec.cache_status===true;}};var handleCompleteDelete=function handleCompleteDelete(model_name){setCompleteDeleteArr([].concat(_toConsumableArray(completeDeleteArr),[model_name]));};var update=function update(){if(isCallingApi||isUpdatingModel||cookie.token!=='no_auth'&&!sessionStorage.getItem('token'))return;try{setIsCallingApi(true);fetchWrapper.get(\"/v1/model_registrations/\".concat(modelType,\"?detailed=true\")).then(function(data){var builtinRegistrations=data.filter(function(v){return v.is_builtin;});setRegistrationData(builtinRegistrations);var collectionData=JSON.parse(localStorage.getItem('collectionArr'));setCollectionArr(collectionData);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}catch(error){console.error('Error:',error);}finally{setIsCallingApi(false);}};useEffect(function(){update();},[cookie.token]);var getCollectionArr=function getCollectionArr(data){setCollectionArr(data);};var handleChangeFilter=function handleChangeFilter(type,value){var typeMap={LLMModelAbility:{setter:setLLMModelAbility,filterArr:modelAbilityArr},audioModelAbility:{setter:setAudioModelAbility,filterArr:audioModelTypeArr},status:{setter:setStatus,filterArr:[]}};var _ref2=typeMap[type]||{},setter=_ref2.setter,excludeArr=_ref2.filterArr;if(!setter)return;setter(value);var updatedFilterArr=[].concat(_toConsumableArray(filterArr.filter(function(item){return!excludeArr.includes(item);})),[value]);setFilterArr(updatedFilterArr);if(type==='status'){setStatusArr(updatedFilterArr.filter(function(item){return![].concat(modelAbilityArr,audioModelTypeArr).includes(item);}));}};var handleDeleteChip=function handleDeleteChip(item){setFilterArr(filterArr.filter(function(subItem){return subItem!==item;}));if(item===LLMModelAbility){setLLMModelAbility('');}else if(item===audioModelAbility){setAudioModelAbility('');}else{setStatusArr(statusArr.filter(function(subItem){return subItem!==item;}));if(item===status)setStatus('');}};var handleModelType=function handleModelType(newModelType){if(newModelType!==null){setModelListType(newModelType);}};return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'grid',gridTemplateColumns:function(){var baseColumns=['LLM','audio'].includes(modelType)?['150px','150px']:['150px'];return featureModels.length?[].concat(baseColumns,['150px','1fr']).join(' '):[].concat(baseColumns,['1fr']).join(' ');}(),columnGap:'20px',margin:'30px 2rem',alignItems:'center'},children:[featureModels.length>0&&/*#__PURE__*/_jsx(FormControl,{sx:{minWidth:120},size:\"small\",children:/*#__PURE__*/_jsxs(ButtonGroup,{children:[/*#__PURE__*/_jsx(Button,{fullWidth:true,onClick:function onClick(){return handleModelType('featured');},variant:modelListType==='featured'?'contained':'outlined',children:t('launchModel.featured')}),/*#__PURE__*/_jsx(Button,{fullWidth:true,onClick:function onClick(){return handleModelType('all');},variant:modelListType==='all'?'contained':'outlined',children:t('launchModel.all')})]})}),modelType==='LLM'&&/*#__PURE__*/_jsxs(FormControl,{sx:{minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"ability-select-label\",children:t('launchModel.modelAbility')}),/*#__PURE__*/_jsx(Select,{id:\"ability\",labelId:\"ability-select-label\",label:\"Model Ability\",onChange:function onChange(e){return handleChangeFilter('LLMModelAbility',e.target.value);},value:LLMModelAbility,size:\"small\",sx:{width:'150px'},children:modelAbilityArr.map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:t(\"launchModel.\".concat(item))},item);})})]}),modelType==='audio'&&/*#__PURE__*/_jsxs(FormControl,{sx:{minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"ability-select-label\",children:t('launchModel.modelAbility')}),/*#__PURE__*/_jsx(Select,{id:\"ability\",labelId:\"ability-select-label\",label:\"Model Ability\",onChange:function onChange(e){return handleChangeFilter('audioModelAbility',e.target.value);},value:audioModelAbility,size:\"small\",sx:{width:'150px'},children:audioModelTypeArr.map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:item},item);})})]}),/*#__PURE__*/_jsxs(FormControl,{sx:{minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"select-status\",children:t('launchModel.status')}),/*#__PURE__*/_jsxs(Select,{id:\"status\",labelId:\"select-status\",label:t('launchModel.status'),onChange:function onChange(e){return handleChangeFilter('status',e.target.value);},value:status,size:\"small\",sx:{width:'150px'},children:[/*#__PURE__*/_jsx(MenuItem,{value:\"cached\",children:t('launchModel.cached')}),/*#__PURE__*/_jsx(MenuItem,{value:\"favorite\",children:t('launchModel.favorite')})]})]}),/*#__PURE__*/_jsx(FormControl,{sx:{marginTop:1},variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:t('launchModel.search'),value:searchTerm,onChange:function onChange(e){return setSearchTerm(e.target.value);},size:\"small\",hotkey:\"Enter\",t:t})})]}),/*#__PURE__*/_jsx(\"div\",{style:{margin:'0 0 30px 30px'},children:filterArr.map(function(item,index){return/*#__PURE__*/_jsx(Chip,{label:t(\"launchModel.\".concat(item)),variant:\"outlined\",size:\"small\",color:\"primary\",style:{marginRight:10},onDelete:function onDelete(){return handleDeleteChip(item);}},index);})}),/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',gridGap:'2rem 0rem'},children:registrationData.filter(function(registration){return filter(registration);}).sort(function(a,b){if(modelListType==='featured'){var indexA=featureModels.indexOf(a.model_name);var indexB=featureModels.indexOf(b.model_name);return(indexA!==-1?indexA:Infinity)-(indexB!==-1?indexB:Infinity);}return 0;}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,gpuAvailable:gpuAvailable,modelType:modelType,onHandleCompleteDelete:handleCompleteDelete,onGetCollectionArr:getCollectionArr},filteredRegistration.model_name);})})]});};export default LaunchModelComponent;","map":{"version":3,"names":["Box","Button","ButtonGroup","Chip","FormControl","InputLabel","MenuItem","Select","React","useContext","useEffect","useState","useCookies","useTranslation","ApiContext","fetchWrapper","HotkeyFocusTextField","ModelCard","jsx","_jsx","jsxs","_jsxs","modelAbilityArr","audioModelTypeArr","LaunchModelComponent","_ref","modelType","gpuAvailable","featureModels","_useContext","isCallingApi","setIsCallingApi","endPoint","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","_slicedToArray","cookie","_useState","_useState2","registrationData","setRegistrationData","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","_useState6","LLMModelAbility","setLLMModelAbility","_useState7","_useState8","status","setStatus","_useState9","_useState10","statusArr","setStatusArr","_useState11","_useState12","completeDeleteArr","setCompleteDeleteArr","_useState13","_useState14","collectionArr","setCollectionArr","_useState15","_useState16","filterArr","setFilterArr","_useTranslation","t","_useState17","_useState18","modelListType","setModelListType","_useState19","_useState20","audioModelAbility","setAudioModelAbility","filter","registration","modelName","model_name","toLowerCase","modelDescription","model_description","includes","length","Array","isArray","model_ability","indexOf","model_specs","forEach","item","cache_status","_registration$model_s","judge","some","spec","filterCache","_registration$model_s2","_spec$cache_status","cs","handleCompleteDelete","concat","_toConsumableArray","update","token","sessionStorage","getItem","get","then","data","builtinRegistrations","v","is_builtin","collectionData","JSON","parse","localStorage","catch","error","console","response","message","getCollectionArr","handleChangeFilter","type","value","typeMap","setter","_ref2","excludeArr","updatedFilterArr","handleDeleteChip","subItem","handleModelType","newModelType","m","children","style","display","gridTemplateColumns","baseColumns","join","columnGap","margin","alignItems","sx","minWidth","size","fullWidth","onClick","variant","id","labelId","label","onChange","e","target","width","map","marginTop","hotkey","index","color","marginRight","onDelete","paddingLeft","gridGap","sort","a","b","indexA","indexB","Infinity","filteredRegistration","url","modelData","onHandleCompleteDelete","onGetCollectionArr"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/LaunchModel.js"],"sourcesContent":["import {\n Box,\n Button,\n ButtonGroup,\n Chip,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n} from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useTranslation } from 'react-i18next'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport ModelCard from './modelCard'\n\nconst modelAbilityArr = ['generate', 'chat', 'vision', 'reasoning']\nconst audioModelTypeArr = ['audio2text', 'text2audio', 'audio2audio']\n\nconst LaunchModelComponent = ({ modelType, gpuAvailable, featureModels }) => {\n const { isCallingApi, setIsCallingApi, endPoint } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n\n const [registrationData, setRegistrationData] = useState([])\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n const [LLMModelAbility, setLLMModelAbility] = useState('')\n const [status, setStatus] = useState('')\n const [statusArr, setStatusArr] = useState([])\n const [completeDeleteArr, setCompleteDeleteArr] = useState([])\n const [collectionArr, setCollectionArr] = useState([])\n const [filterArr, setFilterArr] = useState([])\n const { t } = useTranslation()\n const [modelListType, setModelListType] = useState('featured')\n const [audioModelAbility, setAudioModelAbility] = useState('')\n\n const filter = (registration) => {\n if (searchTerm !== '') {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n const modelDescription = registration.model_description\n ? registration.model_description.toLowerCase()\n : ''\n\n if (\n !modelName.includes(searchTerm.toLowerCase()) &&\n !modelDescription.includes(searchTerm.toLowerCase())\n ) {\n return false\n }\n }\n\n if (modelListType === 'featured') {\n if (\n featureModels.length &&\n !featureModels.includes(registration.model_name)\n ) {\n return false\n }\n }\n\n if (\n LLMModelAbility &&\n ((Array.isArray(registration.model_ability) &&\n registration.model_ability.indexOf(LLMModelAbility) < 0) ||\n (typeof registration.model_ability === 'string' &&\n registration.model_ability !== LLMModelAbility))\n )\n return false\n\n if (\n audioModelAbility &&\n ((Array.isArray(registration.model_ability) &&\n registration.model_ability.indexOf(audioModelAbility) < 0) ||\n (typeof registration.model_ability === 'string' &&\n registration.model_ability !== audioModelAbility))\n )\n return false\n\n if (completeDeleteArr.includes(registration.model_name)) {\n registration.model_specs.forEach((item) => {\n item.cache_status = Array.isArray(item) ? [false] : false\n })\n }\n\n if (statusArr.length === 1) {\n if (statusArr[0] === 'cached') {\n const judge =\n registration.model_specs?.some((spec) => filterCache(spec)) ||\n registration?.cache_status\n return judge && !completeDeleteArr.includes(registration.model_name)\n } else {\n return collectionArr?.includes(registration.model_name)\n }\n } else if (statusArr.length > 1) {\n const judge =\n registration.model_specs?.some((spec) => filterCache(spec)) ||\n registration?.cache_status\n return (\n judge &&\n !completeDeleteArr.includes(registration.model_name) &&\n collectionArr?.includes(registration.model_name)\n )\n }\n\n return true\n }\n\n const filterCache = (spec) => {\n if (Array.isArray(spec.cache_status)) {\n return spec.cache_status?.some((cs) => cs)\n } else {\n return spec.cache_status === true\n }\n }\n\n const handleCompleteDelete = (model_name) => {\n setCompleteDeleteArr([...completeDeleteArr, model_name])\n }\n\n const update = () => {\n if (\n isCallingApi ||\n isUpdatingModel ||\n (cookie.token !== 'no_auth' && !sessionStorage.getItem('token'))\n )\n return\n\n try {\n setIsCallingApi(true)\n\n fetchWrapper\n .get(`/v1/model_registrations/${modelType}?detailed=true`)\n .then((data) => {\n const builtinRegistrations = data.filter((v) => v.is_builtin)\n setRegistrationData(builtinRegistrations)\n const collectionData = JSON.parse(\n localStorage.getItem('collectionArr')\n )\n setCollectionArr(collectionData)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [cookie.token])\n\n const getCollectionArr = (data) => {\n setCollectionArr(data)\n }\n\n const handleChangeFilter = (type, value) => {\n const typeMap = {\n LLMModelAbility: {\n setter: setLLMModelAbility,\n filterArr: modelAbilityArr,\n },\n audioModelAbility: {\n setter: setAudioModelAbility,\n filterArr: audioModelTypeArr,\n },\n status: { setter: setStatus, filterArr: [] },\n }\n\n const { setter, filterArr: excludeArr } = typeMap[type] || {}\n if (!setter) return\n\n setter(value)\n\n const updatedFilterArr = [\n ...filterArr.filter((item) => !excludeArr.includes(item)),\n value,\n ]\n\n setFilterArr(updatedFilterArr)\n\n if (type === 'status') {\n setStatusArr(\n updatedFilterArr.filter(\n (item) => ![...modelAbilityArr, ...audioModelTypeArr].includes(item)\n )\n )\n }\n }\n\n const handleDeleteChip = (item) => {\n setFilterArr(\n filterArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === LLMModelAbility) {\n setLLMModelAbility('')\n } else if (item === audioModelAbility) {\n setAudioModelAbility('')\n } else {\n setStatusArr(\n statusArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === status) setStatus('')\n }\n }\n\n const handleModelType = (newModelType) => {\n if (newModelType !== null) {\n setModelListType(newModelType)\n }\n }\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: (() => {\n const baseColumns = ['LLM', 'audio'].includes(modelType)\n ? ['150px', '150px']\n : ['150px']\n return featureModels.length\n ? [...baseColumns, '150px', '1fr'].join(' ')\n : [...baseColumns, '1fr'].join(' ')\n })(),\n columnGap: '20px',\n margin: '30px 2rem',\n alignItems: 'center',\n }}\n >\n {featureModels.length > 0 && (\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <ButtonGroup>\n <Button\n fullWidth\n onClick={() => handleModelType('featured')}\n variant={\n modelListType === 'featured' ? 'contained' : 'outlined'\n }\n >\n {t('launchModel.featured')}\n </Button>\n <Button\n fullWidth\n onClick={() => handleModelType('all')}\n variant={modelListType === 'all' ? 'contained' : 'outlined'}\n >\n {t('launchModel.all')}\n </Button>\n </ButtonGroup>\n </FormControl>\n )}\n {modelType === 'LLM' && (\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <InputLabel id=\"ability-select-label\">\n {t('launchModel.modelAbility')}\n </InputLabel>\n <Select\n id=\"ability\"\n labelId=\"ability-select-label\"\n label=\"Model Ability\"\n onChange={(e) =>\n handleChangeFilter('LLMModelAbility', e.target.value)\n }\n value={LLMModelAbility}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n {modelAbilityArr.map((item) => (\n <MenuItem key={item} value={item}>\n {t(`launchModel.${item}`)}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )}\n {modelType === 'audio' && (\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <InputLabel id=\"ability-select-label\">\n {t('launchModel.modelAbility')}\n </InputLabel>\n <Select\n id=\"ability\"\n labelId=\"ability-select-label\"\n label=\"Model Ability\"\n onChange={(e) =>\n handleChangeFilter('audioModelAbility', e.target.value)\n }\n value={audioModelAbility}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n {audioModelTypeArr.map((item) => (\n <MenuItem key={item} value={item}>\n {item}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )}\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <InputLabel id=\"select-status\">{t('launchModel.status')}</InputLabel>\n <Select\n id=\"status\"\n labelId=\"select-status\"\n label={t('launchModel.status')}\n onChange={(e) => handleChangeFilter('status', e.target.value)}\n value={status}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n <MenuItem value=\"cached\">{t('launchModel.cached')}</MenuItem>\n <MenuItem value=\"favorite\">{t('launchModel.favorite')}</MenuItem>\n </Select>\n </FormControl>\n\n <FormControl sx={{ marginTop: 1 }} variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label={t('launchModel.search')}\n value={searchTerm}\n onChange={(e) => setSearchTerm(e.target.value)}\n size=\"small\"\n hotkey=\"Enter\"\n t={t}\n />\n </FormControl>\n </div>\n <div style={{ margin: '0 0 30px 30px' }}>\n {filterArr.map((item, index) => (\n <Chip\n key={index}\n label={t(`launchModel.${item}`)}\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n style={{ marginRight: 10 }}\n onDelete={() => handleDeleteChip(item)}\n />\n ))}\n </div>\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n gridGap: '2rem 0rem',\n }}\n >\n {registrationData\n .filter((registration) => filter(registration))\n .sort((a, b) => {\n if (modelListType === 'featured') {\n const indexA = featureModels.indexOf(a.model_name)\n const indexB = featureModels.indexOf(b.model_name)\n return (\n (indexA !== -1 ? indexA : Infinity) -\n (indexB !== -1 ? indexB : Infinity)\n )\n }\n return 0\n })\n .map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n modelType={modelType}\n onHandleCompleteDelete={handleCompleteDelete}\n onGetCollectionArr={getCollectionArr}\n />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchModelComponent\n"],"mappings":"kSAAA,OACEA,GAAG,CACHC,MAAM,CACNC,WAAW,CACXC,IAAI,CACJC,WAAW,CACXC,UAAU,CACVC,QAAQ,CACRC,MAAM,KACD,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,cAAc,KAAQ,eAAe,CAE9C,OAASC,UAAU,KAAQ,6BAA6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,CAC7C6E,kBAAkB,CAAEvD,gBAAiB,EANhCmD,oBAAoB,CAAC/F,UAO3B,CAAC,EACH,CAAC,CACD,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAA9D,oBAAoB","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import{useTheme}from'@mui/material';import React,{useEffect}from'react';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Drawer=function Drawer(_ref){var isOpen=_ref.isOpen,onClose=_ref.onClose,children=_ref.children;var theme=useTheme();useEffect(function(){if(isOpen){document.body.style.overflow='hidden';}else{document.body.style.overflow='';}return function(){document.body.style.overflow='';};},[isOpen]);return/*#__PURE__*/_jsxs(\"div\",{className:\"drawer \".concat(isOpen?'open':''),children:[/*#__PURE__*/_jsx(\"div\",{className:\"drawer-overlay\",onClick:onClose}),/*#__PURE__*/_jsx(\"div\",{className:\"drawer-content\",style:theme.palette.mode==='dark'?{backgroundColor:'#272727'}:{},children:isOpen&&children})]});};export default Drawer;","map":{"version":3,"names":["useTheme","React","useEffect","jsx","_jsx","jsxs","_jsxs","Drawer","_ref","isOpen","onClose","children","theme","document","body","style","overflow","className","concat","onClick","palette","mode","backgroundColor"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/components/drawer.js"],"sourcesContent":["import { useTheme } from '@mui/material'\nimport React, { useEffect } from 'react'\n\nconst Drawer = ({ isOpen, onClose, children }) => {\n const theme = useTheme()\n\n useEffect(() => {\n if (isOpen) {\n document.body.style.overflow = 'hidden'\n } else {\n document.body.style.overflow = ''\n }\n\n return () => {\n document.body.style.overflow = ''\n }\n }, [isOpen])\n\n return (\n <div className={`drawer ${isOpen ? 'open' : ''}`}>\n <div className=\"drawer-overlay\" onClick={onClose}></div>\n <div\n className=\"drawer-content\"\n style={\n theme.palette.mode === 'dark' ? { backgroundColor: '#272727'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AM","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import LinearProgress from'@mui/material/LinearProgress';import React from'react';import{jsx as _jsx}from\"react/jsx-runtime\";var Progress=function Progress(_ref){var progress=_ref.progress;return/*#__PURE__*/_jsx(\"div\",{style:{marginBottom:10},children:/*#__PURE__*/_jsx(LinearProgress,{variant:\"determinate\",value:progress*100})});};export default Progress;","map":{"version":3,"names":["LinearProgress","React","jsx","_jsx","Progress","_ref","progress","style","marginBottom","children","variant","value"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/components/progress.js"],"sourcesContent":["import LinearProgress from '@mui/material/LinearProgress'\nimport React from 'react'\n\nconst Progress = ({ progress }) => {\n return (\n <div style={{ marginBottom: 10 }}>\n <LinearProgress variant=\"determinate\" value={progress * 100} />\n </div>\n )\n}\n\nexport default Progress\n"],"mappings":"AAAA,MAAO,CAAAA,cAAc,KAAM,8BAA8B,CACzD,MAAO,CAAAC,KAAK,KAAM,OAAO,QAAAC,GAAA,IAAAC,IAAA,yBAEzB,GAAM,CAAAC,QAAQ,CAAG,QAAX,CAAAA,QAAQA,CAAAC,IAAA,CAAqB,IAAf,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAC1B,mBACEH,IAAA,QAAKI,KAAK,CAAE,CAAEC,YAAY,CAAE,EAAG,CAAE,CAAAC,QAAA,cAC/BN,IAAA,CAACH,cAAc,EAACU,OAAO,CAAC,aAAa,CAACC,KAAK,CAAEL,QAAQ,CAAG,GAAI,CAAE,CAAC,CAC5D,CAAC,CAEV,CAAC,CAED,cAAe,CAAAF,QAAQ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import FilterNoneIcon from'@mui/icons-material/FilterNone';import{Alert,Snackbar,Tooltip}from'@mui/material';import ClipboardJS from'clipboard';import React,{useEffect,useRef,useState}from'react';import{useTranslation}from'react-i18next';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";function CopyComponent(_ref){var modelData=_ref.modelData,predefinedKeys=_ref.predefinedKeys;var _useTranslation=useTranslation(),t=_useTranslation.t;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isCopySuccess=_useState2[0],setIsCopySuccess=_useState2[1];var copyRef=useRef(null);var generateCommandLineStatement=function generateCommandLineStatement(params){var args=Object.entries(params).filter(function(_ref2){var _ref3=_slicedToArray(_ref2,2),key=_ref3[0],value=_ref3[1];return predefinedKeys.includes(key)&&value!==null&&value!==undefined||!predefinedKeys.includes(key);}).map(function(_ref4){var _ref5=_slicedToArray(_ref4,2),key=_ref5[0],value=_ref5[1];if(key==='gpu_idx'&&Array.isArray(value)){return\"--gpu-idx \".concat(value.join(','));}else if(key==='peft_model_config'&&typeof value==='object'){var peftArgs=[];if(value.lora_list){peftArgs.push.apply(peftArgs,_toConsumableArray(value.lora_list.map(function(lora){return\"--lora-modules \".concat(lora.lora_name,\" \").concat(lora.local_path);})));}if(value.image_lora_load_kwargs){peftArgs.push.apply(peftArgs,_toConsumableArray(Object.entries(value.image_lora_load_kwargs).map(function(_ref6){var _ref7=_slicedToArray(_ref6,2),k=_ref7[0],v=_ref7[1];return\"--image-lora-load-kwargs \".concat(k,\" \").concat(v);})));}if(value.image_lora_fuse_kwargs){peftArgs.push.apply(peftArgs,_toConsumableArray(Object.entries(value.image_lora_fuse_kwargs).map(function(_ref8){var _ref9=_slicedToArray(_ref8,2),k=_ref9[0],v=_ref9[1];return\"--image-lora-fuse-kwargs \".concat(k,\" \").concat(v);})));}return peftArgs.join(' ');}else if(key==='quantization_config'&&typeof value==='object'){var _peftArgs=[];_peftArgs.push.apply(_peftArgs,_toConsumableArray(Object.entries(value).map(function(_ref10){var _ref11=_slicedToArray(_ref10,2),k=_ref11[0],v=_ref11[1];return\"--quantization-config \".concat(k,\" \").concat(v===null?'none':v);})));return _peftArgs.join(' ');}else if(predefinedKeys.includes(key)){var newKey;if(key==='model_size_in_billions'){newKey='--size-in-billions';}else{newKey=\"--\".concat(key.replace(/_/g,'-'));}return\"\".concat(newKey,\" \").concat(value===false?'false':value===null?'none':value);}else{return\"--\".concat(key,\" \").concat(value===false?'false':value===null?'none':value);}}).join(' ');return\"xinference launch \".concat(args);};useEffect(function(){var _text=generateCommandLineStatement(modelData);var clipboard=new ClipboardJS(copyRef.current,{text:function text(){return _text;}});clipboard.on('success',function(e){e.clearSelection();setIsCopySuccess(true);});var handleClick=function handleClick(event){event.stopPropagation();copyRef.current.focus();};var copy=copyRef.current;copy.addEventListener('click',handleClick);return function(){clipboard.destroy();copy.removeEventListener('click',handleClick);};},[modelData]);return/*#__PURE__*/_jsxs(\"div\",{style:{marginInline:'10px',lineHeight:'14px'},children:[/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.copyToCommandLine'),placement:\"top\",children:/*#__PURE__*/_jsx(\"div\",{ref:copyRef,children:/*#__PURE__*/_jsx(FilterNoneIcon,{className:\"copyToCommandLine\"})})}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:isCopySuccess,autoHideDuration:1500,onClose:function onClose(){return setIsCopySuccess(false);},children:/*#__PURE__*/_jsx(Alert,{severity:\"success\",variant:\"filled\",sx:{width:'100%'},children:t('components.copySuccess')})})]});}export default CopyComponent;","map":{"version":3,"names":["FilterNoneIcon","Alert","Snackbar","Tooltip","ClipboardJS","React","useEffect","useRef","useState","useTranslation","jsx","_jsx","jsxs","_jsxs","CopyComponent","_ref","modelData","predefinedKeys","_useTranslation","t","_useState","_useState2","_slicedToArray","isCopySuccess","setIsCopySuccess","copyRef","generateCommandLineStatement","params","args","Object","entries","filter","_ref2","_ref3","key","value","includes","undefined","map","_ref4","_ref5","Array","isArray","concat","join","peftArgs","lora_list","push","apply","_toConsumableArray","lora","lora_name","local_path","image_lora_load_kwargs","_ref6","_ref7","k","v","image_lora_fuse_kwargs","_ref8","_ref9","_ref10","_ref11","newKey","replace","text","clipboard","current","on","e","clearSelection","handleClick","event","stopPropagation","focus","copy","addEventListener","destroy","removeEventListener","style","marginInline","lineHeight","children","title","placement","ref","className","anchorOrigin","vertical","horizontal","open","autoHideDuration","onClose","severity","variant","sx","width"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/components/copyComponent.js"],"sourcesContent":["import FilterNoneIcon from '@mui/icons-material/FilterNone'\nimport { Alert, Snackbar, Tooltip } from '@mui/material'\nimport ClipboardJS from 'clipboard'\nimport React, { useEffect, useRef, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\n\nfunction CopyComponent({ modelData, predefinedKeys }) {\n const { t } = useTranslation()\n const [isCopySuccess, setIsCopySuccess] = useState(false)\n const copyRef = useRef(null)\n\n const generateCommandLineStatement = (params) => {\n const args = Object.entries(params)\n .filter(\n ([key, value]) =>\n (predefinedKeys.includes(key) &&\n value !== null &&\n value !== undefined) ||\n !predefinedKeys.includes(key)\n )\n .map(([key, value]) => {\n if (key === 'gpu_idx' && Array.isArray(value)) {\n return `--gpu-idx ${value.join(',')}`\n } else if (key === 'peft_model_config' && typeof value === 'object') {\n let peftArgs = []\n if (value.lora_list) {\n peftArgs.push(\n ...value.lora_list.map(\n (lora) => `--lora-modules ${lora.lora_name} ${lora.local_path}`\n )\n )\n }\n if (value.image_lora_load_kwargs) {\n peftArgs.push(\n ...Object.entries(value.image_lora_load_kwargs).map(\n ([k, v]) => `--image-lora-load-kwargs ${k} ${v}`\n )\n )\n }\n if (value.image_lora_fuse_kwargs) {\n peftArgs.push(\n ...Object.entries(value.image_lora_fuse_kwargs).map(\n ([k, v]) => `--image-lora-fuse-kwargs ${k} ${v}`\n )\n )\n }\n return peftArgs.join(' ')\n } else if (key === 'quantization_config' && typeof value === 'object') {\n let peftArgs = []\n peftArgs.push(\n ...Object.entries(value).map(\n ([k, v]) =>\n `--quantization-config ${k} ${v === null ? 'none' : v}`\n )\n )\n return peftArgs.join(' ')\n } else if (predefinedKeys.includes(key)) {\n let newKey\n if (key === 'model_size_in_billions') {\n newKey = '--size-in-billions'\n } else {\n newKey = `--${key.replace(/_/g, '-')}`\n }\n return `${newKey} ${\n value === false ? 'false' : value === null ? 'none' : value\n }`\n } else {\n return `--${key} ${\n value === false ? 'false' : value === null ? 'none' : value\n }`\n }\n })\n .join(' ')\n\n return `xinference launch ${args}`\n }\n\n useEffect(() => {\n const text = generateCommandLineStatement(modelData)\n const clipboard = new ClipboardJS(copyRef.current, {\n text: () => text,\n })\n\n clipboard.on('success', (e) => {\n e.clearSelection()\n setIsCopySuccess(true)\n })\n\n const handleClick = (event) => {\n event.stopPropagation()\n copyRef.current.focus()\n }\n\n const copy = copyRef.current\n copy.addEventListener('click', handleClick)\n\n return () => {\n clipboard.destroy()\n copy.removeEventListener('click', handleClick)\n }\n }, [modelData])\n\n return (\n <div style={{ marginInline: '10px', lineHeight: '14px' }}>\n <Tooltip title={t('launchModel.copyToCommandLine')} placement=\"top\">\n <div ref={copyRef}>\n <FilterNoneIcon className=\"copyToCommandLine\" />\n </div>\n </Tooltip>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={isCopySuccess}\n autoHideDuration={1500}\n onClose={() => setIsCopySuccess(false)}\n >\n <Alert severity=\"success\" variant=\"filled\" sx={{ width: '100%' }}>\n {t('components.copySuccess')}\n </Alert>\n </Snackbar>\n </div>\n )\n}\n\nexport default CopyComponent\n"],"mappings":"kSAAA,MAAO,CAAAA,cAAc,KAAM,gCAAgC,CAC3D,OAASC,KAAK,CAAEC,QAAQ,CAAEC,OAAO,KAAQ,eAAe,CACxD,MAAO,CAAAC,WAAW,KAAM,WAAW,CACnC,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,CAAC,CAC7C,CAAC,CACC,CAAC,cACV3E,IAAA,CAACT,QAAQ,EACPqF,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDC,IAAI,CAAEnE,aAAc,CACpBoE,gBAAgB,CAAE,IAAK,CACvBC,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAApE,gBAAgB,CAAC,KAAK,CAAC,EAAC,CAAA0D,QAAA,cAEvCvE,IAAA,CAACV,KAAK,EAAC4F,QAAQ,CAAC,SAAS,CAACC,OAAO,CAAC,QAAQ,CAACC,EAAE,CAAE,CAAEC,KAAK,CAAE,MAAO,CAAE,CAAAd,QAAA,CAC9D/D,CAAC,CAAC,wBAAwB,CAAC,CACvB,CAAC,CACA,CAAC,EACR,CAAC,CAEV,CAEA,cAAe,CAAAL,aAAa","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"runningModels": "Running Models",
|
|
5
5
|
"registerModel": "Register Model",
|
|
6
6
|
"clusterInfo": "Cluster Information",
|
|
7
|
-
"contactUs": "Contact Us"
|
|
7
|
+
"contactUs": "Contact Us",
|
|
8
|
+
"documentation": "Documentation"
|
|
8
9
|
},
|
|
9
10
|
|
|
10
11
|
"model": {
|
|
@@ -24,9 +25,9 @@
|
|
|
24
25
|
"chat": "chat",
|
|
25
26
|
"vision": "vl-chat",
|
|
26
27
|
"reasoning": "reasoning",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"text2audio": "text2audio",
|
|
29
|
+
"audio2text": "audio2text",
|
|
30
|
+
"audio2audio": "audio2audio",
|
|
30
31
|
"status": "Status",
|
|
31
32
|
"cached": "Cached",
|
|
32
33
|
"manageCachedModels": "Manage Cached Models",
|
|
@@ -68,11 +69,13 @@
|
|
|
68
69
|
"modelPath.optional": "(Optional) Model Path, For PyTorch, provide the model directory. For GGML/GGUF, provide the model file path.",
|
|
69
70
|
"GGUFQuantization.optional": "(Optional) GGUF quantization format, quantizing the Transformer part.",
|
|
70
71
|
"GGUFModelPath.optional": "(Optional) GGUF model path, should be a file ending with .gguf.",
|
|
72
|
+
"enableThinking": "Enable Thinking",
|
|
71
73
|
"parsingReasoningContent": "Parsing Reasoning Content",
|
|
72
74
|
"CPUOffload": "CPU Offload",
|
|
73
75
|
"CPUOffload.tip": "Unload the model to the CPU. Recommend to enable this when resources are limited or when using the GGUF option.",
|
|
74
76
|
"loraConfig": "Lora Config",
|
|
75
77
|
"loraModelConfig": "Lora Model Config",
|
|
78
|
+
"additionalQuantizationParametersForInferenceEngine": "Additional quantization parameters passed to the inference engine",
|
|
76
79
|
"additionalParametersForInferenceEngine": "Additional parameters passed to the inference engine",
|
|
77
80
|
"enterIntegerGreaterThanZero": "Please enter an integer greater than 0.",
|
|
78
81
|
"enterCommaSeparatedNumbers": "Please enter numeric data separated by commas, for example: 0,1,2",
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"runningModels": "运行模型",
|
|
5
5
|
"registerModel": "注册模型",
|
|
6
6
|
"clusterInfo": "集群信息",
|
|
7
|
-
"contactUs": "联系我们"
|
|
7
|
+
"contactUs": "联系我们",
|
|
8
|
+
"documentation": "文档"
|
|
8
9
|
},
|
|
9
10
|
|
|
10
11
|
"model": {
|
|
@@ -24,9 +25,9 @@
|
|
|
24
25
|
"chat": "聊天",
|
|
25
26
|
"vision": "视觉聊天",
|
|
26
27
|
"reasoning": "推理",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"text2audio": "text2audio",
|
|
29
|
+
"audio2text": "audio2text",
|
|
30
|
+
"audio2audio": "audio2audio",
|
|
30
31
|
"status": "状态",
|
|
31
32
|
"cached": "已缓存",
|
|
32
33
|
"manageCachedModels": "管理缓存模型",
|
|
@@ -68,11 +69,13 @@
|
|
|
68
69
|
"modelPath.optional": "(可选) 模型路径,对于 PyTorch,提供模型目录;对于 GGML/GGUF,提供模型文件路径。",
|
|
69
70
|
"GGUFQuantization.optional": "(可选) GGUF量化格式,对Transformer部分进行量化。",
|
|
70
71
|
"GGUFModelPath.optional": "(可选) GGUF模型路径,应为以 .gguf 结尾的文件。",
|
|
72
|
+
"enableThinking": "开启思考模式",
|
|
71
73
|
"parsingReasoningContent": "解析推理内容",
|
|
72
74
|
"CPUOffload": "CPU卸载",
|
|
73
75
|
"CPUOffload.tip": "将模型卸载到CPU。当资源有限或使用GGUF选项时,建议启用此功能。",
|
|
74
76
|
"loraConfig": "Lora 配置",
|
|
75
77
|
"loraModelConfig": "Lora 模型配置",
|
|
78
|
+
"additionalQuantizationParametersForInferenceEngine": "传递给推理引擎的量化参数",
|
|
76
79
|
"additionalParametersForInferenceEngine": "传递给推理引擎的附加参数",
|
|
77
80
|
"enterIntegerGreaterThanZero": "请输入大于 0 的整数。",
|
|
78
81
|
"enterCommaSeparatedNumbers": "请输入以逗号分隔的数字数据,例如:0,1,2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xinference
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary: Model Serving Made Easy
|
|
5
5
|
Home-page: https://github.com/xorbitsai/inference
|
|
6
6
|
Author: Qin Xuye
|
|
@@ -19,11 +19,11 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: xoscar>=0.
|
|
22
|
+
Requires-Dist: xoscar>=0.7.2
|
|
23
23
|
Requires-Dist: torch
|
|
24
24
|
Requires-Dist: gradio
|
|
25
25
|
Requires-Dist: pillow
|
|
26
|
-
Requires-Dist: click
|
|
26
|
+
Requires-Dist: click<8.2.0
|
|
27
27
|
Requires-Dist: tqdm>=4.27
|
|
28
28
|
Requires-Dist: tabulate
|
|
29
29
|
Requires-Dist: requests
|
|
@@ -67,35 +67,50 @@ Requires-Dist: sphinx-tabs; extra == "dev"
|
|
|
67
67
|
Requires-Dist: sphinx-design; extra == "dev"
|
|
68
68
|
Provides-Extra: all
|
|
69
69
|
Requires-Dist: uv; extra == "all"
|
|
70
|
-
Requires-Dist: llama-cpp-python!=0.2.58,>=0.2.25; extra == "all"
|
|
71
70
|
Requires-Dist: xllamacpp; extra == "all"
|
|
72
71
|
Requires-Dist: transformers>=4.46.0; extra == "all"
|
|
73
|
-
Requires-Dist: torch
|
|
72
|
+
Requires-Dist: torch; extra == "all"
|
|
74
73
|
Requires-Dist: accelerate>=0.28.0; extra == "all"
|
|
75
74
|
Requires-Dist: sentencepiece; extra == "all"
|
|
76
75
|
Requires-Dist: transformers_stream_generator; extra == "all"
|
|
77
|
-
Requires-Dist: bitsandbytes; extra == "all"
|
|
76
|
+
Requires-Dist: bitsandbytes; sys_platform == "linux" and extra == "all"
|
|
78
77
|
Requires-Dist: protobuf; extra == "all"
|
|
79
78
|
Requires-Dist: einops; extra == "all"
|
|
80
|
-
Requires-Dist: tiktoken
|
|
81
|
-
Requires-Dist: sentence-transformers>=3.1.0; extra == "all"
|
|
82
|
-
Requires-Dist: vllm>=0.2.6; sys_platform == "linux" and extra == "all"
|
|
83
|
-
Requires-Dist: imageio-ffmpeg; extra == "all"
|
|
84
|
-
Requires-Dist: controlnet_aux; extra == "all"
|
|
85
|
-
Requires-Dist: orjson; extra == "all"
|
|
86
|
-
Requires-Dist: gptqmodel; extra == "all"
|
|
87
|
-
Requires-Dist: autoawq<0.2.6; sys_platform != "darwin" and extra == "all"
|
|
79
|
+
Requires-Dist: tiktoken; extra == "all"
|
|
88
80
|
Requires-Dist: optimum; extra == "all"
|
|
89
|
-
Requires-Dist: outlines>=0.0.34; extra == "all"
|
|
90
|
-
Requires-Dist: sglang[srt]>=0.4.2.post4; sys_platform == "linux" and extra == "all"
|
|
91
|
-
Requires-Dist: mlx-lm>=0.21.5; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "all"
|
|
92
|
-
Requires-Dist: mlx-vlm>=0.1.11; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "all"
|
|
93
|
-
Requires-Dist: mlx-whisper; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "all"
|
|
94
|
-
Requires-Dist: f5-tts-mlx; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "all"
|
|
95
81
|
Requires-Dist: attrdict; extra == "all"
|
|
96
82
|
Requires-Dist: timm>=0.9.16; extra == "all"
|
|
97
83
|
Requires-Dist: torchvision; extra == "all"
|
|
84
|
+
Requires-Dist: peft; extra == "all"
|
|
85
|
+
Requires-Dist: eva-decord; extra == "all"
|
|
86
|
+
Requires-Dist: jj-pytorchvideo; extra == "all"
|
|
87
|
+
Requires-Dist: qwen-vl-utils!=0.0.9; extra == "all"
|
|
88
|
+
Requires-Dist: qwen_omni_utils; extra == "all"
|
|
89
|
+
Requires-Dist: datamodel_code_generator; extra == "all"
|
|
90
|
+
Requires-Dist: jsonschema; extra == "all"
|
|
91
|
+
Requires-Dist: blobfile; extra == "all"
|
|
92
|
+
Requires-Dist: vllm>=0.2.6; extra == "all"
|
|
93
|
+
Requires-Dist: sglang[srt]>=0.4.2.post4; sys_platform == "linux" and extra == "all"
|
|
94
|
+
Requires-Dist: mlx-lm>=0.21.5; extra == "all"
|
|
95
|
+
Requires-Dist: mlx-vlm>=0.1.11; extra == "all"
|
|
96
|
+
Requires-Dist: mlx-whisper; extra == "all"
|
|
97
|
+
Requires-Dist: f5-tts-mlx; extra == "all"
|
|
98
|
+
Requires-Dist: qwen_vl_utils!=0.0.9; extra == "all"
|
|
99
|
+
Requires-Dist: tomli; extra == "all"
|
|
100
|
+
Requires-Dist: sentence-transformers>=3.1.0; extra == "all"
|
|
98
101
|
Requires-Dist: FlagEmbedding; extra == "all"
|
|
102
|
+
Requires-Dist: diffusers>=0.32.0; extra == "all"
|
|
103
|
+
Requires-Dist: controlnet_aux; extra == "all"
|
|
104
|
+
Requires-Dist: deepcache; extra == "all"
|
|
105
|
+
Requires-Dist: gguf; extra == "all"
|
|
106
|
+
Requires-Dist: verovio>=4.3.1; extra == "all"
|
|
107
|
+
Requires-Dist: transformers>=4.37.2; extra == "all"
|
|
108
|
+
Requires-Dist: tiktoken>=0.6.0; extra == "all"
|
|
109
|
+
Requires-Dist: accelerate>=0.28.0; extra == "all"
|
|
110
|
+
Requires-Dist: torch; extra == "all"
|
|
111
|
+
Requires-Dist: torchvision; extra == "all"
|
|
112
|
+
Requires-Dist: diffusers>=0.32.0; extra == "all"
|
|
113
|
+
Requires-Dist: imageio-ffmpeg; extra == "all"
|
|
99
114
|
Requires-Dist: funasr<1.1.17; extra == "all"
|
|
100
115
|
Requires-Dist: omegaconf~=2.3.0; extra == "all"
|
|
101
116
|
Requires-Dist: nemo_text_processing<1.1.0; sys_platform == "linux" and extra == "all"
|
|
@@ -104,20 +119,18 @@ Requires-Dist: librosa; extra == "all"
|
|
|
104
119
|
Requires-Dist: xxhash; extra == "all"
|
|
105
120
|
Requires-Dist: torchaudio; extra == "all"
|
|
106
121
|
Requires-Dist: ChatTTS>=0.2.1; extra == "all"
|
|
122
|
+
Requires-Dist: tiktoken; extra == "all"
|
|
123
|
+
Requires-Dist: torch>=2.0.0; extra == "all"
|
|
107
124
|
Requires-Dist: lightning>=2.0.0; extra == "all"
|
|
108
125
|
Requires-Dist: hydra-core>=1.3.2; extra == "all"
|
|
109
126
|
Requires-Dist: inflect; extra == "all"
|
|
110
127
|
Requires-Dist: conformer; extra == "all"
|
|
111
128
|
Requires-Dist: diffusers>=0.32.0; extra == "all"
|
|
112
|
-
Requires-Dist: gguf; extra == "all"
|
|
113
129
|
Requires-Dist: gdown; extra == "all"
|
|
114
130
|
Requires-Dist: pyarrow; extra == "all"
|
|
115
131
|
Requires-Dist: HyperPyYAML; extra == "all"
|
|
116
132
|
Requires-Dist: onnxruntime>=1.16.0; extra == "all"
|
|
117
|
-
Requires-Dist:
|
|
118
|
-
Requires-Dist: tensorizer~=2.9.0; extra == "all"
|
|
119
|
-
Requires-Dist: eva-decord; extra == "all"
|
|
120
|
-
Requires-Dist: jj-pytorchvideo; extra == "all"
|
|
133
|
+
Requires-Dist: pyworld>=0.3.4; extra == "all"
|
|
121
134
|
Requires-Dist: loguru; extra == "all"
|
|
122
135
|
Requires-Dist: natsort; extra == "all"
|
|
123
136
|
Requires-Dist: loralib; extra == "all"
|
|
@@ -133,20 +146,24 @@ Requires-Dist: vocos; extra == "all"
|
|
|
133
146
|
Requires-Dist: librosa; extra == "all"
|
|
134
147
|
Requires-Dist: jieba; extra == "all"
|
|
135
148
|
Requires-Dist: soundfile; extra == "all"
|
|
136
|
-
Requires-Dist:
|
|
137
|
-
Requires-Dist:
|
|
138
|
-
Requires-Dist:
|
|
139
|
-
Requires-Dist:
|
|
140
|
-
Requires-Dist:
|
|
141
|
-
Requires-Dist:
|
|
142
|
-
Requires-Dist:
|
|
149
|
+
Requires-Dist: cached_path; extra == "all"
|
|
150
|
+
Requires-Dist: unidic-lite; extra == "all"
|
|
151
|
+
Requires-Dist: cn2an; extra == "all"
|
|
152
|
+
Requires-Dist: mecab-python3; extra == "all"
|
|
153
|
+
Requires-Dist: num2words; extra == "all"
|
|
154
|
+
Requires-Dist: pykakasi; extra == "all"
|
|
155
|
+
Requires-Dist: fugashi; extra == "all"
|
|
156
|
+
Requires-Dist: g2p_en; extra == "all"
|
|
157
|
+
Requires-Dist: anyascii; extra == "all"
|
|
158
|
+
Requires-Dist: gruut[de,es,fr]; extra == "all"
|
|
159
|
+
Requires-Dist: kokoro>=0.7.15; extra == "all"
|
|
160
|
+
Requires-Dist: misaki[en,ja,zh]>=0.7.15; extra == "all"
|
|
143
161
|
Requires-Dist: langdetect; extra == "all"
|
|
144
162
|
Requires-Dist: pyloudnorm; extra == "all"
|
|
145
163
|
Provides-Extra: intel
|
|
146
164
|
Requires-Dist: torch==2.1.0a0; extra == "intel"
|
|
147
165
|
Requires-Dist: intel_extension_for_pytorch==2.1.10+xpu; extra == "intel"
|
|
148
166
|
Provides-Extra: llama-cpp
|
|
149
|
-
Requires-Dist: llama-cpp-python!=0.2.58,>=0.2.25; extra == "llama-cpp"
|
|
150
167
|
Requires-Dist: xllamacpp; extra == "llama-cpp"
|
|
151
168
|
Provides-Extra: transformers
|
|
152
169
|
Requires-Dist: transformers>=4.46.0; extra == "transformers"
|
|
@@ -158,8 +175,6 @@ Requires-Dist: bitsandbytes; sys_platform == "linux" and extra == "transformers"
|
|
|
158
175
|
Requires-Dist: protobuf; extra == "transformers"
|
|
159
176
|
Requires-Dist: einops; extra == "transformers"
|
|
160
177
|
Requires-Dist: tiktoken; extra == "transformers"
|
|
161
|
-
Requires-Dist: gptqmodel; extra == "transformers"
|
|
162
|
-
Requires-Dist: autoawq<0.2.6; sys_platform != "darwin" and extra == "transformers"
|
|
163
178
|
Requires-Dist: optimum; extra == "transformers"
|
|
164
179
|
Requires-Dist: attrdict; extra == "transformers"
|
|
165
180
|
Requires-Dist: timm>=0.9.16; extra == "transformers"
|
|
@@ -172,6 +187,10 @@ Requires-Dist: qwen_omni_utils; extra == "transformers"
|
|
|
172
187
|
Requires-Dist: datamodel_code_generator; extra == "transformers"
|
|
173
188
|
Requires-Dist: jsonschema; extra == "transformers"
|
|
174
189
|
Requires-Dist: blobfile; extra == "transformers"
|
|
190
|
+
Provides-Extra: transformers-quantization
|
|
191
|
+
Requires-Dist: bitsandbytes; sys_platform == "linux" and extra == "transformers-quantization"
|
|
192
|
+
Requires-Dist: gptqmodel; extra == "transformers-quantization"
|
|
193
|
+
Requires-Dist: autoawq!=0.2.6; sys_platform != "darwin" and extra == "transformers-quantization"
|
|
175
194
|
Provides-Extra: vllm
|
|
176
195
|
Requires-Dist: vllm>=0.2.6; extra == "vllm"
|
|
177
196
|
Provides-Extra: sglang
|
|
@@ -221,6 +240,7 @@ Requires-Dist: gdown; extra == "audio"
|
|
|
221
240
|
Requires-Dist: pyarrow; extra == "audio"
|
|
222
241
|
Requires-Dist: HyperPyYAML; extra == "audio"
|
|
223
242
|
Requires-Dist: onnxruntime>=1.16.0; extra == "audio"
|
|
243
|
+
Requires-Dist: pyworld>=0.3.4; extra == "audio"
|
|
224
244
|
Requires-Dist: loguru; extra == "audio"
|
|
225
245
|
Requires-Dist: natsort; extra == "audio"
|
|
226
246
|
Requires-Dist: loralib; extra == "audio"
|
|
@@ -316,6 +336,7 @@ potential of cutting-edge AI models.
|
|
|
316
336
|
- Support SGLang backend: [#1161](https://github.com/xorbitsai/inference/pull/1161)
|
|
317
337
|
- Support LoRA for LLM and image models: [#1080](https://github.com/xorbitsai/inference/pull/1080)
|
|
318
338
|
### New Models
|
|
339
|
+
- Built-in support for [Qwen3](https://qwenlm.github.io/blog/qwen3/): [#3347](https://github.com/xorbitsai/inference/pull/3347)
|
|
319
340
|
- Built-in support for [Qwen2.5-Omni](https://github.com/QwenLM/Qwen2.5-Omni): [#3279](https://github.com/xorbitsai/inference/pull/3279)
|
|
320
341
|
- Built-in support for [Skywork-OR1](https://github.com/SkyworkAI/Skywork-OR1): [#3274](https://github.com/xorbitsai/inference/pull/3274)
|
|
321
342
|
- Built-in support for [GLM-4-0414](https://github.com/THUDM/GLM-4): [#3251](https://github.com/xorbitsai/inference/pull/3251)
|
|
@@ -323,7 +344,6 @@ potential of cutting-edge AI models.
|
|
|
323
344
|
- Built-in support for [paraformer-zh](https://huggingface.co/funasr/paraformer-zh): [#3236](https://github.com/xorbitsai/inference/pull/3236)
|
|
324
345
|
- Built-in support for [InternVL3](https://internvl.github.io/blog/2025-04-11-InternVL-3.0/): [#3235](https://github.com/xorbitsai/inference/pull/3235)
|
|
325
346
|
- Built-in support for [MegaTTS3](https://github.com/bytedance/MegaTTS3): [#3224](https://github.com/xorbitsai/inference/pull/3224)
|
|
326
|
-
- Built-in support for [Deepseek-VL2](https://github.com/deepseek-ai/DeepSeek-VL2): [#3179](https://github.com/xorbitsai/inference/pull/3179)
|
|
327
347
|
### Integrations
|
|
328
348
|
- [Dify](https://docs.dify.ai/advanced/model-configuration/xinference): an LLMOps platform that enables developers (and even non-developers) to quickly build useful applications based on large language models, ensuring they are visual, operable, and improvable.
|
|
329
349
|
- [FastGPT](https://github.com/labring/FastGPT): a knowledge-based platform built on the LLM, offers out-of-the-box data processing and model invocation capabilities, allows for workflow orchestration through Flow visualization.
|