xinference 1.2.1__py3-none-any.whl → 1.3.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.

Files changed (80) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +4 -7
  3. xinference/client/handlers.py +3 -0
  4. xinference/client/restful/restful_client.py +9 -1
  5. xinference/core/model.py +19 -0
  6. xinference/core/resource.py +7 -1
  7. xinference/core/scheduler.py +4 -7
  8. xinference/core/status_guard.py +1 -0
  9. xinference/core/supervisor.py +228 -19
  10. xinference/core/utils.py +1 -29
  11. xinference/core/worker.py +28 -2
  12. xinference/deploy/cmdline.py +33 -3
  13. xinference/deploy/local.py +2 -1
  14. xinference/deploy/test/test_cmdline.py +32 -0
  15. xinference/device_utils.py +43 -1
  16. xinference/model/audio/core.py +5 -0
  17. xinference/model/audio/kokoro.py +122 -0
  18. xinference/model/audio/model_spec.json +8 -0
  19. xinference/model/audio/model_spec_modelscope.json +9 -0
  20. xinference/model/image/stable_diffusion/core.py +15 -6
  21. xinference/model/llm/llama_cpp/core.py +21 -14
  22. xinference/model/llm/llm_family.json +866 -46
  23. xinference/model/llm/llm_family.py +7 -2
  24. xinference/model/llm/llm_family_modelscope.json +873 -16
  25. xinference/model/llm/mlx/core.py +11 -3
  26. xinference/model/llm/reasoning_parsers/__init__.py +13 -0
  27. xinference/model/llm/reasoning_parsers/abs_reasoning_parsers.py +98 -0
  28. xinference/model/llm/reasoning_parsers/deepseek_r1_reasoning_parser.py +140 -0
  29. xinference/model/llm/sglang/core.py +99 -11
  30. xinference/model/llm/transformers/core.py +9 -1
  31. xinference/model/llm/transformers/intern_vl.py +23 -14
  32. xinference/model/llm/transformers/qwen2_audio.py +3 -1
  33. xinference/model/llm/transformers/qwen2_vl.py +20 -3
  34. xinference/model/llm/transformers/utils.py +22 -11
  35. xinference/model/llm/utils.py +164 -20
  36. xinference/model/llm/vllm/core.py +36 -4
  37. xinference/model/llm/vllm/xavier/executor.py +2 -2
  38. xinference/model/llm/vllm/xavier/scheduler.py +3 -3
  39. xinference/thirdparty/internvl/conversation.py +26 -17
  40. xinference/types.py +2 -0
  41. xinference/web/ui/build/asset-manifest.json +6 -6
  42. xinference/web/ui/build/index.html +1 -1
  43. xinference/web/ui/build/static/css/main.f8177338.css +2 -0
  44. xinference/web/ui/build/static/css/main.f8177338.css.map +1 -0
  45. xinference/web/ui/build/static/js/main.ad42919c.js +3 -0
  46. xinference/web/ui/build/static/js/main.ad42919c.js.map +1 -0
  47. xinference/web/ui/node_modules/.cache/babel-loader/074a42304bbbaa79e1bfc3b28502457a390df55708de9006f4cc8e35c60aea87.json +1 -0
  48. xinference/web/ui/node_modules/.cache/babel-loader/0acb065326560592b10888234242f94f67efe28458b90f273d4d4fba9daa0cd2.json +1 -0
  49. xinference/web/ui/node_modules/.cache/babel-loader/279ace390216236a82b3d8995c78eca4d637ac9a523e9f521a2d9c76607a43d7.json +1 -0
  50. xinference/web/ui/node_modules/.cache/babel-loader/630a7bd592596cc6e291fc32238ce7c08238038a64ed8ccee0eb0c13c9902910.json +1 -0
  51. xinference/web/ui/node_modules/.cache/babel-loader/6cb9f6c62ab4042f0b11c5d75e51187188e9d6f5f08b1d63e796e051bafdb457.json +1 -0
  52. xinference/web/ui/node_modules/.cache/babel-loader/8f9af2979e45d4648f0cfae108363e58ee421c29a9d4e7329b6f06d9adfd4133.json +1 -0
  53. xinference/web/ui/node_modules/.cache/babel-loader/914c33e91c1012e3bcd3e96f3a25884cbef148290632d0266dab972b8cc1e95f.json +1 -0
  54. xinference/web/ui/node_modules/.cache/babel-loader/9c8b1a86e7c65b2b2599a205e30920652d6c2105f926508ef5bcf29a3ef4ce76.json +1 -0
  55. xinference/web/ui/node_modules/.cache/babel-loader/b7939cd3a48adf12fccfdd0803019b5cc235ff7de3a297dae70ce635e0eea13e.json +1 -0
  56. xinference/web/ui/node_modules/.cache/babel-loader/efe7cd132c27a8f9fd5352a394c491fd5fb0da0348cf9fcbd923164a32365eab.json +1 -0
  57. xinference/web/ui/node_modules/.cache/babel-loader/f04f666b77b44d7be3e16034d6b0074de2ba9c254f1fae15222b3148608fa8b3.json +1 -0
  58. xinference/web/ui/node_modules/.cache/babel-loader/fecf076bcd198a458c2a6ab0e85e40dc1c99994c353164e79c469be162cb74c9.json +1 -0
  59. xinference/web/ui/src/locales/en.json +14 -1
  60. xinference/web/ui/src/locales/zh.json +14 -1
  61. {xinference-1.2.1.dist-info → xinference-1.3.0.dist-info}/METADATA +18 -17
  62. {xinference-1.2.1.dist-info → xinference-1.3.0.dist-info}/RECORD +67 -60
  63. xinference/web/ui/build/static/css/main.51a587ff.css +0 -2
  64. xinference/web/ui/build/static/css/main.51a587ff.css.map +0 -1
  65. xinference/web/ui/build/static/js/main.b0936c54.js +0 -3
  66. xinference/web/ui/build/static/js/main.b0936c54.js.map +0 -1
  67. xinference/web/ui/node_modules/.cache/babel-loader/0c2fb5375667931c4a331c99e0d87dc145e8f327cea3f44d6e56f54c7c1d4020.json +0 -1
  68. xinference/web/ui/node_modules/.cache/babel-loader/185ceb8872d562e032b47e79df6a45670e06345b8ed70aad1a131e0476783c5c.json +0 -1
  69. xinference/web/ui/node_modules/.cache/babel-loader/3eefb411b24c2b3ce053570ef50daccf154022f0e168be5ed0fec21394baf9f4.json +0 -1
  70. xinference/web/ui/node_modules/.cache/babel-loader/63c8e07687ea53a4f8a910ee5e42e0eb26cd1acbfbe820f3e3248a786ee51401.json +0 -1
  71. xinference/web/ui/node_modules/.cache/babel-loader/a3ff866acddf34917a7ee399e0e571a4dfd8ba66d5057db885f243e16a6eb17d.json +0 -1
  72. xinference/web/ui/node_modules/.cache/babel-loader/a7f1a71f6580dfe810c685a9c1d68e318f71e1fa258fbe50b87a6ac37cc0a598.json +0 -1
  73. xinference/web/ui/node_modules/.cache/babel-loader/bdee44abeadc4abc17d41c52eb49c6e19a4b1a267b6e16876ce91bdeeebfc52d.json +0 -1
  74. xinference/web/ui/node_modules/.cache/babel-loader/d7664d18c4ddbad9c3a6a31b91f7c00fb0dde804608674a9860ee50f33e54708.json +0 -1
  75. xinference/web/ui/node_modules/.cache/babel-loader/ed57202cb79649bb716400436590245547df241988fc7c8e1d85d132299542d2.json +0 -1
  76. /xinference/web/ui/build/static/js/{main.b0936c54.js.LICENSE.txt → main.ad42919c.js.LICENSE.txt} +0 -0
  77. {xinference-1.2.1.dist-info → xinference-1.3.0.dist-info}/LICENSE +0 -0
  78. {xinference-1.2.1.dist-info → xinference-1.3.0.dist-info}/WHEEL +0 -0
  79. {xinference-1.2.1.dist-info → xinference-1.3.0.dist-info}/entry_points.txt +0 -0
  80. {xinference-1.2.1.dist-info → xinference-1.3.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _classCallCheck from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";import _createClass from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/createClass.js\";import _inherits from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/inherits.js\";import _createSuper from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/createSuper.js\";import Table from'@mui/material/Table';import TableBody from'@mui/material/TableBody';import TableHead from'@mui/material/TableHead';import TableRow from'@mui/material/TableRow';import Grid from'@mui/material/Unstable_Grid2';import React from'react';import fetchWrapper from'../../components/fetchWrapper';import{toReadableSize}from'../../components/utils';import{StyledTableCell,StyledTableRow}from'./style';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var NodeInfo=/*#__PURE__*/function(_React$Component){_inherits(NodeInfo,_React$Component);var _super=_createSuper(NodeInfo);function NodeInfo(props){var _this;_classCallCheck(this,NodeInfo);_this=_super.call(this,props);_this.nodeRole=props.nodeRole;_this.endpoint=props.endpoint;_this.state={version:{},info:[]};_this.t=props.t;return _this;}_createClass(NodeInfo,[{key:\"refreshInfo\",value:function refreshInfo(){var _this2=this;if(this.props.cookie.token===''||this.props.cookie.token===undefined||this.props.cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){return;}fetchWrapper.get('/v1/cluster/info?detailed=true').then(function(data){var state=_this2.state;state['info']=data;_this2.setState(state);}).catch(function(error){console.error('Error:',error);if(error.response.status==403){_this2.props.handleGoBack();}});if(JSON.stringify(this.state.version)==='{}'){fetchWrapper.get('/v1/cluster/version').then(function(data){var state=_this2.state;state['version']={release:'v'+data['version'],commit:data['full-revisionid']};_this2.setState(state);}).catch(function(error){console.error('Error:',error);if(error.response.status==403){_this2.props.handleGoBack();}});}}},{key:\"componentDidMount\",value:function componentDidMount(){var _this3=this;this.interval=setInterval(function(){return _this3.refreshInfo();},5000);this.refreshInfo();}},{key:\"componentWillUnmount\",value:function componentWillUnmount(){clearInterval(this.interval);}},{key:\"render\",value:function render(){var _this4=this;if(this.state===undefined||this.state['info']===[]){return/*#__PURE__*/_jsx(\"div\",{children:\"Loading\"});}if(this.nodeRole!=='Worker-Details'){var roleData=this.state['info'].filter(function(obj){return obj['node_type']===_this4.nodeRole;});var sum=function sum(arr){return arr.reduce(function(a,b){return a+b;},0);};var gatherResourceStats=function gatherResourceStats(prop){return sum(roleData.map(function(obj){return obj[prop];}));};var resourceStats={cpu_total:gatherResourceStats('cpu_count'),cpu_avail:gatherResourceStats('cpu_available'),memory_total:gatherResourceStats('mem_total'),memory_avail:gatherResourceStats('mem_available'),gpu_total:gatherResourceStats('gpu_count'),gpu_memory_total:gatherResourceStats('gpu_vram_total'),gpu_memory_avail:gatherResourceStats('gpu_vram_available')};//for all cases, we will at least have cpu information available.\nresourceStats.cpu_used=resourceStats.cpu_total-resourceStats.cpu_avail;resourceStats.memory_used=resourceStats.memory_total-resourceStats.memory_avail;var row_count=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:this.t('clusterInfo.count')}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsx(Grid,{container:true,children:/*#__PURE__*/_jsx(Grid,{children:roleData.length})})})]});var CPU_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:this.t('clusterInfo.cpuInfo')}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsxs(Grid,{container:true,children:[/*#__PURE__*/_jsxs(Grid,{xs:4,children:[this.t('clusterInfo.usage'),' ',resourceStats.cpu_used.toFixed(2)]}),/*#__PURE__*/_jsxs(Grid,{xs:8,children:[this.t('clusterInfo.total'),' ',resourceStats.cpu_total.toFixed(2)]})]})})]});var CPU_Memory_Info_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:this.t('clusterInfo.cpuMemoryInfo')}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsxs(Grid,{container:true,children:[/*#__PURE__*/_jsxs(Grid,{xs:4,children:[this.t('clusterInfo.usage'),' ',toReadableSize(resourceStats.memory_used)]}),/*#__PURE__*/_jsxs(Grid,{xs:8,children:[this.t('clusterInfo.total'),' ',toReadableSize(resourceStats.memory_total)]})]})})]});var version_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:this.t('clusterInfo.version')}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsxs(Grid,{container:true,children:[/*#__PURE__*/_jsxs(Grid,{xs:4,children:[this.t('clusterInfo.release'),\" \",this.state.version.release]}),/*#__PURE__*/_jsxs(Grid,{xs:8,children:[this.t('clusterInfo.commit'),\" \",this.state.version.commit]})]})})]});var table_bodies;//case that we do not have GPU presents.\nif(resourceStats.gpu_memory_total===0){table_bodies=[row_count,CPU_row,CPU_Memory_Info_row,version_row];}else{resourceStats.gpu_memory_used=resourceStats.gpu_memory_total-resourceStats.gpu_memory_avail;var GPU_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:this.t('clusterInfo.gpuInfo')}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsx(Grid,{container:true,children:/*#__PURE__*/_jsxs(Grid,{xs:12,children:[this.t('clusterInfo.total'),' ',resourceStats.gpu_total.toFixed(2)]})})})]});var GPU_Memory_Info_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:this.t('clusterInfo.gpuMemoryInfo')}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsxs(Grid,{container:true,children:[/*#__PURE__*/_jsxs(Grid,{xs:4,children:[this.t('clusterInfo.usage'),' ',toReadableSize(resourceStats.gpu_memory_used)]}),/*#__PURE__*/_jsxs(Grid,{xs:8,children:[this.t('clusterInfo.total'),' ',toReadableSize(resourceStats.gpu_memory_total)]})]})})]});table_bodies=[row_count,CPU_row,CPU_Memory_Info_row,GPU_row,GPU_Memory_Info_row,version_row];}if(this.nodeRole==='Supervisor'){var supervisor_addr_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:this.t('clusterInfo.address')}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsx(Grid,{container:true,children:/*#__PURE__*/_jsx(Grid,{children:roleData[0]?roleData[0]['ip_address']:'-'})})})]});table_bodies.splice(1,0,supervisor_addr_row);}return/*#__PURE__*/_jsxs(Table,{size:\"small\",children:[/*#__PURE__*/_jsx(TableHead,{children:/*#__PURE__*/_jsxs(TableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.item')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:/*#__PURE__*/_jsx(Grid,{container:true,children:/*#__PURE__*/_jsx(Grid,{children:this.t('clusterInfo.value')})})})]})}),/*#__PURE__*/_jsx(TableBody,{children:table_bodies})]});}else{var workerData=this.state['info'].filter(function(obj){return obj['node_type']==='Worker';});return/*#__PURE__*/_jsxs(Table,{size:\"small\",children:[/*#__PURE__*/_jsx(TableHead,{children:/*#__PURE__*/_jsxs(TableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.nodeType')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.address')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.cpuUsage')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.cpuTotal')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.memUsage')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.memTotal')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.gpuCount')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.gpuMemUsage')}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:this.t('clusterInfo.gpuMemTotal')})]})}),/*#__PURE__*/_jsx(TableBody,{children:workerData.map(function(row){return/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:_this4.t('clusterInfo.worker')}),/*#__PURE__*/_jsx(StyledTableCell,{children:row['ip_address']}),/*#__PURE__*/_jsx(StyledTableCell,{children:(row['cpu_count']-row['cpu_available']).toFixed(2)}),/*#__PURE__*/_jsx(StyledTableCell,{children:row['cpu_count'].toFixed(2)}),/*#__PURE__*/_jsx(StyledTableCell,{children:toReadableSize(row['mem_total']-row['mem_available'])}),/*#__PURE__*/_jsx(StyledTableCell,{children:toReadableSize(row['mem_total'])}),/*#__PURE__*/_jsx(StyledTableCell,{children:row['gpu_count'].toFixed(2)}),/*#__PURE__*/_jsx(StyledTableCell,{children:toReadableSize(row['gpu_vram_total']-row['gpu_vram_available'])}),/*#__PURE__*/_jsx(StyledTableCell,{children:toReadableSize(row['gpu_vram_total'])})]});})})]});}}}]);return NodeInfo;}(React.Component);export default NodeInfo;","map":{"version":3,"names":["Table","TableBody","TableHead","TableRow","Grid","React","fetchWrapper","toReadableSize","StyledTableCell","StyledTableRow","jsx","_jsx","jsxs","_jsxs","NodeInfo","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","nodeRole","endpoint","state","version","info","t","_createClass","key","value","refreshInfo","_this2","cookie","token","undefined","sessionStorage","getItem","get","then","data","setState","catch","error","console","response","status","handleGoBack","JSON","stringify","release","commit","componentDidMount","_this3","interval","setInterval","componentWillUnmount","clearInterval","render","_this4","children","roleData","filter","obj","sum","arr","reduce","a","b","gatherResourceStats","prop","map","resourceStats","cpu_total","cpu_avail","memory_total","memory_avail","gpu_total","gpu_memory_total","gpu_memory_avail","cpu_used","memory_used","row_count","container","length","CPU_row","xs","toFixed","CPU_Memory_Info_row","version_row","table_bodies","gpu_memory_used","GPU_row","GPU_Memory_Info_row","supervisor_addr_row","splice","size","style","fontWeight","workerData","row","Component"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/cluster_info/nodeInfo.js"],"sourcesContent":["import Table from '@mui/material/Table'\nimport TableBody from '@mui/material/TableBody'\nimport TableHead from '@mui/material/TableHead'\nimport TableRow from '@mui/material/TableRow'\nimport Grid from '@mui/material/Unstable_Grid2'\nimport PropTypes from 'prop-types'\nimport React from 'react'\n\nimport fetchWrapper from '../../components/fetchWrapper'\nimport { toReadableSize } from '../../components/utils'\nimport { StyledTableCell, StyledTableRow } from './style'\n\nclass NodeInfo extends React.Component {\n constructor(props) {\n super(props)\n this.nodeRole = props.nodeRole\n this.endpoint = props.endpoint\n this.state = {\n version: {},\n info: [],\n }\n this.t = props.t\n }\n\n refreshInfo() {\n if (\n this.props.cookie.token === '' ||\n this.props.cookie.token === undefined ||\n (this.props.cookie.token !== 'no_auth' &&\n !sessionStorage.getItem('token'))\n ) {\n return\n }\n fetchWrapper\n .get('/v1/cluster/info?detailed=true')\n .then((data) => {\n const { state } = this\n state['info'] = data\n this.setState(state)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status == 403) {\n this.props.handleGoBack()\n }\n })\n\n if (JSON.stringify(this.state.version) === '{}') {\n fetchWrapper\n .get('/v1/cluster/version')\n .then((data) => {\n const { state } = this\n state['version'] = {\n release: 'v' + data['version'],\n commit: data['full-revisionid'],\n }\n this.setState(state)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status == 403) {\n this.props.handleGoBack()\n }\n })\n }\n }\n\n componentDidMount() {\n this.interval = setInterval(() => this.refreshInfo(), 5000)\n this.refreshInfo()\n }\n\n componentWillUnmount() {\n clearInterval(this.interval)\n }\n\n render() {\n if (this.state === undefined || this.state['info'] === []) {\n return <div>Loading</div>\n }\n\n if (this.nodeRole !== 'Worker-Details') {\n const roleData = this.state['info'].filter(\n (obj) => obj['node_type'] === this.nodeRole\n )\n\n const sum = (arr) => {\n return arr.reduce((a, b) => a + b, 0)\n }\n\n const gatherResourceStats = (prop) =>\n sum(roleData.map((obj) => obj[prop]))\n\n const resourceStats = {\n cpu_total: gatherResourceStats('cpu_count'),\n cpu_avail: gatherResourceStats('cpu_available'),\n memory_total: gatherResourceStats('mem_total'),\n memory_avail: gatherResourceStats('mem_available'),\n gpu_total: gatherResourceStats('gpu_count'),\n gpu_memory_total: gatherResourceStats('gpu_vram_total'),\n gpu_memory_avail: gatherResourceStats('gpu_vram_available'),\n }\n\n //for all cases, we will at least have cpu information available.\n resourceStats.cpu_used = resourceStats.cpu_total - resourceStats.cpu_avail\n resourceStats.memory_used =\n resourceStats.memory_total - resourceStats.memory_avail\n\n const row_count = (\n <StyledTableRow>\n <StyledTableCell>{this.t('clusterInfo.count')}</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid>{roleData.length}</Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n const CPU_row = (\n <StyledTableRow>\n <StyledTableCell>{this.t('clusterInfo.cpuInfo')}</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={4}>\n {this.t('clusterInfo.usage')}{' '}\n {resourceStats.cpu_used.toFixed(2)}\n </Grid>\n <Grid xs={8}>\n {this.t('clusterInfo.total')}{' '}\n {resourceStats.cpu_total.toFixed(2)}\n </Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n const CPU_Memory_Info_row = (\n <StyledTableRow>\n <StyledTableCell>\n {this.t('clusterInfo.cpuMemoryInfo')}\n </StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={4}>\n {this.t('clusterInfo.usage')}{' '}\n {toReadableSize(resourceStats.memory_used)}\n </Grid>\n <Grid xs={8}>\n {this.t('clusterInfo.total')}{' '}\n {toReadableSize(resourceStats.memory_total)}\n </Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n const version_row = (\n <StyledTableRow>\n <StyledTableCell>{this.t('clusterInfo.version')}</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={4}>\n {this.t('clusterInfo.release')} {this.state.version.release}\n </Grid>\n <Grid xs={8}>\n {this.t('clusterInfo.commit')} {this.state.version.commit}\n </Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n let table_bodies\n //case that we do not have GPU presents.\n if (resourceStats.gpu_memory_total === 0) {\n table_bodies = [row_count, CPU_row, CPU_Memory_Info_row, version_row]\n } else {\n resourceStats.gpu_memory_used =\n resourceStats.gpu_memory_total - resourceStats.gpu_memory_avail\n\n const GPU_row = (\n <StyledTableRow>\n <StyledTableCell>{this.t('clusterInfo.gpuInfo')}</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={12}>\n {this.t('clusterInfo.total')}{' '}\n {resourceStats.gpu_total.toFixed(2)}\n </Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n const GPU_Memory_Info_row = (\n <StyledTableRow>\n <StyledTableCell>\n {this.t('clusterInfo.gpuMemoryInfo')}\n </StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={4}>\n {this.t('clusterInfo.usage')}{' '}\n {toReadableSize(resourceStats.gpu_memory_used)}\n </Grid>\n <Grid xs={8}>\n {this.t('clusterInfo.total')}{' '}\n {toReadableSize(resourceStats.gpu_memory_total)}\n </Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n table_bodies = [\n row_count,\n CPU_row,\n CPU_Memory_Info_row,\n GPU_row,\n GPU_Memory_Info_row,\n version_row,\n ]\n }\n\n if (this.nodeRole === 'Supervisor') {\n const supervisor_addr_row = (\n <StyledTableRow>\n <StyledTableCell>{this.t('clusterInfo.address')}</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid>{roleData[0] ? roleData[0]['ip_address'] : '-'}</Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n table_bodies.splice(1, 0, supervisor_addr_row)\n }\n\n return (\n <Table size=\"small\">\n <TableHead>\n <TableRow>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.item')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n <Grid container>\n <Grid>{this.t('clusterInfo.value')}</Grid>\n </Grid>\n </StyledTableCell>\n </TableRow>\n </TableHead>\n <TableBody>{table_bodies}</TableBody>\n </Table>\n )\n } else {\n const workerData = this.state['info'].filter(\n (obj) => obj['node_type'] === 'Worker'\n )\n\n return (\n <Table size=\"small\">\n <TableHead>\n <TableRow>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.nodeType')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.address')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.cpuUsage')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.cpuTotal')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.memUsage')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.memTotal')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.gpuCount')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.gpuMemUsage')}\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n {this.t('clusterInfo.gpuMemTotal')}\n </StyledTableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {workerData.map((row) => (\n <StyledTableRow>\n <StyledTableCell>\n {this.t('clusterInfo.worker')}\n </StyledTableCell>\n <StyledTableCell>{row['ip_address']}</StyledTableCell>\n <StyledTableCell>\n {(row['cpu_count'] - row['cpu_available']).toFixed(2)}\n </StyledTableCell>\n <StyledTableCell>{row['cpu_count'].toFixed(2)}</StyledTableCell>\n <StyledTableCell>\n {toReadableSize(row['mem_total'] - row['mem_available'])}\n </StyledTableCell>\n <StyledTableCell>\n {toReadableSize(row['mem_total'])}\n </StyledTableCell>\n <StyledTableCell>{row['gpu_count'].toFixed(2)}</StyledTableCell>\n <StyledTableCell>\n {toReadableSize(\n row['gpu_vram_total'] - row['gpu_vram_available']\n )}\n </StyledTableCell>\n <StyledTableCell>\n {toReadableSize(row['gpu_vram_total'])}\n </StyledTableCell>\n </StyledTableRow>\n ))}\n </TableBody>\n </Table>\n )\n }\n }\n}\n\nNodeInfo.propTypes = {\n nodeRole: PropTypes.string,\n endpoint: PropTypes.string,\n}\n\nexport default NodeInfo\n"],"mappings":"oiBAAA,MAAO,CAAAA,KAAK,KAAM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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 _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({},params),{},{label:customData.key}));}}):/*#__PURE__*/_jsx(TextField,{label:customData.key,value:item[customData.key],onChange:function onChange(e){updateArr(index,customData.key,e.target.value);},style:{width:'44%'}}),/*#__PURE__*/_jsx(TextField,{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","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 {...params} label={customData.key} />\n )}\n />\n ) : (\n <TextField\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 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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CACFa,KAAK,CAAE,CAAEa,KAAK,CAAE,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,EAACwF,QAAQ,CAAC,OAAO,CAAAzB,QAAA,EACpBhD,UAAU,CAACmC,GAAG,CAAC,iBAClB,EAAO,CACR,GAtDON,IAAI,CAACI,EAuDV,CAAC,CAEV,CAAC,CAAC,CACC,CAAC,EACH,CAAC,cACNtC,IAAA,CAACN,QAAQ,EACPqF,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDC,IAAI,CAAEpE,YAAa,CACnBqE,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAApE,eAAe,CAAC,KAAK,CAAC,EAAC,CACtCqE,OAAO,CAAC,wDAAwD,EAC3D,KAAK,CAAG,QACd,CAAC,EACC,CAAC,CAEV,CAAC,CAED,cAAe,CAAAjF,OAAO","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
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,{useContext,useEffect,useState}from'react';import{useCookies}from'react-cookie';import{useTranslation}from'react-i18next';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import fetchWrapper from'../../components/fetchWrapper';import Title from'../../components/Title';import{isValidBearerToken}from'../../components/utils';import LaunchCustom from'./launchCustom';import LaunchModelComponent from'./LaunchModel';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var featureModels=[{type:'llm',feature_models:['deepseek-v3','deepseek-r1','deepseek-r1-distill-qwen','deepseek-r1-distill-llama','qwen2.5-instruct','qwen2.5-vl-instruct','qwen2.5-coder-instruct','llama-3.1-instruct']},{type:'embedding',feature_models:['bge-large-zh-v1.5','bge-large-en-v1.5','bge-m3','gte-Qwen2','jina-embeddings-v3']},{type:'rerank',feature_models:[]},{type:'image',feature_models:['FLUX.1-dev','FLUX.1-schnell','sd3.5-large','HunyuanDiT-v1.2','sd3.5-medium']},{type:'audio',feature_models:['CosyVoice2-0.5B','FishSpeech-1.5','F5-TTS','ChatTTS','SenseVoiceSmall','whisper-large-v3']},{type:'video',feature_models:[]}];var LaunchModel=function LaunchModel(){var _React$useState=React.useState(sessionStorage.getItem('modelType')?sessionStorage.getItem('modelType'):'/launch_model/llm'),_React$useState2=_slicedToArray(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];var _useState=useState(-1),_useState2=_slicedToArray(_useState,2),gpuAvailable=_useState2[0],setGPUAvailable=_useState2[1];var _useContext=useContext(ApiContext),setErrorMsg=_useContext.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();var _useTranslation=useTranslation(),t=_useTranslation.t;var handleTabChange=function handleTabChange(event,newValue){setValue(newValue);navigate(newValue);sessionStorage.setItem('modelType',newValue);newValue==='/launch_model/custom/llm'?sessionStorage.setItem('subType',newValue):'';};useEffect(function(){if(sessionStorage.getItem('auth')==='true'&&!isValidBearerToken(sessionStorage.getItem('token'))&&!isValidBearerToken(cookie.token)){navigate('/login',{replace:true});}if(gpuAvailable===-1){fetchWrapper.get('/v1/cluster/devices').then(function(data){return setGPUAvailable(parseInt(data,10));}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}},[cookie.token]);return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(Title,{title:t('menu.launchModel')}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(TabContext,{value:value,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:value,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:t('model.languageModels'),value:\"/launch_model/llm\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.embeddingModels'),value:\"/launch_model/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.rerankModels'),value:\"/launch_model/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.imageModels'),value:\"/launch_model/image\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.audioModels'),value:\"/launch_model/audio\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.videoModels'),value:\"/launch_model/video\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.customModels'),value:\"/launch_model/custom/llm\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'LLM',gpuAvailable:gpuAvailable,featureModels:featureModels.find(function(item){return item.type==='llm';}).feature_models})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'embedding',gpuAvailable:gpuAvailable,featureModels:featureModels.find(function(item){return item.type==='embedding';}).feature_models})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'rerank',gpuAvailable:gpuAvailable,featureModels:featureModels.find(function(item){return item.type==='rerank';}).feature_models})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'image',featureModels:featureModels.find(function(item){return item.type==='image';}).feature_models})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'audio',featureModels:featureModels.find(function(item){return item.type==='audio';}).feature_models})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/video\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'video',featureModels:featureModels.find(function(item){return item.type==='video';}).feature_models})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/custom/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchCustom,{gpuAvailable:gpuAvailable})})]})]});};export default LaunchModel;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","Tab","React","useContext","useEffect","useState","useCookies","useTranslation","useNavigate","ApiContext","ErrorMessageSnackBar","fetchWrapper","Title","isValidBearerToken","LaunchCustom","LaunchModelComponent","jsx","_jsx","jsxs","_jsxs","featureModels","type","feature_models","LaunchModel","_React$useState","sessionStorage","getItem","_React$useState2","_slicedToArray","value","setValue","_useState","_useState2","gpuAvailable","setGPUAvailable","_useContext","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","_useTranslation","t","handleTabChange","event","newValue","setItem","token","replace","get","then","data","parseInt","catch","error","console","response","status","message","m","children","title","sx","borderBottom","borderColor","onChange","label","padding","modelType","find","item"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/index.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Tab } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useTranslation } from 'react-i18next'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport Title from '../../components/Title'\nimport { isValidBearerToken } from '../../components/utils'\nimport LaunchCustom from './launchCustom'\nimport LaunchModelComponent from './LaunchModel'\n\nconst featureModels = [\n {\n type: 'llm',\n feature_models: [\n 'deepseek-v3',\n 'deepseek-r1',\n 'deepseek-r1-distill-qwen',\n 'deepseek-r1-distill-llama',\n 'qwen2.5-instruct',\n 'qwen2.5-vl-instruct',\n 'qwen2.5-coder-instruct',\n 'llama-3.1-instruct',\n ],\n },\n {\n type: 'embedding',\n feature_models: [\n 'bge-large-zh-v1.5',\n 'bge-large-en-v1.5',\n 'bge-m3',\n 'gte-Qwen2',\n 'jina-embeddings-v3',\n ],\n },\n {\n type: 'rerank',\n feature_models: [],\n },\n {\n type: 'image',\n feature_models: [\n 'FLUX.1-dev',\n 'FLUX.1-schnell',\n 'sd3.5-large',\n 'HunyuanDiT-v1.2',\n 'sd3.5-medium',\n ],\n },\n {\n type: 'audio',\n feature_models: [\n 'CosyVoice2-0.5B',\n 'FishSpeech-1.5',\n 'F5-TTS',\n 'ChatTTS',\n 'SenseVoiceSmall',\n 'whisper-large-v3',\n ],\n },\n {\n type: 'video',\n feature_models: [],\n },\n]\n\nconst LaunchModel = () => {\n const [value, setValue] = React.useState(\n sessionStorage.getItem('modelType')\n ? sessionStorage.getItem('modelType')\n : '/launch_model/llm'\n )\n const [gpuAvailable, setGPUAvailable] = useState(-1)\n\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n const { t } = useTranslation()\n\n const handleTabChange = (event, newValue) => {\n setValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('modelType', newValue)\n newValue === '/launch_model/custom/llm'\n ? sessionStorage.setItem('subType', newValue)\n : ''\n }\n\n useEffect(() => {\n if (\n sessionStorage.getItem('auth') === 'true' &&\n !isValidBearerToken(sessionStorage.getItem('token')) &&\n !isValidBearerToken(cookie.token)\n ) {\n navigate('/login', { replace: true })\n }\n\n if (gpuAvailable === -1) {\n fetchWrapper\n .get('/v1/cluster/devices')\n .then((data) => setGPUAvailable(parseInt(data, 10)))\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 }\n }, [cookie.token])\n\n return (\n <Box m=\"20px\">\n <Title title={t('menu.launchModel')} />\n <ErrorMessageSnackBar />\n <TabContext value={value}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList value={value} onChange={handleTabChange} aria-label=\"tabs\">\n <Tab label={t('model.languageModels')} value=\"/launch_model/llm\" />\n <Tab\n label={t('model.embeddingModels')}\n value=\"/launch_model/embedding\"\n />\n <Tab label={t('model.rerankModels')} value=\"/launch_model/rerank\" />\n <Tab label={t('model.imageModels')} value=\"/launch_model/image\" />\n <Tab label={t('model.audioModels')} value=\"/launch_model/audio\" />\n <Tab label={t('model.videoModels')} value=\"/launch_model/video\" />\n <Tab\n label={t('model.customModels')}\n value=\"/launch_model/custom/llm\"\n />\n </TabList>\n </Box>\n <TabPanel value=\"/launch_model/llm\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'LLM'}\n gpuAvailable={gpuAvailable}\n featureModels={\n featureModels.find((item) => item.type === 'llm').feature_models\n }\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/embedding\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'embedding'}\n gpuAvailable={gpuAvailable}\n featureModels={\n featureModels.find((item) => item.type === 'embedding')\n .feature_models\n }\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/rerank\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'rerank'}\n gpuAvailable={gpuAvailable}\n featureModels={\n featureModels.find((item) => item.type === 'rerank')\n .feature_models\n }\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/image\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'image'}\n featureModels={\n featureModels.find((item) => item.type === 'image').feature_models\n }\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/audio\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'audio'}\n featureModels={\n featureModels.find((item) => item.type === 'audio').feature_models\n }\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/video\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'video'}\n featureModels={\n featureModels.find((item) => item.type === 'video').feature_models\n }\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/custom/llm\" sx={{ padding: 0 }}>\n <LaunchCustom gpuAvailable={gpuAvailable} />\n </TabPanel>\n </TabContext>\n </Box>\n )\n}\n\nexport default LaunchModel\n"],"mappings":"6IAAA,OAASA,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,GAAG,KAAQ,eAAe,CACxC,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,cAAc,KAAQ,eAAe,CAC9C,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,KAAK,KAAM,wBAAwB,CAC1C,OAASC,kBAAkB,KAAQ,wBAAwB,CAC3D,MAAO,CAAAC,YAAY,KAAM,gBAAgB,CACzC,MAAO,CAAAC,oBAAoB,KAAM,eAAe,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEhD,GAAM,CAAAC,aAAa,CAAG,CACpB,CACEC,IAAI,CAAE,KAAK,CACXC,cAAc,CAAE,CACd,aAAa,CACb,aAAa,CACb,0BAA0B,CAC1B,2BAA2B,CAC3B,kBAAkB,CAClB,qBAAqB,CACrB,wBAAwB,CACxB,oBAAoB,CAExB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":"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),value=_ref3[1];return value!==null&&value!==undefined;}).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(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||value===false?\"\".concat(value):'');}else{return\"--\".concat(key,\" \").concat(value||value===false?\"\".concat(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","value","undefined","map","_ref4","_ref5","key","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","includes","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(([, value]) => value !== null && value !== undefined)\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 (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} ${value || value === false ? `${value}` : ''}`\n } else {\n return `--${key} ${value || value === false ? `${value}` : ''}`\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,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,MAAM,CAAEC,QAAQ,KAAQ,OAAO,CAC1D,OAASC,cAAc,KAAQ,eAAe,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE9C,QAAS,CAAAC,aAAaA,CAAAC,IAAA,CAAgC,IAA7B,CAAAC,SAAS,CAAAD,IAAA,CAATC,SAAS,CAAEC,cAAc,CAAAF,IAAA,CAAdE,cAAc,CAChD,IAAAC,eAAA,CAAcT,cAAc,CAAC,CAAC,CAAtBU,CAAC,CAAAD,eAAA,CAADC,CAAC,CACT,IAAAC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CAAC+D,SAAS,CAAC,KAAK,CAAAF,QAAA,cACjErE,IAAA,QAAKwE,GAAG,CAAE1D,OAAQ,CAAAuD,QAAA,cAChBrE,IAAA,CAACX,cAAc,EAACoF,SAAS,CAAC,mBAAmB,CAAE,CAAC,CAC7C,CAAC,CACC,CAAC,cACVzE,IAAA,CAACT,QAAQ,EACPmF,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDC,IAAI,CAAEjE,aAAc,CACpBkE,gBAAgB,CAAE,IAAK,CACvBC,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAAlE,gBAAgB,CAAC,KAAK,CAAC,EAAC,CAAAwD,QAAA,cAEvCrE,IAAA,CAACV,KAAK,EAAC0F,QAAQ,CAAC,SAAS,CAACC,OAAO,CAAC,QAAQ,CAACC,EAAE,CAAE,CAAEC,KAAK,CAAE,MAAO,CAAE,CAAAd,QAAA,CAC9D7D,CAAC,CAAC,wBAAwB,CAAC,CACvB,CAAC,CACA,CAAC,EACR,CAAC,CAEV,CAEA,cAAe,CAAAL,aAAa","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,useTheme}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 theme=useTheme();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 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==='cpu_offload'){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;}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(\"textarea\",{className:\"textarea\",style:{height:'100%',color:theme.palette.mode==='dark'&&'#fff'},value:command,onInput:function onInput(e){setCommand(e.target.value);},placeholder:t('launchModel.placeholderTip')})})}),/*#__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","useTheme","React","useState","useTranslation","jsx","_jsx","jsxs","_jsxs","PasteDialog","_ref","open","onHandleClose","onHandleCommandLine","_useTranslation","t","theme","_useState","_useState2","_slicedToArray","command","setCommand","handleClose","parseXinferenceCommand","params","peftModelConfig","lora_list","image_lora_load_kwargs","image_lora_fuse_kwargs","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","err","e","f","Object","keys","peft_model_config","children","style","width","height","className","color","palette","mode","onInput","target","placeholder","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 useTheme,\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 theme = useTheme()\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 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 {\n if (normalizedKey === 'cpu_offload') {\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 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 <textarea\n className=\"textarea\"\n style={{\n height: '100%',\n color: theme.palette.mode === 'dark' && '#fff',\n }}\n value={command}\n onInput={(e) => {\n setCommand(e.target.value)\n }}\n placeholder={t('launchModel.placeholderTip')}\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,QAAQ,KACH,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,IAAA,CAAJC,IAAI,CAAEC,aAAa,CAAAF,IAAA,CAAbE,aAAa,CAAEC,mBAAmB,CAAAH,IAAA,CAAnBG,mBAAmB,CAC7D,IAAAC,eAAA,CAAcV,cAAc,CAAC,CAAC,CAAtBW,CAAC,CAAAD,eAAA,CAADC,CAAC,CACT,GAAM,CAAAC,KAAK,CAAGf,QAAQ,CAAC,CAAC,CACxB,IAAAgB,SAAA,CAA8Bd,QAAQ,CAAC,EAAE,CAAC,CAAAe,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAAnCG,OAAO,CAAAF,UAAA,IAAEG,UAAU,CAAAH,UAAA,IAE1B,GAAM,CAAAI,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAA,CAAS,CACxBV,aAAa,CAAC,CAAC,CACfS,UAA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E,CAC9C,CAAC,CACC,CAAC,CACO,CAAC,cAChBP,KAAA,CAACV,aAAa,EAAAqE,QAAA,eACZ7D,IAAA,CAACV,MAAM,EAACkF,OAAO,CAAExD,WAAY,CAAA6C,QAAA,CAAEpD,CAAC,CAAC,oBAAoB,CAAC,CAAS,CAAC,cAChET,IAAA,CAACV,MAAM,EAACmF,SAAS,MAACD,OAAO,CAAEvD,sBAAuB,CAAA4C,QAAA,CAC/CpD,CAAC,CAAC,qBAAqB,CAAC,CACnB,CAAC,EACI,CAAC,EACV,CAAC,CAEb,CAAC,CAED,cAAe,CAAAN,WAAW","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import{useTheme}from'@mui/material';import React 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();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","jsx","_jsx","jsxs","_jsxs","Drawer","_ref","isOpen","onClose","children","theme","className","concat","onClick","style","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 from 'react'\n\nconst Drawer = ({ isOpen, onClose, children }) => {\n const theme = useTheme()\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' } : {}\n }\n >\n {isOpen && children}\n </div>\n </div>\n )\n}\n\nexport default Drawer\n"],"mappings":"AAAA,OAASA,QAAQ,KAAQ,eAAe,CACxC,MAAO,CAAAC,KAAK,KAAM,OAAO,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEzB,GAAM,CAAAC,MAAM,CAAG,QAAT,CAAAA,MAAMA,CAAAC,IAAA,CAAsC,IAAhC,CAAAC,MAAM,CAAAD,IAAA,CAANC,MAAM,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAEC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CACzC,GAAM,CAAAC,KAAK,CAAGX,QAAQ,CAAC,CAAC,CAExB,mBACEK,KAAA,QAAKO,SAAS,WAAAC,MAAA,CAAYL,MAAM,CAAG,MAAM,CAAG,EAAE,CAAG,CAAAE,QAAA,eAC/CP,IAAA,QAAKS,SAAS,CAAC,gBAAgB,CAACE,OAAO,CAAEL,OAAQ,CAAM,CAAC,cACxDN,IAAA,QACES,SAAS,CAAC,gBAAgB,CAC1BG,KAAK,CACHJ,KAAK,CAACK,OAAO,CAACC,IAAI,GAAK,MAAM,CAAG,CAAEC,eAAe,CAAE,SAAU,CAAC,CAAG,CAAC,CACnE,CAAAR,QAAA,CAEAF,MAAM,EAAIE,QAAQ,CAChB,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAAJ,MAAM","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _defineProperty from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.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{AddBoxOutlined,ChevronRightOutlined,DnsOutlined,GitHub,RocketLaunchOutlined,SmartToyOutlined}from'@mui/icons-material';import{Box,Drawer,List,ListItem,ListItemButton,ListItemIcon,ListItemText,Typography,useTheme}from'@mui/material';import{useEffect,useState}from'react';import{useTranslation}from'react-i18next';import{useLocation,useNavigate}from'react-router-dom';import icon from'../media/icon.webp';import ThemeButton from'./themeButton';import TranslateButton from'./translateButton';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var MenuSide=function MenuSide(){var theme=useTheme();var _useLocation=useLocation(),pathname=_useLocation.pathname;var _useState=useState(''),_useState2=_slicedToArray(_useState,2),active=_useState2[0],setActive=_useState2[1];var navigate=useNavigate();var _useState3=useState(\"\".concat(Math.min(Math.max(window.innerWidth*0.2,287),320),\"px\")),_useState4=_slicedToArray(_useState3,2),drawerWidth=_useState4[0],setDrawerWidth=_useState4[1];var _useTranslation=useTranslation(),t=_useTranslation.t;var navItems=[{text:'launch_model',label:t('menu.launchModel'),icon:/*#__PURE__*/_jsx(RocketLaunchOutlined,{})},{text:'running_models',label:t('menu.runningModels'),icon:/*#__PURE__*/_jsx(SmartToyOutlined,{})},{text:'register_model',label:t('menu.registerModel'),icon:/*#__PURE__*/_jsx(AddBoxOutlined,{})},{text:'cluster_information',label:t('menu.clusterInfo'),icon:/*#__PURE__*/_jsx(DnsOutlined,{})},{text:'contact_us',label:t('menu.contactUs'),icon:/*#__PURE__*/_jsx(GitHub,{})}];useEffect(function(){setActive(pathname.substring(1));},[pathname]);useEffect(function(){var screenWidth=window.innerWidth;var maxDrawerWidth=Math.min(Math.max(screenWidth*0.2,287),320);setDrawerWidth(\"\".concat(maxDrawerWidth,\"px\"));// Update the drawer width on window resize\nvar handleResize=function handleResize(){var newScreenWidth=window.innerWidth;var newMaxDrawerWidth=Math.min(Math.max(newScreenWidth*0.2,287),320);setDrawerWidth(\"\".concat(newMaxDrawerWidth,\"px\"));};window.addEventListener('resize',handleResize);return function(){window.removeEventListener('resize',handleResize);};},[]);return/*#__PURE__*/_jsxs(Drawer,{variant:\"permanent\",sx:_objectSpread(_objectSpread({width:drawerWidth},theme.mixins.toolbar),{},_defineProperty({flexShrink:0},\"& .MuiDrawer-paper\",{width:drawerWidth,boxSizing:'border-box'})),style:{zIndex:1},children:[/*#__PURE__*/_jsx(Box,{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",width:\"100%\",children:/*#__PURE__*/_jsx(Box,{display:\"flex\",m:\"2rem 1rem 0rem 1rem\",width:\"217px\",children:/*#__PURE__*/_jsxs(Box,{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",textTransform:\"none\",children:[/*#__PURE__*/_jsx(Box,{component:\"img\",alt:\"profile\",src:icon,height:\"60px\",width:\"60px\",borderRadius:\"50%\",sx:{objectFit:'cover',mr:1.5}}),/*#__PURE__*/_jsx(Box,{textAlign:\"left\",children:/*#__PURE__*/_jsx(Typography,{fontWeight:\"bold\",fontSize:\"1.7rem\",children:'Xinference'})})]})})}),/*#__PURE__*/_jsx(Box,{sx:{flexGrow:1},children:/*#__PURE__*/_jsxs(Box,{width:\"100%\",children:[/*#__PURE__*/_jsx(Box,{m:\"1.5rem 2rem 2rem 3rem\"}),/*#__PURE__*/_jsx(List,{children:navItems.map(function(_ref){var text=_ref.text,label=_ref.label,icon=_ref.icon;if(!icon){return/*#__PURE__*/_jsx(Typography,{sx:{m:'2.25rem 0 1rem 3rem'},children:label},text);}return/*#__PURE__*/_jsx(ListItem,{children:/*#__PURE__*/_jsxs(ListItemButton,{onClick:function onClick(){if(text==='contact_us'){window.open('https://github.com/xorbitsai/inference','_blank','noreferrer');}else if(text==='launch_model'){sessionStorage.setItem('modelType','/launch_model/llm');navigate('/launch_model/llm');setActive(text);sessionStorage.setItem('lastActiveUrl',text);console.log(active);}else if(text==='cluster_information'){navigate('/cluster_info');setActive(text);}else if(text==='running_models'){navigate('/running_models/LLM');sessionStorage.setItem('runningModelType','/running_models/LLM');setActive(text);sessionStorage.setItem('lastActiveUrl',text);console.log(active);}else if(text==='register_model'){sessionStorage.setItem('registerModelType','/register_model/llm');navigate('/register_model/llm');setActive(text);sessionStorage.setItem('lastActiveUrl',text);console.log(active);}else{navigate(\"/\".concat(text));setActive(text);console.log(active);}},children:[/*#__PURE__*/_jsx(ListItemIcon,{sx:{ml:'2rem'},children:icon}),/*#__PURE__*/_jsx(ListItemText,{primary:label}),/*#__PURE__*/_jsx(ChevronRightOutlined,{sx:{ml:'auto'}})]})},text);})})]})}),/*#__PURE__*/_jsxs(Box,{display:\"flex\",alignItems:\"center\",marginLeft:'3rem',children:[/*#__PURE__*/_jsx(ThemeButton,{sx:{m:'1rem'}}),/*#__PURE__*/_jsx(TranslateButton,{})]})]});};export default MenuSide;","map":{"version":3,"names":["AddBoxOutlined","ChevronRightOutlined","DnsOutlined","GitHub","RocketLaunchOutlined","SmartToyOutlined","Box","Drawer","List","ListItem","ListItemButton","ListItemIcon","ListItemText","Typography","useTheme","useEffect","useState","useTranslation","useLocation","useNavigate","icon","ThemeButton","TranslateButton","jsx","_jsx","jsxs","_jsxs","MenuSide","theme","_useLocation","pathname","_useState","_useState2","_slicedToArray","active","setActive","navigate","_useState3","concat","Math","min","max","window","innerWidth","_useState4","drawerWidth","setDrawerWidth","_useTranslation","t","navItems","text","label","substring","screenWidth","maxDrawerWidth","handleResize","newScreenWidth","newMaxDrawerWidth","addEventListener","removeEventListener","variant","sx","_objectSpread","width","mixins","toolbar","_defineProperty","flexShrink","boxSizing","style","zIndex","children","display","justifyContent","alignItems","m","textTransform","component","alt","src","height","borderRadius","objectFit","mr","textAlign","fontWeight","fontSize","flexGrow","map","_ref","onClick","open","sessionStorage","setItem","console","log","ml","primary","marginLeft"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/MenuSide.js"],"sourcesContent":["import {\n AddBoxOutlined,\n ChevronRightOutlined,\n DnsOutlined,\n GitHub,\n RocketLaunchOutlined,\n SmartToyOutlined,\n} from '@mui/icons-material'\nimport {\n Box,\n Drawer,\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Typography,\n useTheme,\n} from '@mui/material'\nimport { useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useLocation, useNavigate } from 'react-router-dom'\n\nimport icon from '../media/icon.webp'\nimport ThemeButton from './themeButton'\nimport TranslateButton from './translateButton'\n\nconst MenuSide = () => {\n const theme = useTheme()\n const { pathname } = useLocation()\n const [active, setActive] = useState('')\n const navigate = useNavigate()\n const [drawerWidth, setDrawerWidth] = useState(\n `${Math.min(Math.max(window.innerWidth * 0.2, 287), 320)}px`\n )\n const { t } = useTranslation()\n\n const navItems = [\n {\n text: 'launch_model',\n label: t('menu.launchModel'),\n icon: <RocketLaunchOutlined />,\n },\n {\n text: 'running_models',\n label: t('menu.runningModels'),\n icon: <SmartToyOutlined />,\n },\n {\n text: 'register_model',\n label: t('menu.registerModel'),\n icon: <AddBoxOutlined />,\n },\n {\n text: 'cluster_information',\n label: t('menu.clusterInfo'),\n icon: <DnsOutlined />,\n },\n {\n text: 'contact_us',\n label: t('menu.contactUs'),\n icon: <GitHub />,\n },\n ]\n\n useEffect(() => {\n setActive(pathname.substring(1))\n }, [pathname])\n\n useEffect(() => {\n const screenWidth = window.innerWidth\n const maxDrawerWidth = Math.min(Math.max(screenWidth * 0.2, 287), 320)\n setDrawerWidth(`${maxDrawerWidth}px`)\n\n // Update the drawer width on window resize\n const handleResize = () => {\n const newScreenWidth = window.innerWidth\n const newMaxDrawerWidth = Math.min(\n Math.max(newScreenWidth * 0.2, 287),\n 320\n )\n setDrawerWidth(`${newMaxDrawerWidth}px`)\n }\n\n window.addEventListener('resize', handleResize)\n return () => {\n window.removeEventListener('resize', handleResize)\n }\n }, [])\n\n return (\n <Drawer\n variant=\"permanent\"\n sx={{\n width: drawerWidth,\n ...theme.mixins.toolbar,\n flexShrink: 0,\n [`& .MuiDrawer-paper`]: {\n width: drawerWidth,\n boxSizing: 'border-box',\n },\n }}\n style={{ zIndex: 1 }}\n >\n {/* Title */}\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n width=\"100%\"\n >\n <Box display=\"flex\" m=\"2rem 1rem 0rem 1rem\" width=\"217px\">\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n textTransform=\"none\"\n >\n <Box\n component=\"img\"\n alt=\"profile\"\n src={icon}\n height=\"60px\"\n width=\"60px\"\n borderRadius=\"50%\"\n sx={{ objectFit: 'cover', mr: 1.5 }}\n />\n <Box textAlign=\"left\">\n <Typography fontWeight=\"bold\" fontSize=\"1.7rem\">\n {'Xinference'}\n </Typography>\n </Box>\n </Box>\n </Box>\n </Box>\n\n <Box sx={{ flexGrow: 1 }}>\n <Box width=\"100%\">\n <Box m=\"1.5rem 2rem 2rem 3rem\"></Box>\n <List>\n {navItems.map(({ text, label, icon }) => {\n if (!icon) {\n return (\n <Typography key={text} sx={{ m: '2.25rem 0 1rem 3rem' }}>\n {label}\n </Typography>\n )\n }\n return (\n <ListItem key={text}>\n <ListItemButton\n onClick={() => {\n if (text === 'contact_us') {\n window.open(\n 'https://github.com/xorbitsai/inference',\n '_blank',\n 'noreferrer'\n )\n } else if (text === 'launch_model') {\n sessionStorage.setItem('modelType', '/launch_model/llm')\n navigate('/launch_model/llm')\n setActive(text)\n sessionStorage.setItem('lastActiveUrl', text)\n console.log(active)\n } else if (text === 'cluster_information') {\n navigate('/cluster_info')\n setActive(text)\n } else if (text === 'running_models') {\n navigate('/running_models/LLM')\n sessionStorage.setItem(\n 'runningModelType',\n '/running_models/LLM'\n )\n setActive(text)\n sessionStorage.setItem('lastActiveUrl', text)\n console.log(active)\n } else if (text === 'register_model') {\n sessionStorage.setItem(\n 'registerModelType',\n '/register_model/llm'\n )\n navigate('/register_model/llm')\n setActive(text)\n sessionStorage.setItem('lastActiveUrl', text)\n console.log(active)\n } else {\n navigate(`/${text}`)\n setActive(text)\n console.log(active)\n }\n }}\n >\n <ListItemIcon\n sx={{\n ml: '2rem',\n }}\n >\n {icon}\n </ListItemIcon>\n <ListItemText primary={label} />\n <ChevronRightOutlined sx={{ ml: 'auto' }} />\n </ListItemButton>\n </ListItem>\n )\n })}\n </List>\n </Box>\n </Box>\n\n <Box display=\"flex\" alignItems=\"center\" marginLeft={'3rem'}>\n <ThemeButton sx={{ m: '1rem' }} />\n <TranslateButton />\n </Box>\n </Drawer>\n )\n}\n\nexport default MenuSide\n"],"mappings":"waAAA,OACEA,cAAc,CACdC,oBAAoB,CACpBC,WAAW,CACXC,MAAM,CACNC,oBAAoB,CACpBC,gBAAgB,KACX,qBAAqB,CAC5B,OACEC,GAAG,CACHC,MAAM,CACNC,IAAI,CACJC,QAAQ,CACRC,cAAc,CACdC,YAAY,CACZC,YAAY,CACZC,UAAU,CACVC,QAAQ,KACH,eAAe,CACtB,OAASC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC3C,OAASC,cAAc,KAAQ,eAAe,CAC9C,OAASC,WAAW,CAAEC,WAAW,KAAQ,kBAAkB,CAE3D,MAAO,CAAAC,IAAI,KAAM,oBAAoB,CACrC,MAAO,CAAAC,WAAW,KAAM,eAAe,CACvC,MAAO,CAAAC,eAAe,KAAM,mBAAmB,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE/C,GAAM,CAAAC,QAAQ,CAAG,QAAX,CAAAA,QAAQA,CAAA,CAAS,CACrB,GAAM,CAAAC,KAAK,CAAGd,QAAQ,CAAC,CAAC,CACxB,IAAAe,YAAA,CAAqBX,WAAW,CAAC,CAAC,CAA1BY,QAAQ,CAAAD,YAAA,CAARC,QAAQ,CAChB,IAAAC,SAAA,CAA4Bf,QAAQ,CAAC,EAAE,CAAC,CAAAgB,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAAjCG,MAAM,CAAAF,UAAA,IAAEG,SAAS,CAAAH,UAAA,IACxB,GAAM,CAAAI,QAAQ,CAAGjB,WAAW,CAAC,CAAC,CAC9B,IAAAkB,UAAA,CAAsCrB,QAAQ,IAAAsB,MAAA,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CAAC,eAAe,CAAE3C,IAAI,CAAC,CAC7C4C,OAAO,CAACC,GAAG,CAAC7D,MAAM,CAAC,CACrB,CAAC,IAAM,CACLE,QAAQ,KAAAE,MAAA,CAAKY,IAAI,CAAE,CAAC,CACpBf,SAAS,CAACe,IAAI,CAAC,CACf4C,OAAO,CAACC,GAAG,CAAC7D,MAAM,CAAC,CACrB,CACF,CAAE,CAAAqC,QAAA,eAEF/C,IAAA,CAACb,YAAY,EACXkD,EAAE,CAAE,CACFmC,EAAE,CAAE,MACN,CAAE,CAAAzB,QAAA,CAEDnD,IAAI,CACO,CAAC,cACfI,IAAA,CAACZ,YAAY,EAACqF,OAAO,CAAE9C,KAAM,CAAE,CAAC,cAChC3B,IAAA,CAACvB,oBAAoB,EAAC4D,EAAE,CAAE,CAAEmC,EAAE,CAAE,MAAO,CAAE,CAAE,CAAC,EAC9B,CAAC,EApDJ9C,IAqDL,CAAC,CAEf,CAAC,CAAC,CACE,CAAC,EACJ,CAAC,CACH,CAAC,cAENxB,KAAA,CAACpB,GAAG,EAACkE,OAAO,CAAC,MAAM,CAACE,UAAU,CAAC,QAAQ,CAACwB,UAAU,CAAE,MAAO,CAAA3B,QAAA,eACzD/C,IAAA,CAACH,WAAW,EAACwC,EAAE,CAAE,CAAEc,CAAC,CAAE,MAAO,CAAE,CAAE,CAAC,cAClCnD,IAAA,CAACF,eAAe,GAAE,CAAC,EAChB,CAAC,EACA,CAAC,CAEb,CAAC,CAED,cAAe,CAAAK,QAAQ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"export var llmAllDataKey=['model_uid','model_name','model_type','model_engine','model_format','model_size_in_billions','quantization','n_worker','n_gpu','n_gpu_layers','replica','request_limits','worker_ip','gpu_idx','download_hub','model_path','gguf_quantization','gguf_model_path','cpu_offload','peft_model_config'];export var additionalParameterTipList={'transformers':['torch_dtype','device'],'llama.cpp':['n_ctx','use_mmap','use_mlock'],'vllm':['block_size','gpu_memory_utilization','max_num_seqs','max_model_len','guided_decoding_backend','scheduling_policy','tensor_parallel_size','pipeline_parallel_size','enable_prefix_cache','enable_chunked_prefill','enforce_eager','cpu_offload_gb','disable_custom_all_reduce'],'sglang':['mem_fraction_static','attention_reduce_in_fp32','tp_size','dp_size','chunked_prefill_size','cpu_offload_gb','enable_dp_attention','enable_ep_moe'],'mlx':['cache_limit_gb','max_kv_size']};","map":{"version":3,"names":["llmAllDataKey","additionalParameterTipList"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/data/data.js"],"sourcesContent":["export const llmAllDataKey = [\n 'model_uid',\n 'model_name',\n 'model_type',\n 'model_engine',\n 'model_format',\n 'model_size_in_billions',\n 'quantization',\n 'n_worker',\n 'n_gpu',\n 'n_gpu_layers',\n 'replica',\n 'request_limits',\n 'worker_ip',\n 'gpu_idx',\n 'download_hub',\n 'model_path',\n 'gguf_quantization',\n 'gguf_model_path',\n 'cpu_offload',\n 'peft_model_config',\n]\n\nexport const additionalParameterTipList = {\n 'transformers': ['torch_dtype', 'device'],\n 'llama.cpp': ['n_ctx', 'use_mmap', 'use_mlock'],\n 'vllm': [\n 'block_size',\n 'gpu_memory_utilization',\n 'max_num_seqs',\n 'max_model_len',\n 'guided_decoding_backend',\n 'scheduling_policy',\n 'tensor_parallel_size',\n 'pipeline_parallel_size',\n 'enable_prefix_cache',\n 'enable_chunked_prefill',\n 'enforce_eager',\n 'cpu_offload_gb',\n 'disable_custom_all_reduce',\n ],\n 'sglang': [\n 'mem_fraction_static',\n 'attention_reduce_in_fp32',\n 'tp_size',\n 'dp_size',\n 'chunked_prefill_size',\n 'cpu_offload_gb',\n 'enable_dp_attention',\n 'enable_ep_moe',\n ],\n 'mlx': ['cache_limit_gb', 'max_kv_size'],\n}\n"],"mappings":"AAAA,MAAO,IAAM,CAAAA,aAAa,CAAG,CAC3B,WAAW,CACX,YAAY,CACZ,YAAY,CACZ,cAAc,CACd,cAAc,CACd,wBAAwB,CACxB,cAAc,CACd,UAAU,CACV,OAAO,CACP,cAAc,CACd,SAAS,CACT,gBAAgB,CAChB,WAAW,CACX,SAAS,CACT,cAAc,CACd,YAAY,CACZ,mBAAmB,CACnB,iBAAiB,CACjB,aAAa,CACb,mBAAmB,CACpB,CAED,MAAO,IAAM,CAAAC,0BAA0B,CAAG,CACxC,cAAc,CAAE,CAAC,aAAa,CAAE,QAAQ,CAAC,CACzC,WAAW,CAAE,CAAC,OAAO,CAAE,UAAU,CAAE,WAAW,CAAC,CAC/C,MAAM,CAAE,CACN,YAAY,CACZ,wBAAwB,CACxB,cAAc,CACd,eAAe,CACf,yBAAyB,CACzB,mBAAmB,CACnB,sBAAsB,CACtB,wBAAwB,CACxB,qBAAqB,CACrB,wBAAwB,CACxB,eAAe,CACf,gBAAgB,CAChB,2BAA2B,CAC5B,CACD,QAAQ,CAAE,CACR,qBAAqB,CACrB,0BAA0B,CAC1B,SAAS,CACT,SAAS,CACT,sBAAsB,CACtB,gBAAgB,CAChB,qBAAqB,CACrB,eAAe,CAChB,CACD,KAAK,CAAE,CAAC,gBAAgB,CAAE,aAAa,CACzC,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -42,11 +42,14 @@
42
42
  "otherModel": "other model",
43
43
  "confirmDeleteCustomModel": "Are you sure to delete this custom model? This behavior is irreversible.",
44
44
  "lastConfig": "Last Config",
45
+ "commandLineParsing": "Command Line Argument Parsing",
46
+ "copyToCommandLine": "Copy as Command Line Command",
45
47
  "modelEngine": "Model Engine",
46
48
  "modelFormat": "Model Format",
47
49
  "modelSize": "Model Size",
48
50
  "quantization": "Quantization",
49
51
  "nGPU": "GPU Count",
52
+ "nGPUPerWorker": "GPU Count Per Worker",
50
53
  "nGpuLayers": "N GPU Layers",
51
54
  "replica": "Replica",
52
55
  "optionalConfigurations": "Optional Configurations",
@@ -54,6 +57,7 @@
54
57
  "requestLimits.optional": "(Optional) Request Limits, the number of request limits for this model, default is None",
55
58
  "workerIp.optional": "(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario",
56
59
  "workerIp": "Worker Ip, specify the worker ip where the model is located in a distributed scenario",
60
+ "workerCount.optional": "(Optional) Worker Count",
57
61
  "GPUIdx.optional": "(Optional) GPU Idx, Specify the GPU index where the model is located",
58
62
  "GPUIdx": "GPU Idx, Specify the GPU index where the model is located",
59
63
  "downloadHub.optional": "(Optional) Download_hub",
@@ -74,6 +78,8 @@
74
78
  "goBack": "Go Back",
75
79
  "copyJson": "Copy Json",
76
80
  "cancel": "Cancel",
81
+ "confirm": "Confirm",
82
+ "placeholderTip": "Please enter",
77
83
  "fillCompleteParametersBeforeAdding": "Please fill in the complete parameters before adding!",
78
84
  "model_format": "model_format",
79
85
  "model_size_in_billions": "model_size_in_billions",
@@ -85,7 +91,10 @@
85
91
  "copyRealPath": "Copy real_path",
86
92
  "copyPath": "Copy path",
87
93
  "noCacheForNow": "No cache for now!",
88
- "confirmDeleteCacheFiles": "Confirm deletion of cache files? This action is irreversible."
94
+ "confirmDeleteCacheFiles": "Confirm deletion of cache files? This action is irreversible.",
95
+ "commandLineTip": "Please confirm whether the model names are consistent.",
96
+ "featured": "featured",
97
+ "all": "all"
89
98
  },
90
99
 
91
100
  "runningModels": {
@@ -182,5 +191,9 @@
182
191
  "gpuMemUsage": "GPU Mem Usage",
183
192
  "gpuMemTotal": "GPU Mem Total",
184
193
  "worker": "Worker"
194
+ },
195
+
196
+ "components": {
197
+ "copySuccess": "Copied to clipboard!"
185
198
  }
186
199
  }
@@ -42,11 +42,14 @@
42
42
  "otherModel": "其他模型",
43
43
  "confirmDeleteCustomModel": "您确定要删除这个自定义模型吗?此操作无法恢复。",
44
44
  "lastConfig": "最后配置",
45
+ "commandLineParsing": "解析命令行参数",
46
+ "copyToCommandLine": "复制为命令行指令",
45
47
  "modelEngine": "模型引擎",
46
48
  "modelFormat": "模型格式",
47
49
  "modelSize": "模型大小",
48
50
  "quantization": "量化",
49
51
  "nGPU": "GPU 数量",
52
+ "nGPUPerWorker": "每个 Worker 上的 GPU 数量",
50
53
  "nGpuLayers": "GPU 层数",
51
54
  "replica": "副本",
52
55
  "optionalConfigurations": "可选配置",
@@ -54,6 +57,7 @@
54
57
  "requestLimits.optional": "(可选) 请求限制,模型的请求限制数,默认值为无",
55
58
  "workerIp.optional": "(可选) 工作节点 IP,在分布式场景中指定模型所在的工作节点 IP",
56
59
  "workerIp": "工作节点 IP,在分布式场景中指定模型所在的工作节点 IP",
60
+ "workerCount.optional": "(可选) Worker 数量",
57
61
  "GPUIdx.optional": "(可选) GPU 索引,指定模型所在的 GPU 索引",
58
62
  "GPUIdx": "GPU 索引,指定模型所在的 GPU 索引",
59
63
  "downloadHub.optional": "(可选) 下载中心",
@@ -74,6 +78,8 @@
74
78
  "goBack": "返回",
75
79
  "copyJson": "复制 JSON",
76
80
  "cancel": "取消",
81
+ "confirm": "确定",
82
+ "placeholderTip": "请输入",
77
83
  "fillCompleteParametersBeforeAdding": "请在添加之前填写完整的参数!",
78
84
  "model_format": "模型格式",
79
85
  "model_size_in_billions": "模型大小(以十亿为单位)",
@@ -85,7 +91,10 @@
85
91
  "copyRealPath": "复制真实路径",
86
92
  "copyPath": "复制路径",
87
93
  "noCacheForNow": "当前没有缓存!",
88
- "confirmDeleteCacheFiles": "确认删除缓存文件吗?此操作无法恢复。"
94
+ "confirmDeleteCacheFiles": "确认删除缓存文件吗?此操作无法恢复。",
95
+ "commandLineTip": "请确定模型名称是否一致。",
96
+ "featured": "推荐",
97
+ "all": "全部"
89
98
  },
90
99
 
91
100
  "runningModels": {
@@ -182,5 +191,9 @@
182
191
  "gpuMemUsage": "GPU 内存使用率",
183
192
  "gpuMemTotal": "GPU 内存总量",
184
193
  "worker": "工作节点"
194
+ },
195
+
196
+ "components": {
197
+ "copySuccess": "已复制到剪贴板!"
185
198
  }
186
199
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xinference
3
- Version: 1.2.1
3
+ Version: 1.3.0
4
4
  Summary: Model Serving Made Easy
5
5
  Home-page: https://github.com/xorbitsai/inference
6
6
  Author: Qin Xuye
@@ -39,6 +39,7 @@ Requires-Dist: python-jose[cryptography]
39
39
  Requires-Dist: passlib[bcrypt]
40
40
  Requires-Dist: aioprometheus[starlette]>=23.12.0
41
41
  Requires-Dist: nvidia-ml-py
42
+ Requires-Dist: pynvml>=12
42
43
  Requires-Dist: async-timeout
43
44
  Requires-Dist: peft
44
45
  Requires-Dist: timm
@@ -98,7 +99,7 @@ Requires-Dist: tomli; extra == "all"
98
99
  Requires-Dist: vocos; extra == "all"
99
100
  Requires-Dist: jieba; extra == "all"
100
101
  Requires-Dist: soundfile; extra == "all"
101
- Requires-Dist: qwen-vl-utils; extra == "all"
102
+ Requires-Dist: qwen-vl-utils!=0.0.9; extra == "all"
102
103
  Requires-Dist: datamodel-code-generator; extra == "all"
103
104
  Requires-Dist: jsonschema; extra == "all"
104
105
  Requires-Dist: verovio>=4.3.1; extra == "all"
@@ -109,7 +110,7 @@ Requires-Dist: mlx-vlm>=0.1.11; (sys_platform == "darwin" and platform_machine =
109
110
  Requires-Dist: mlx-whisper; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "all"
110
111
  Requires-Dist: f5-tts-mlx; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "all"
111
112
  Requires-Dist: vllm>=0.2.6; sys_platform == "linux" and extra == "all"
112
- Requires-Dist: sglang>=0.2.7; sys_platform == "linux" and extra == "all"
113
+ Requires-Dist: sglang[srt]>=0.4.2.post4; sys_platform == "linux" and extra == "all"
113
114
  Requires-Dist: nemo-text-processing<1.1.0; sys_platform == "linux" and extra == "all"
114
115
  Requires-Dist: WeTextProcessing<1.0.4; sys_platform == "linux" and extra == "all"
115
116
  Provides-Extra: audio
@@ -154,6 +155,8 @@ Requires-Dist: fugashi; extra == "audio"
154
155
  Requires-Dist: g2p-en; extra == "audio"
155
156
  Requires-Dist: anyascii; extra == "audio"
156
157
  Requires-Dist: gruut[de,es,fr]; extra == "audio"
158
+ Requires-Dist: kokoro>=0.7.15; extra == "audio"
159
+ Requires-Dist: misaki[en,ja,zh]>=0.7.15; extra == "audio"
157
160
  Requires-Dist: nemo-text-processing<1.1.0; sys_platform == "linux" and extra == "audio"
158
161
  Requires-Dist: WeTextProcessing<1.0.4; sys_platform == "linux" and extra == "audio"
159
162
  Provides-Extra: benchmark
@@ -211,21 +214,18 @@ Requires-Dist: mlx-lm>=0.21.1; extra == "mlx"
211
214
  Requires-Dist: mlx-vlm>=0.1.11; extra == "mlx"
212
215
  Requires-Dist: mlx-whisper; extra == "mlx"
213
216
  Requires-Dist: f5-tts-mlx; extra == "mlx"
214
- Requires-Dist: qwen-vl-utils; extra == "mlx"
217
+ Requires-Dist: qwen-vl-utils!=0.0.9; extra == "mlx"
215
218
  Requires-Dist: tomli; extra == "mlx"
216
219
  Provides-Extra: rerank
217
220
  Requires-Dist: FlagEmbedding; extra == "rerank"
218
221
  Provides-Extra: sglang
219
- Requires-Dist: outlines>=0.0.34; extra == "sglang"
220
- Requires-Dist: sglang>=0.2.7; sys_platform == "linux" and extra == "sglang"
221
- Requires-Dist: vllm>=0.5.2; sys_platform == "linux" and extra == "sglang"
222
+ Requires-Dist: sglang[srt]>=0.4.2.post4; sys_platform == "linux" and extra == "sglang"
222
223
  Provides-Extra: transformers
223
224
  Requires-Dist: transformers>=4.46.0; extra == "transformers"
224
225
  Requires-Dist: torch; extra == "transformers"
225
226
  Requires-Dist: accelerate>=0.28.0; extra == "transformers"
226
227
  Requires-Dist: sentencepiece; extra == "transformers"
227
228
  Requires-Dist: transformers-stream-generator; extra == "transformers"
228
- Requires-Dist: bitsandbytes; extra == "transformers"
229
229
  Requires-Dist: protobuf; extra == "transformers"
230
230
  Requires-Dist: einops; extra == "transformers"
231
231
  Requires-Dist: tiktoken; extra == "transformers"
@@ -236,11 +236,12 @@ Requires-Dist: torchvision; extra == "transformers"
236
236
  Requires-Dist: peft; extra == "transformers"
237
237
  Requires-Dist: eva-decord; extra == "transformers"
238
238
  Requires-Dist: jj-pytorchvideo; extra == "transformers"
239
- Requires-Dist: qwen-vl-utils; extra == "transformers"
239
+ Requires-Dist: qwen-vl-utils!=0.0.9; extra == "transformers"
240
240
  Requires-Dist: datamodel-code-generator; extra == "transformers"
241
241
  Requires-Dist: jsonschema; extra == "transformers"
242
242
  Requires-Dist: auto-gptq; sys_platform != "darwin" and extra == "transformers"
243
243
  Requires-Dist: autoawq<0.2.6; sys_platform != "darwin" and extra == "transformers"
244
+ Requires-Dist: bitsandbytes; sys_platform == "linux" and extra == "transformers"
244
245
  Provides-Extra: video
245
246
  Requires-Dist: diffusers>=0.32.0; extra == "video"
246
247
  Requires-Dist: imageio-ffmpeg; extra == "video"
@@ -287,6 +288,7 @@ potential of cutting-edge AI models.
287
288
 
288
289
  ## 🔥 Hot Topics
289
290
  ### Framework Enhancements
291
+ - Distributed inference: running models across workers: [#2877](https://github.com/xorbitsai/inference/pull/2877)
290
292
  - VLLM enhancement: Shared KV cache across multiple replicas: [#2732](https://github.com/xorbitsai/inference/pull/2732)
291
293
  - Support Continuous batching for Transformers engine: [#1724](https://github.com/xorbitsai/inference/pull/1724)
292
294
  - Support MLX backend for Apple Silicon chips: [#1765](https://github.com/xorbitsai/inference/pull/1765)
@@ -294,16 +296,15 @@ potential of cutting-edge AI models.
294
296
  - Support SGLang backend: [#1161](https://github.com/xorbitsai/inference/pull/1161)
295
297
  - Support LoRA for LLM and image models: [#1080](https://github.com/xorbitsai/inference/pull/1080)
296
298
  - Support speech recognition model: [#929](https://github.com/xorbitsai/inference/pull/929)
297
- - Metrics support: [#906](https://github.com/xorbitsai/inference/pull/906)
298
299
  ### New Models
300
+ - Built-in support for [DeepSeek V3 and R1](https://github.com/deepseek-ai/DeepSeek-R1): [#2864](https://github.com/xorbitsai/inference/pull/2864)
301
+ - Built-in support for [InternVL2.5](https://internvl.github.io/blog/2024-12-05-InternVL-2.5/): [#2776](https://github.com/xorbitsai/inference/pull/2776)
302
+ - Built-in support for [DeepSeek-R1-Distill-Llama](https://github.com/deepseek-ai/DeepSeek-R1?tab=readme-ov-file#deepseek-r1-distill-models): [#2811](https://github.com/xorbitsai/inference/pull/2811)
303
+ - Built-in support for [DeepSeek-R1-Distill-Qwen](https://github.com/deepseek-ai/DeepSeek-R1?tab=readme-ov-file#deepseek-r1-distill-models): [#2781](https://github.com/xorbitsai/inference/pull/2781)
304
+ - Built-in support for [Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M): [#2790](https://github.com/xorbitsai/inference/pull/2790)
305
+ - Built-in support for [qwen2.5-vl](https://github.com/QwenLM/Qwen2.5-VL): [#2788](https://github.com/xorbitsai/inference/pull/2788)
306
+ - Built-in support for [internlm3-instruct](https://github.com/InternLM/InternLM): [#2789](https://github.com/xorbitsai/inference/pull/2789)
299
307
  - Built-in support for [MeloTTS](https://github.com/myshell-ai/MeloTTS): [#2760](https://github.com/xorbitsai/inference/pull/2760)
300
- - Built-in support for [CogAgent](https://github.com/THUDM/CogAgent): [#2740](https://github.com/xorbitsai/inference/pull/2740)
301
- - Built-in support for [HunyuanVideo](https://github.com/Tencent/HunyuanVideo): [#2721](https://github.com/xorbitsai/inference/pull/2721)
302
- - Built-in support for [HunyuanDiT](https://github.com/Tencent/HunyuanDiT): [#2727](https://github.com/xorbitsai/inference/pull/2727)
303
- - Built-in support for [Macro-o1](https://github.com/AIDC-AI/Marco-o1): [#2749](https://github.com/xorbitsai/inference/pull/2749)
304
- - Built-in support for [Stable Diffusion 3.5](https://huggingface.co/collections/stabilityai/stable-diffusion-35-671785cca799084f71fa2838): [#2706](https://github.com/xorbitsai/inference/pull/2706)
305
- - Built-in support for [CosyVoice 2](https://huggingface.co/FunAudioLLM/CosyVoice2-0.5B): [#2684](https://github.com/xorbitsai/inference/pull/2684)
306
- - Built-in support for [Fish Speech V1.5](https://huggingface.co/fishaudio/fish-speech-1.5): [#2672](https://github.com/xorbitsai/inference/pull/2672)
307
308
  ### Integrations
308
309
  - [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.
309
310
  - [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.