xinference 0.11.0__py3-none-any.whl → 0.11.2__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 (56) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +30 -0
  3. xinference/client/restful/restful_client.py +29 -0
  4. xinference/core/cache_tracker.py +12 -1
  5. xinference/core/chat_interface.py +10 -4
  6. xinference/core/model.py +2 -2
  7. xinference/core/supervisor.py +30 -2
  8. xinference/core/utils.py +12 -0
  9. xinference/core/worker.py +4 -1
  10. xinference/deploy/cmdline.py +126 -0
  11. xinference/deploy/test/test_cmdline.py +24 -0
  12. xinference/fields.py +3 -1
  13. xinference/model/llm/__init__.py +2 -0
  14. xinference/model/llm/ggml/chatglm.py +98 -13
  15. xinference/model/llm/ggml/llamacpp.py +49 -2
  16. xinference/model/llm/llm_family.json +633 -9
  17. xinference/model/llm/llm_family.py +84 -10
  18. xinference/model/llm/llm_family_modelscope.json +337 -10
  19. xinference/model/llm/memory.py +332 -0
  20. xinference/model/llm/pytorch/chatglm.py +48 -0
  21. xinference/model/llm/pytorch/core.py +25 -6
  22. xinference/model/llm/pytorch/deepseek_vl.py +35 -9
  23. xinference/model/llm/pytorch/intern_vl.py +387 -0
  24. xinference/model/llm/pytorch/internlm2.py +32 -1
  25. xinference/model/llm/pytorch/qwen_vl.py +38 -11
  26. xinference/model/llm/pytorch/utils.py +38 -1
  27. xinference/model/llm/pytorch/yi_vl.py +42 -14
  28. xinference/model/llm/sglang/core.py +31 -9
  29. xinference/model/llm/utils.py +38 -5
  30. xinference/model/llm/vllm/core.py +87 -5
  31. xinference/model/rerank/core.py +23 -1
  32. xinference/model/utils.py +17 -7
  33. xinference/thirdparty/deepseek_vl/models/processing_vlm.py +1 -1
  34. xinference/thirdparty/deepseek_vl/models/siglip_vit.py +2 -2
  35. xinference/thirdparty/llava/mm_utils.py +3 -2
  36. xinference/thirdparty/llava/model/llava_arch.py +1 -1
  37. xinference/thirdparty/omnilmm/chat.py +6 -5
  38. xinference/types.py +10 -1
  39. xinference/web/ui/build/asset-manifest.json +3 -3
  40. xinference/web/ui/build/index.html +1 -1
  41. xinference/web/ui/build/static/js/{main.8e44da4b.js → main.551aa479.js} +3 -3
  42. xinference/web/ui/build/static/js/main.551aa479.js.map +1 -0
  43. xinference/web/ui/node_modules/.cache/babel-loader/1fa824d82b2af519de7700c594e50bde4bbca60d13bd3fabff576802e4070304.json +1 -0
  44. xinference/web/ui/node_modules/.cache/babel-loader/23caf6f1e52c43e983ca3bfd4189f41dbd645fa78f2dfdcd7f6b69bc41678665.json +1 -0
  45. xinference/web/ui/node_modules/.cache/babel-loader/a6da6bc3d0d2191adebee87fb58ecebe82d071087bd2f7f3a9c7fdd2ada130f2.json +1 -0
  46. {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/METADATA +10 -8
  47. {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/RECORD +52 -50
  48. xinference/web/ui/build/static/js/main.8e44da4b.js.map +0 -1
  49. xinference/web/ui/node_modules/.cache/babel-loader/1870cd6f7054d04e049e363c0a85526584fe25519378609d2838e28d7492bbf1.json +0 -1
  50. xinference/web/ui/node_modules/.cache/babel-loader/5393569d846332075b93b55656716a34f50e0a8c970be789502d7e6c49755fd7.json +0 -1
  51. xinference/web/ui/node_modules/.cache/babel-loader/ddaec68b88e5eff792df1e39a4b4b8b737bfc832293c015660c3c69334e3cf5c.json +0 -1
  52. /xinference/web/ui/build/static/js/{main.8e44da4b.js.LICENSE.txt → main.551aa479.js.LICENSE.txt} +0 -0
  53. {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/LICENSE +0 -0
  54. {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/WHEEL +0 -0
  55. {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/entry_points.txt +0 -0
  56. {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box,FormControl}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{ApiContext}from'../../components/apiContext';import fetcher from'../../components/fetcher';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';import ModelCard from'./modelCard';import style from'./styles/launchModelStyle';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchModelComponent=function LaunchModelComponent(_ref){var modelType=_ref.modelType,gpuAvailable=_ref.gpuAvailable;var endPoint=useContext(ApiContext).endPoint;var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];var _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var handleChange=function handleChange(e){setSearchTerm(e.target.value);};var filter=function filter(registration){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';return modelName.includes(searchTerm.toLowerCase());};var update=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var response,registrations,builtinModels;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(isCallingApi||isUpdatingModel)){_context.next=2;break;}return _context.abrupt(\"return\");case 2:_context.prev=2;setIsCallingApi(true);_context.next=6;return fetcher(\"\".concat(endPoint,\"/v1/model_registrations/\").concat(modelType,\"?detailed=true\"),{method:'GET'});case 6:response=_context.sent;_context.next=9;return response.json();case 9:registrations=_context.sent;builtinModels=registrations.filter(function(v){return v.is_builtin;});setRegistrationData(builtinModels);_context.next=17;break;case 14:_context.prev=14;_context.t0=_context[\"catch\"](2);console.error('Error:',_context.t0);case 17:_context.prev=17;setIsCallingApi(false);return _context.finish(17);case 20:case\"end\":return _context.stop();}},_callee,null,[[2,14,17,20]]);}));return function update(){return _ref2.apply(this,arguments);};}();useEffect(function(){update();},[]);return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'1fr',margin:'30px 2rem'},children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:\"Search for \".concat(modelType,\" model name\"),value:searchTerm,onChange:handleChange,size:\"small\",hotkey:\"/\"})})}),/*#__PURE__*/_jsx(\"div\",{style:style,children:registrationData.filter(function(registration){return filter(registration);}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,modelType:modelType,gpuAvailable:gpuAvailable},filteredRegistration.model_name);})})]});};export default LaunchModelComponent;","map":{"version":3,"names":["Box","FormControl","React","useContext","useEffect","useState","ApiContext","fetcher","HotkeyFocusTextField","ModelCard","style","jsx","_jsx","jsxs","_jsxs","LaunchModelComponent","_ref","modelType","gpuAvailable","endPoint","_useState","_useState2","_slicedToArray","registrationData","setRegistrationData","_useState3","_useState4","searchTerm","setSearchTerm","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","handleChange","e","target","value","filter","registration","modelName","model_name","toLowerCase","includes","update","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","registrations","builtinModels","wrap","_callee$","_context","prev","next","abrupt","concat","method","sent","json","v","is_builtin","t0","console","error","finish","stop","apply","arguments","m","children","display","gridTemplateColumns","margin","variant","id","type","label","onChange","size","hotkey","map","filteredRegistration","url","modelData"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/LaunchModelComponent.js"],"sourcesContent":["import { Box, FormControl } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetcher from '../../components/fetcher'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport ModelCard from './modelCard'\nimport style from './styles/launchModelStyle'\n\nconst LaunchModelComponent = ({ modelType, gpuAvailable }) => {\n let endPoint = useContext(ApiContext).endPoint\n const [registrationData, setRegistrationData] = useState([])\n const [searchTerm, setSearchTerm] = useState('')\n\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n\n const handleChange = (e) => {\n setSearchTerm(e.target.value)\n }\n\n const filter = (registration) => {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n return modelName.includes(searchTerm.toLowerCase())\n }\n\n const update = async () => {\n if (isCallingApi || isUpdatingModel) return\n\n try {\n setIsCallingApi(true)\n\n const response = await fetcher(\n `${endPoint}/v1/model_registrations/${modelType}?detailed=true`,\n {\n method: 'GET',\n }\n )\n\n const registrations = await response.json()\n\n const builtinModels = registrations.filter((v) => {\n return v.is_builtin\n })\n setRegistrationData(builtinModels)\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [])\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '1fr',\n margin: '30px 2rem',\n }}\n >\n <FormControl variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label={`Search for ${modelType} model name`}\n value={searchTerm}\n onChange={handleChange}\n size=\"small\"\n hotkey=\"/\"\n />\n </FormControl>\n </div>\n <div style={style}>\n {registrationData\n .filter((registration) => filter(registration))\n .map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n modelType={modelType}\n gpuAvailable={gpuAvailable}\n />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchModelComponent\n"],"mappings":"ubAAA,OAASA,GAAG,CAAEC,WAAW,KAAQ,eAAe,CAChD,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAE9D,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,OAAO,KAAM,0BAA0B,CAC9C,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,SAAS,KAAM,aAAa,CACnC,MAAO,CAAAC,KAAK,KAAM,2BAA2B,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE7C,GAAM,CAAAC,oBAAoB,CAAG,QAAvB,CAAAA,oBAAoBA,CAAAC,IAAA,CAAoC,IAA9B,CAAAC,SAAS,CAAAD,IAAA,CAATC,SAAS,CAAEC,YAAY,CAAAF,IAAA,CAAZE,YAAY,CACrD,GAAI,CAAAC,QAAQ,CAAGhB,UAAU,CAACG,UAAU,CAAC,CAACa,QAAQ,CAC9C,IAAAC,SAAA,CAAgDf,QAAQ,CAAC,EAAE,CAAC,CAAAgB,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAArDG,gBAAgB,CAAAF,UAAA,IAAEG,mBAAmB,CAAAH,UAAA,IAC5C,IAAAI,UAAA,CAAoCpB,QAAQ,CAAC,EAAE,CAAC,CAAAqB,UAAA,CAAAJ,cAAA,CAAAG,UAAA,IAAzCE,UAAU,CAAAD,UAAA,IAAEE,aAAa,CAAAF,UAAA,IAEhC,IAAAG,WAAA,CAA0C1B,UAAU,CAACG,UAAU,CAAC,CAAxDwB,YAAY,CAAAD,WAA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C,MAAM,CAAC,GAAG,CACX,CAAC,CACS,CAAC,CACX,CAAC,cACNvE,IAAA,QAAKF,KAAK,CAAEA,KAAM,CAAA+D,QAAA,CACflD,gBAAgB,CACde,MAAM,CAAC,SAACC,YAAY,QAAK,CAAAD,MAAM,CAACC,YAAY,CAAC,GAAC,CAC9C6C,GAAG,CAAC,SAACC,oBAAoB,qBACxBzE,IAAA,CAACH,SAAS,EAER6E,GAAG,CAAEnE,QAAS,CACdoE,SAAS,CAAEF,oBAAqB,CAChCpE,SAAS,CAAEA,SAAU,CACrBC,YAAY,CAAEA,YAAa,EAJtBmE,oBAAoB,CAAC5C,UAK3B,CAAC,EACH,CAAC,CACD,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAA1B,oBAAoB"},"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{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import Title from'../../components/Title';import LaunchCustom from'./launchCustom';import LaunchLLM from'./launchLLM';import LaunchModelComponent from'./LaunchModelComponent';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchModel=function LaunchModel(){var endPoint=useContext(ApiContext).endPoint;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 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(cookie.token===''||cookie.token===undefined){return;}if(cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){navigate('/login',{replace:true});return;}if(gpuAvailable===-1){fetch(endPoint+'/v1/cluster/devices',{method:'GET',headers:{'Content-Type':'application/json'}}).then(function(res){if(!res.ok){// Usually, if some errors happen here, check if the cluster is available\nres.json().then(function(errorData){setErrorMsg(\"Server error: \".concat(res.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{res.json().then(function(data){setGPUAvailable(parseInt(data,10));});}});}},[cookie.token]);useEffect(function(){});return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(Title,{title:\"Launch Model\"}),/*#__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:\"Language Models\",value:\"/launch_model/llm\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/launch_model/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank Models\",value:\"/launch_model/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image Models\",value:\"/launch_model/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio Models\",value:\"/launch_model/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Custom Models\",value:\"/launch_model/custom/llm\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchLLM,{gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'embedding',gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'rerank',gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'image'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'audio'})}),/*#__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","useNavigate","ApiContext","ErrorMessageSnackBar","Title","LaunchCustom","LaunchLLM","LaunchModelComponent","jsx","_jsx","jsxs","_jsxs","LaunchModel","endPoint","_React$useState","sessionStorage","getItem","_React$useState2","_slicedToArray","value","setValue","_useState","_useState2","gpuAvailable","setGPUAvailable","_useContext","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","handleTabChange","event","newValue","setItem","token","undefined","replace","fetch","method","headers","then","res","ok","json","errorData","concat","status","detail","data","parseInt","m","children","title","sx","borderBottom","borderColor","onChange","label","padding","modelType"],"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 { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport Title from '../../components/Title'\nimport LaunchCustom from './launchCustom'\nimport LaunchLLM from './launchLLM'\nimport LaunchModelComponent from './LaunchModelComponent'\n\nconst LaunchModel = () => {\n let endPoint = useContext(ApiContext).endPoint\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\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 (cookie.token === '' || cookie.token === undefined) {\n return\n }\n if (cookie.token !== 'no_auth' && !sessionStorage.getItem('token')) {\n navigate('/login', { replace: true })\n return\n }\n\n if (gpuAvailable === -1) {\n fetch(endPoint + '/v1/cluster/devices', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n }).then((res) => {\n if (!res.ok) {\n // Usually, if some errors happen here, check if the cluster is available\n res.json().then((errorData) => {\n setErrorMsg(\n `Server error: ${res.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n res.json().then((data) => {\n setGPUAvailable(parseInt(data, 10))\n })\n }\n })\n }\n }, [cookie.token])\n\n useEffect(() => {})\n return (\n <Box m=\"20px\">\n <Title title=\"Launch Model\" />\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=\"Language Models\" value=\"/launch_model/llm\" />\n <Tab label=\"Embedding Models\" value=\"/launch_model/embedding\" />\n <Tab label=\"Rerank Models\" value=\"/launch_model/rerank\" />\n <Tab label=\"Image Models\" value=\"/launch_model/image\" />\n <Tab label=\"Audio Models\" value=\"/launch_model/audio\" />\n <Tab label=\"Custom Models\" value=\"/launch_model/custom/llm\" />\n </TabList>\n </Box>\n <TabPanel value=\"/launch_model/llm\" sx={{ padding: 0 }}>\n <LaunchLLM gpuAvailable={gpuAvailable} />\n </TabPanel>\n <TabPanel value=\"/launch_model/embedding\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'embedding'}\n gpuAvailable={gpuAvailable}\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/rerank\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'rerank'}\n gpuAvailable={gpuAvailable}\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/image\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'image'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/audio\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'audio'} />\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,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,KAAK,KAAM,wBAAwB,CAC1C,MAAO,CAAAC,YAAY,KAAM,gBAAgB,CACzC,MAAO,CAAAC,SAAS,KAAM,aAAa,CACnC,MAAO,CAAAC,oBAAoB,KAAM,wBAAwB,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,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YAAa,CAC5B,CAAC,CACM,CAAC,cACXd,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,sBAAsB,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACxD3C,IAAA,CAACF,oBAAoB,EACnBqD,SAAS,CAAE,QAAS,CACpBrC,YAAY,CAAEA,YAAa,CAC5B,CAAC,CACM,CAAC,cACXd,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,qBAAqB,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvD3C,IAAA,CAACF,oBAAoB,EAACqD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACXnD,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,qBAAqB,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvD3C,IAAA,CAACF,oBAAoB,EAACqD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACXnD,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,0BAA0B,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cAC5D3C,IAAA,CAACJ,YAAY,EAACkB,YAAY,CAAEA,YAAa,CAAE,CAAC,CACpC,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAAX,WAAW"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";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{ChatOutlined,EditNoteOutlined,ExpandLess,ExpandMore,HelpCenterOutlined,RocketLaunchOutlined,UndoOutlined}from'@mui/icons-material';import DeleteIcon from'@mui/icons-material/Delete';import{Alert,Box,Chip,CircularProgress,Collapse,Drawer,FormControl,Grid,IconButton,InputLabel,ListItemButton,ListItemText,MenuItem,Select,Snackbar,Stack,TextField}from'@mui/material';import Paper from'@mui/material/Paper';import React,{useContext,useEffect,useRef,useState}from'react';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import fetcher from'../../components/fetcher';import TitleTypography from'../../components/titleTypography';import AddPair from'./components/addPair';import styles from'./styles/modelCardStyle';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";var ModelCard=function ModelCard(_ref){var url=_ref.url,modelData=_ref.modelData,gpuAvailable=_ref.gpuAvailable,modelType=_ref.modelType,_ref$is_custom=_ref.is_custom,is_custom=_ref$is_custom===void 0?false:_ref$is_custom;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),hover=_useState2[0],setHover=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),selected=_useState4[0],setSelected=_useState4[1];var _useState5=useState(false),_useState6=_slicedToArray(_useState5,2),requestLimitsAlert=_useState6[0],setRequestLimitsAlert=_useState6[1];var _useState7=useState(false),_useState8=_slicedToArray(_useState7,2),GPUIdxAlert=_useState8[0],setGPUIdxAlert=_useState8[1];var _useState9=useState(false),_useState10=_slicedToArray(_useState9,2),isOther=_useState10[0],setIsOther=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),isPeftModelConfig=_useState12[0],setIsPeftModelConfig=_useState12[1];var _useState13=useState(false),_useState14=_slicedToArray(_useState13,2),openSnackbar=_useState14[0],setOpenSnackbar=_useState14[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var navigate=useNavigate();// Model parameter selections\nvar _useState15=useState(''),_useState16=_slicedToArray(_useState15,2),modelUID=_useState16[0],setModelUID=_useState16[1];var _useState17=useState(''),_useState18=_slicedToArray(_useState17,2),modelEngine=_useState18[0],setModelEngine=_useState18[1];var _useState19=useState(''),_useState20=_slicedToArray(_useState19,2),modelFormat=_useState20[0],setModelFormat=_useState20[1];var _useState21=useState(''),_useState22=_slicedToArray(_useState21,2),modelSize=_useState22[0],setModelSize=_useState22[1];var _useState23=useState(''),_useState24=_slicedToArray(_useState23,2),quantization=_useState24[0],setQuantization=_useState24[1];var _useState25=useState('auto'),_useState26=_slicedToArray(_useState25,2),nGPU=_useState26[0],setNGPU=_useState26[1];var _useState27=useState(gpuAvailable===0?'CPU':'GPU'),_useState28=_slicedToArray(_useState27,2),nGpu=_useState28[0],setNGpu=_useState28[1];var _useState29=useState(-1),_useState30=_slicedToArray(_useState29,2),nGPULayers=_useState30[0],setNGPULayers=_useState30[1];var _useState31=useState(1),_useState32=_slicedToArray(_useState31,2),replica=_useState32[0],setReplica=_useState32[1];var _useState33=useState(''),_useState34=_slicedToArray(_useState33,2),requestLimits=_useState34[0],setRequestLimits=_useState34[1];var _useState35=useState(''),_useState36=_slicedToArray(_useState35,2),workerIp=_useState36[0],setWorkerIp=_useState36[1];var _useState37=useState(''),_useState38=_slicedToArray(_useState37,2),GPUIdx=_useState38[0],setGPUIdx=_useState38[1];var _useState39=useState({}),_useState40=_slicedToArray(_useState39,2),enginesObj=_useState40[0],setEnginesObj=_useState40[1];var _useState41=useState([]),_useState42=_slicedToArray(_useState41,2),engineOptions=_useState42[0],setEngineOptions=_useState42[1];var _useState43=useState([]),_useState44=_slicedToArray(_useState43,2),formatOptions=_useState44[0],setFormatOptions=_useState44[1];var _useState45=useState([]),_useState46=_slicedToArray(_useState45,2),sizeOptions=_useState46[0],setSizeOptions=_useState46[1];var _useState47=useState([]),_useState48=_slicedToArray(_useState47,2),quantizationOptions=_useState48[0],setQuantizationOptions=_useState48[1];var _useState49=useState(false),_useState50=_slicedToArray(_useState49,2),customDeleted=_useState50[0],setCustomDeleted=_useState50[1];var _useState51=useState([]),_useState52=_slicedToArray(_useState51,2),customParametersArr=_useState52[0],setCustomParametersArr=_useState52[1];var _useState53=useState([]),_useState54=_slicedToArray(_useState53,2),loraListArr=_useState54[0],setLoraListArr=_useState54[1];var _useState55=useState([]),_useState56=_slicedToArray(_useState55,2),imageLoraLoadKwargsArr=_useState56[0],setImageLoraLoadKwargsArr=_useState56[1];var _useState57=useState([]),_useState58=_slicedToArray(_useState57,2),imageLoraFuseKwargsArr=_useState58[0],setImageLoraFuseKwargsArr=_useState58[1];var parentRef=useRef(null);var range=function range(start,end){return new Array(end-start+1).fill(undefined).map(function(_,i){return i+start;});};var isCached=function isCached(spec){if(spec.model_format==='pytorch'){return spec.cache_status&&spec.cache_status===true;}else{return spec.cache_status&&spec.cache_status.some(function(cs){return cs;});}};// model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\nvar convertModelSize=function convertModelSize(size){return size.toString().includes('_')?size:parseInt(size,10);};useEffect(function(){setModelFormat('');if(modelEngine){var format=_toConsumableArray(new Set(enginesObj[modelEngine].map(function(item){return item.model_format;})));setFormatOptions(format);if(format.length===1){setModelFormat(format[0]);}}},[modelEngine]);useEffect(function(){setModelSize('');if(modelEngine&&modelFormat){var sizes=_toConsumableArray(new Set(enginesObj[modelEngine].filter(function(item){return item.model_format===modelFormat;}).map(function(item){return item.model_size_in_billions;})));setSizeOptions(sizes);if(sizes.length===1){setModelSize(sizes[0]);}}},[modelEngine,modelFormat]);useEffect(function(){setQuantization('');if(modelEngine&&modelFormat&&modelSize){var quants=_toConsumableArray(new Set(enginesObj[modelEngine].filter(function(item){return item.model_format===modelFormat&&item.model_size_in_billions===convertModelSize(modelSize);}).flatMap(function(item){return item.quantizations;})));setQuantizationOptions(quants);if(quants.length===1){setQuantization(quants[0]);}}},[modelEngine,modelFormat,modelSize]);useEffect(function(){if(parentRef.current){parentRef.current.scrollTo({top:parentRef.current.scrollHeight,behavior:'smooth'});}},[customParametersArr]);var getNGPURange=function getNGPURange(){if(gpuAvailable===0){// remain 'auto' for distributed situation\nreturn['auto','CPU'];}return['auto','CPU'].concat(range(1,gpuAvailable));};var getNewNGPURange=function getNewNGPURange(){if(gpuAvailable===0){return['CPU'];}else{return['GPU','CPU'];}};var getModelEngine=function getModelEngine(model_name){fetcher(url+\"/v1/engines/\".concat(model_name),{method:'GET',headers:{'Content-Type':'application/json'}}).then(function(response){if(!response.ok){// Assuming the server returns error details in JSON format\nresponse.json().then(function(errorData){setErrorMsg(\"Server error: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{response.json().then(function(data){setEnginesObj(data);setEngineOptions(Object.keys(data));});}setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});};var launchModel=function launchModel(url){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);var modelDataWithID_LLM={// If user does not fill model_uid, pass null (None) to server and server generates it.\nmodel_uid:modelUID.trim()===''?null:modelUID.trim(),model_name:modelData.model_name,model_type:modelType,model_engine:modelEngine,model_format:modelFormat,model_size_in_billions:convertModelSize(modelSize),quantization:quantization,n_gpu:parseInt(nGPU,10)===0||nGPU==='CPU'?null:nGPU==='auto'?'auto':parseInt(nGPU,10),replica:replica,request_limits:requestLimits.trim()===''?null:Number(requestLimits.trim()),worker_ip:workerIp.trim()===''?null:workerIp.trim(),gpu_idx:GPUIdx.trim()===''?null:handleGPUIdx(GPUIdx.trim())};var modelDataWithID_other={model_uid:modelUID.trim()===''?null:modelUID.trim(),model_name:modelData.model_name,model_type:modelType};if(modelType==='embedding'||modelType==='rerank'){modelDataWithID_other=_objectSpread(_objectSpread({},modelDataWithID_other),{},{replica:replica,n_gpu:nGpu==='GPU'?'auto':null,worker_ip:workerIp.trim()===''?null:workerIp.trim(),gpu_idx:GPUIdx.trim()===''?null:handleGPUIdx(GPUIdx.trim())});}if(nGPULayers>=0){modelDataWithID_LLM.n_gpu_layers=nGPULayers;}if(loraListArr.length||imageLoraLoadKwargsArr.length||imageLoraFuseKwargsArr.length){var peft_model_config={};if(imageLoraLoadKwargsArr.length){var image_lora_load_kwargs={};imageLoraLoadKwargsArr.forEach(function(item){image_lora_load_kwargs[item.key]=handleValueType(item.value);});peft_model_config['image_lora_load_kwargs']=image_lora_load_kwargs;}if(imageLoraFuseKwargsArr.length){var image_lora_fuse_kwargs={};imageLoraFuseKwargsArr.forEach(function(item){image_lora_fuse_kwargs[item.key]=handleValueType(item.value);});peft_model_config['image_lora_fuse_kwargs']=image_lora_fuse_kwargs;}if(loraListArr.length){var lora_list=loraListArr;lora_list.map(function(item){delete item.id;});peft_model_config['lora_list']=lora_list;}modelDataWithID_LLM['peft_model_config']=peft_model_config;}if(customParametersArr.length){customParametersArr.forEach(function(item){modelDataWithID_LLM[item.key]=handleValueType(item.value);});}var modelDataWithID=modelType==='LLM'?modelDataWithID_LLM:modelDataWithID_other;// First fetcher request to initiate the model\nfetcher(url+'/v1/models',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(modelDataWithID)}).then(function(response){if(!response.ok){// Assuming the server returns error details in JSON format\nresponse.json().then(function(errorData){setErrorMsg(\"Server error: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{navigate(\"/running_models/\".concat(modelType));sessionStorage.setItem('runningModelType',\"/running_models/\".concat(modelType));}setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});};var handleGPUIdx=function handleGPUIdx(data){var arr=[];data.split(',').forEach(function(item){arr.push(Number(item));});return arr;};var handeCustomDelete=function handeCustomDelete(e){e.stopPropagation();var subType=sessionStorage.getItem('subType').split('/');if(subType){subType[3];fetcher(url+\"/v1/model_registrations/\".concat(subType[3]==='llm'?'LLM':subType[3],\"/\").concat(modelData.model_name),{method:'DELETE',headers:{'Content-Type':'application/json'}}).then(function(){setCustomDeleted(true);}).catch(console.error);}};var judgeArr=function judgeArr(arr,keysArr){if(arr.length&&arr[arr.length-1][keysArr[0]]!==''&&arr[arr.length-1][keysArr[1]]!==''){return true;}else if(arr.length===0){return true;}else{return false;}};var handleValueType=function handleValueType(str){if(str.toLowerCase()==='none'){return null;}else if(str.toLowerCase()==='true'){return true;}else if(str.toLowerCase()==='false'){return false;}else if(Number(str)||str!==''&&Number(str)===0){return Number(str);}else{return str;}};var getLoraListArr=function getLoraListArr(arr){setLoraListArr(arr);};var getImageLoraLoadKwargsArr=function getImageLoraLoadKwargsArr(arr){setImageLoraLoadKwargsArr(arr);};var getImageLoraFuseKwargsArr=function getImageLoraFuseKwargsArr(arr){setImageLoraFuseKwargsArr(arr);};var getCustomParametersArr=function getCustomParametersArr(arr){setCustomParametersArr(arr);};// Set two different states based on mouse hover\nreturn/*#__PURE__*/_jsxs(Paper,{style:hover?styles.containerSelected:styles.container,onMouseEnter:function onMouseEnter(){return setHover(true);},onMouseLeave:function onMouseLeave(){return setHover(false);},onClick:function onClick(){if(!selected&&!customDeleted){setSelected(true);if(modelType==='LLM'){getModelEngine(modelData.model_name);}}},elevation:hover?24:4,children:[modelType==='LLM'?/*#__PURE__*/_jsxs(Box,{style:styles.descriptionCard,children:[is_custom&&/*#__PURE__*/_jsxs(Stack,{direction:\"row\",spacing:1,useFlexGap:true,children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:handeCustomDelete,disabled:customDeleted,children:/*#__PURE__*/_jsx(DeleteIcon,{})})]}),!is_custom&&/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[modelData.model_lang&&function(){return modelData.model_lang.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"},v);});}(),function(){if(modelData.model_specs&&modelData.model_specs.some(function(spec){return isCached(spec);})){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\"});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]}),modelData.model_description&&/*#__PURE__*/_jsx(\"p\",{style:styles.p,title:modelData.model_description,children:modelData.model_description}),/*#__PURE__*/_jsxs(\"div\",{style:styles.iconRow,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsxs(\"span\",{style:styles.boldIconText,children:[Math.floor(modelData.context_length/1000),\"K\"]}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"context length\"})]}),function(){if(modelData.model_ability&&modelData.model_ability.includes('chat')){return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(ChatOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"chat model\"})]});}else if(modelData.model_ability&&modelData.model_ability.includes('generate')){return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(EditNoteOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"generate model\"})]});}else{return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(HelpCenterOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"other model\"})]});}}()]})]}):/*#__PURE__*/_jsxs(Box,{style:styles.descriptionCard,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.titleContainer,children:[is_custom&&/*#__PURE__*/_jsxs(Stack,{direction:\"row\",spacing:1,useFlexGap:true,children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:handeCustomDelete,disabled:customDeleted,children:/*#__PURE__*/_jsx(DeleteIcon,{})})]}),!is_custom&&/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[function(){if(modelData.language){return modelData.language.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"});});}else if(modelData.model_family){return/*#__PURE__*/_jsx(Chip,{label:modelData.model_family,variant:\"outlined\",size:\"small\"});}}(),function(){if(modelData.cache_status){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\"});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]})]}),modelData.dimensions&&/*#__PURE__*/_jsxs(\"div\",{style:styles.iconRow,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(\"span\",{style:styles.boldIconText,children:modelData.dimensions}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"dimensions\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(\"span\",{style:styles.boldIconText,children:modelData.max_tokens}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"max tokens\"})]})]}),!selected&&hover&&/*#__PURE__*/_jsx(\"p\",{style:styles.instructionText,children:\"Click with mouse to launch the model\"})]}),/*#__PURE__*/_jsx(Drawer,{open:selected,onClose:function onClose(){setSelected(false);setHover(false);},anchor:'right',children:/*#__PURE__*/_jsxs(\"div\",{style:styles.drawerCard,children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),modelType==='LLM'?/*#__PURE__*/_jsx(Box,{ref:parentRef,style:styles.formContainer,display:\"flex\",flexDirection:\"column\",width:\"100%\",mx:\"auto\",children:/*#__PURE__*/_jsxs(Grid,{rowSpacing:0,columnSpacing:1,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelEngine-label\",children:\"Model Engine\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelEngine-label\",value:modelEngine,onChange:function onChange(e){return setModelEngine(e.target.value);},label:\"Model Engine\",children:engineOptions.map(function(engine){var arr=[];enginesObj[engine].forEach(function(item){arr.push(item.model_format);});var specs=modelData.model_specs.filter(function(spec){return arr.includes(spec.model_format);});var cached=specs.some(function(spec){return isCached(spec);});var displayedEngine=cached?engine+' (cached)':engine;return/*#__PURE__*/_jsx(MenuItem,{value:engine,children:displayedEngine},engine);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelEngine,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelFormat-label\",children:\"Model Format\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelFormat-label\",value:modelFormat,onChange:function onChange(e){return setModelFormat(e.target.value);},label:\"Model Format\",children:formatOptions.map(function(format){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===format;});var cached=specs.some(function(spec){return isCached(spec);});var displayedFormat=cached?format+' (cached)':format;return/*#__PURE__*/_jsx(MenuItem,{value:format,children:displayedFormat},format);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelSize-label\",children:\"Model Size\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelSize-label\",value:modelSize,onChange:function onChange(e){return setModelSize(e.target.value);},label:\"Model Size\",children:sizeOptions.map(function(size){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===size;});var cached=specs.some(function(spec){return isCached(spec);});var displayedSize=cached?size+' (cached)':size;return/*#__PURE__*/_jsx(MenuItem,{value:size,children:displayedSize},size);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:\"Quantization\"}),/*#__PURE__*/_jsx(Select,{labelId:\"quantization-label\",value:quantization,onChange:function onChange(e){return setQuantization(e.target.value);},label:\"Quantization\",children:quantizationOptions.map(function(quant,index){var _specs$0$cache_status,_specs$,_specs$0$cache_status2,_specs$2,_specs$2$cache_status;var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===convertModelSize(modelSize);});var cached=modelFormat==='pytorch'?(_specs$0$cache_status=(_specs$=specs[0])===null||_specs$===void 0?void 0:_specs$.cache_status)!==null&&_specs$0$cache_status!==void 0?_specs$0$cache_status:false===true:(_specs$0$cache_status2=(_specs$2=specs[0])===null||_specs$2===void 0?void 0:(_specs$2$cache_status=_specs$2.cache_status)===null||_specs$2$cache_status===void 0?void 0:_specs$2$cache_status[index])!==null&&_specs$0$cache_status2!==void 0?_specs$0$cache_status2:false===true;var displayedQuant=cached?quant+' (cached)':quant;return/*#__PURE__*/_jsx(MenuItem,{value:quant,children:displayedQuant},quant);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:modelFormat!=='ggufv2'&&modelFormat!=='ggmlv3'?/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize||!quantization,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:\"N-GPU\"}),/*#__PURE__*/_jsx(Select,{labelId:\"n-gpu-label\",value:nGPU,onChange:function onChange(e){return setNGPU(e.target.value);},label:\"N-GPU\",children:getNGPURange().map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]}):/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{disabled:!modelFormat||!modelSize||!quantization,type:\"number\",label:\"N GPU Layers\",InputProps:{inputProps:{min:-1}},value:nGPULayers,onChange:function onChange(e){return setNGPULayers(parseInt(e.target.value,10));}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{disabled:!modelFormat||!modelSize||!quantization,type:\"number\",InputProps:{inputProps:{min:1}},label:\"Replica\",value:replica,onChange:function onChange(e){return setReplica(parseInt(e.target.value,10));}})})}),/*#__PURE__*/_jsxs(ListItemButton,{onClick:function onClick(){return setIsOther(!isOther);},children:[/*#__PURE__*/_jsx(ListItemText,{primary:\"Optional Configurations\"}),isOther?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]}),/*#__PURE__*/_jsxs(Collapse,{in:isOther,timeout:\"auto\",unmountOnExit:true,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:requestLimits,label:\"(Optional) Request Limits, the number of request limits for this model\\uFF0Cdefault is None\",onChange:function onChange(e){setRequestLimitsAlert(false);setRequestLimits(e.target.value);if(e.target.value!==''&&(!Number(e.target.value)||Number(e.target.value)<1||parseInt(e.target.value)!==parseFloat(e.target.value))){setRequestLimitsAlert(true);}}}),requestLimitsAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter an integer greater than 0\"})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:workerIp,label:\"(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario\",onChange:function onChange(e){return setWorkerIp(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:GPUIdx,label:\"(Optional) GPU Idx, Specify the GPU index where the model is located\",onChange:function onChange(e){setGPUIdxAlert(false);setGPUIdx(e.target.value);var regular=/^\\d+(?:,\\d+)*$/;if(e.target.value!==''&&!regular.test(e.target.value)){setGPUIdxAlert(true);}}}),GPUIdxAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter numeric data separated by commas, for example: 0,1,2\"})]})}),/*#__PURE__*/_jsxs(ListItemButton,{onClick:function onClick(){return setIsPeftModelConfig(!isPeftModelConfig);},children:[/*#__PURE__*/_jsx(ListItemText,{primary:\"Lora Config\"}),isPeftModelConfig?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]}),/*#__PURE__*/_jsxs(Collapse,{in:isPeftModelConfig,timeout:\"auto\",unmountOnExit:true,style:{marginLeft:'30px'},children:[/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Model Config',key:'lora_name',value:'local_path'},onGetArr:getLoraListArr,onJudgeArr:judgeArr}),/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Load Kwargs for Image Model',key:'key',value:'value'},onGetArr:getImageLoraLoadKwargsArr,onJudgeArr:judgeArr}),/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Fuse Kwargs for Image Model',key:'key',value:'value'},onGetArr:getImageLoraFuseKwargsArr,onJudgeArr:judgeArr})]})]}),/*#__PURE__*/_jsx(AddPair,{customData:{title:\"Additional parameters passed to the inference engine\".concat(modelEngine?': '+modelEngine:''),key:'key',value:'value'},onGetArr:getCustomParametersArr,onJudgeArr:judgeArr})]})}):/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}}),(modelType==='embedding'||modelType==='rerank')&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{style:{marginTop:'25px'},type:\"number\",InputProps:{inputProps:{min:1}},label:\"Replica\",value:replica,onChange:function onChange(e){return setReplica(parseInt(e.target.value,10));}}),/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:\"Device\"}),/*#__PURE__*/_jsx(Select,{labelId:\"n-gpu-label\",value:nGpu,onChange:function onChange(e){return setNGpu(e.target.value);},label:\"N-GPU\",children:getNewNGPURange().map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]}),nGpu==='GPU'&&/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:GPUIdx,label:\"GPU Idx, Specify the GPU index where the model is located\",onChange:function onChange(e){setGPUIdxAlert(false);setGPUIdx(e.target.value);var regular=/^\\d+(?:,\\d+)*$/;if(e.target.value!==''&&!regular.test(e.target.value)){setGPUIdxAlert(true);}}}),GPUIdxAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter numeric data separated by commas, for example: 0,1,2\"})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:workerIp,label:\"Worker Ip, specify the worker ip where the model is located in a distributed scenario\",onChange:function onChange(e){return setWorkerIp(e.target.value);}})})]})]}),/*#__PURE__*/_jsxs(Box,{style:styles.buttonsContainer,children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch\",style:styles.buttonContainer,onClick:function onClick(){return launchModel(url,modelData);},disabled:modelType==='LLM'&&(isCallingApi||isUpdatingModel||!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))||!judgeArr(customParametersArr,['key','value'])||!judgeArr(loraListArr,['lora_name','local_path'])||!judgeArr(imageLoraLoadKwargsArr,['key','value'])||!judgeArr(imageLoraFuseKwargsArr,['key','value'])||requestLimitsAlert||GPUIdxAlert)||(modelType==='embedding'||modelType==='rerank')&&GPUIdxAlert,children:function(){if(isCallingApi||isUpdatingModel){return/*#__PURE__*/_jsx(Box,{style:_objectSpread(_objectSpread({},styles.buttonItem),{},{backgroundColor:'#f2f2f2'}),children:/*#__PURE__*/_jsx(CircularProgress,{size:\"20px\",sx:{color:'#000000'}})});}else if(!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))){return/*#__PURE__*/_jsx(Box,{style:_objectSpread(_objectSpread({},styles.buttonItem),{},{backgroundColor:'#f2f2f2'}),children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{size:\"20px\"})});}else{return/*#__PURE__*/_jsx(Box,{style:styles.buttonItem,children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{color:\"#000000\",size:\"20px\"})});}}()}),/*#__PURE__*/_jsx(\"button\",{title:\"Go Back\",style:styles.buttonContainer,onClick:function onClick(){setSelected(false);setHover(false);},children:/*#__PURE__*/_jsx(Box,{style:styles.buttonItem,children:/*#__PURE__*/_jsx(UndoOutlined,{color:\"#000000\",size:\"20px\"})})})]})]})}),/*#__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 ModelCard;","map":{"version":3,"names":["ChatOutlined","EditNoteOutlined","ExpandLess","ExpandMore","HelpCenterOutlined","RocketLaunchOutlined","UndoOutlined","DeleteIcon","Alert","Box","Chip","CircularProgress","Collapse","Drawer","FormControl","Grid","IconButton","InputLabel","ListItemButton","ListItemText","MenuItem","Select","Snackbar","Stack","TextField","Paper","React","useContext","useEffect","useRef","useState","useNavigate","ApiContext","fetcher","TitleTypography","AddPair","styles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ModelCard","_ref","url","modelData","gpuAvailable","modelType","_ref$is_custom","is_custom","_useState","_useState2","_slicedToArray","hover","setHover","_useState3","_useState4","selected","setSelected","_useState5","_useState6","requestLimitsAlert","setRequestLimitsAlert","_useState7","_useState8","GPUIdxAlert","setGPUIdxAlert","_useState9","_useState10","isOther","setIsOther","_useState11","_useState12","isPeftModelConfig","setIsPeftModelConfig","_useState13","_useState14","openSnackbar","setOpenSnackbar","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","navigate","_useState15","_useState16","modelUID","setModelUID","_useState17","_useState18","modelEngine","setModelEngine","_useState19","_useState20","modelFormat","setModelFormat","_useState21","_useState22","modelSize","setModelSize","_useState23","_useState24","quantization","setQuantization","_useState25","_useState26","nGPU","setNGPU","_useState27","_useState28","nGpu","setNGpu","_useState29","_useState30","nGPULayers","setNGPULayers","_useState31","_useState32","replica","setReplica","_useState33","_useState34","requestLimits","setRequestLimits","_useState35","_useState36","workerIp","setWorkerIp","_useState37","_useState38","GPUIdx","setGPUIdx","_useState39","_useState40","enginesObj","setEnginesObj","_useState41","_useState42","engineOptions","setEngineOptions","_useState43","_useState44","formatOptions","setFormatOptions","_useState45","_useState46","sizeOptions","setSizeOptions","_useState47","_useState48","quantizationOptions","setQuantizationOptions","_useState49","_useState50","customDeleted","setCustomDeleted","_useState51","_useState52","customParametersArr","setCustomParametersArr","_useState53","_useState54","loraListArr","setLoraListArr","_useState55","_useState56","imageLoraLoadKwargsArr","setImageLoraLoadKwargsArr","_useState57","_useState58","imageLoraFuseKwargsArr","setImageLoraFuseKwargsArr","parentRef","range","start","end","Array","fill","undefined","map","_","i","isCached","spec","model_format","cache_status","some","cs","convertModelSize","size","toString","includes","parseInt","format","_toConsumableArray","Set","item","length","sizes","filter","model_size_in_billions","quants","flatMap","quantizations","current","scrollTo","top","scrollHeight","behavior","getNGPURange","concat","getNewNGPURange","getModelEngine","model_name","method","headers","then","response","ok","json","errorData","status","detail","data","Object","keys","catch","error","console","launchModel","modelDataWithID_LLM","model_uid","trim","model_type","model_engine","n_gpu","request_limits","Number","worker_ip","gpu_idx","handleGPUIdx","modelDataWithID_other","_objectSpread","n_gpu_layers","peft_model_config","image_lora_load_kwargs","forEach","key","handleValueType","value","image_lora_fuse_kwargs","lora_list","id","modelDataWithID","body","JSON","stringify","sessionStorage","setItem","arr","split","push","handeCustomDelete","e","stopPropagation","subType","getItem","judgeArr","keysArr","str","toLowerCase","getLoraListArr","getImageLoraLoadKwargsArr","getImageLoraFuseKwargsArr","getCustomParametersArr","style","containerSelected","container","onMouseEnter","onMouseLeave","onClick","elevation","children","descriptionCard","direction","spacing","useFlexGap","disabled","flexWrap","sx","marginLeft","model_lang","v","label","variant","model_specs","model_description","p","title","iconRow","iconItem","boldIconText","Math","floor","context_length","smallText","model_ability","muiIcon","titleContainer","language","model_family","dimensions","max_tokens","instructionText","open","onClose","anchor","drawerCard","ref","formContainer","display","flexDirection","width","mx","rowSpacing","columnSpacing","xs","margin","fullWidth","labelId","onChange","target","engine","specs","cached","displayedEngine","displayedFormat","displayedSize","quant","index","_specs$0$cache_status","_specs$","_specs$0$cache_status2","_specs$2","_specs$2$cache_status","displayedQuant","type","InputProps","inputProps","min","primary","in","timeout","unmountOnExit","parseFloat","severity","regular","test","customData","onGetArr","onJudgeArr","marginTop","buttonsContainer","buttonContainer","is_builtin","buttonItem","backgroundColor","color","anchorOrigin","vertical","horizontal","message"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/modelCard.js"],"sourcesContent":["import {\n ChatOutlined,\n EditNoteOutlined,\n ExpandLess,\n ExpandMore,\n HelpCenterOutlined,\n RocketLaunchOutlined,\n UndoOutlined,\n} from '@mui/icons-material'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport {\n Alert,\n Box,\n Chip,\n CircularProgress,\n Collapse,\n Drawer,\n FormControl,\n Grid,\n IconButton,\n InputLabel,\n ListItemButton,\n ListItemText,\n MenuItem,\n Select,\n Snackbar,\n Stack,\n TextField,\n} from '@mui/material'\nimport Paper from '@mui/material/Paper'\nimport React, { useContext, useEffect, useRef, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetcher from '../../components/fetcher'\nimport TitleTypography from '../../components/titleTypography'\nimport AddPair from './components/addPair'\nimport styles from './styles/modelCardStyle'\n\nconst ModelCard = ({\n url,\n modelData,\n gpuAvailable,\n modelType,\n is_custom = false,\n}) => {\n const [hover, setHover] = useState(false)\n const [selected, setSelected] = useState(false)\n const [requestLimitsAlert, setRequestLimitsAlert] = useState(false)\n const [GPUIdxAlert, setGPUIdxAlert] = useState(false)\n const [isOther, setIsOther] = useState(false)\n const [isPeftModelConfig, setIsPeftModelConfig] = useState(false)\n const [openSnackbar, setOpenSnackbar] = useState(false)\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const navigate = useNavigate()\n\n // Model parameter selections\n const [modelUID, setModelUID] = useState('')\n const [modelEngine, setModelEngine] = useState('')\n const [modelFormat, setModelFormat] = useState('')\n const [modelSize, setModelSize] = useState('')\n const [quantization, setQuantization] = useState('')\n const [nGPU, setNGPU] = useState('auto')\n const [nGpu, setNGpu] = useState(gpuAvailable === 0 ? 'CPU' : 'GPU')\n const [nGPULayers, setNGPULayers] = useState(-1)\n const [replica, setReplica] = useState(1)\n const [requestLimits, setRequestLimits] = useState('')\n const [workerIp, setWorkerIp] = useState('')\n const [GPUIdx, setGPUIdx] = useState('')\n\n const [enginesObj, setEnginesObj] = useState({})\n const [engineOptions, setEngineOptions] = useState([])\n const [formatOptions, setFormatOptions] = useState([])\n const [sizeOptions, setSizeOptions] = useState([])\n const [quantizationOptions, setQuantizationOptions] = useState([])\n const [customDeleted, setCustomDeleted] = useState(false)\n const [customParametersArr, setCustomParametersArr] = useState([])\n const [loraListArr, setLoraListArr] = useState([])\n const [imageLoraLoadKwargsArr, setImageLoraLoadKwargsArr] = useState([])\n const [imageLoraFuseKwargsArr, setImageLoraFuseKwargsArr] = useState([])\n\n const parentRef = useRef(null)\n\n const range = (start, end) => {\n return new Array(end - start + 1).fill(undefined).map((_, i) => i + start)\n }\n\n const isCached = (spec) => {\n if (spec.model_format === 'pytorch') {\n return spec.cache_status && spec.cache_status === true\n } else {\n return spec.cache_status && spec.cache_status.some((cs) => cs)\n }\n }\n\n // model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\n const convertModelSize = (size) => {\n return size.toString().includes('_') ? size : parseInt(size, 10)\n }\n\n useEffect(() => {\n setModelFormat('')\n if (modelEngine) {\n const format = [\n ...new Set(enginesObj[modelEngine].map((item) => item.model_format)),\n ]\n setFormatOptions(format)\n if (format.length === 1) {\n setModelFormat(format[0])\n }\n }\n }, [modelEngine])\n\n useEffect(() => {\n setModelSize('')\n if (modelEngine && modelFormat) {\n const sizes = [\n ...new Set(\n enginesObj[modelEngine]\n .filter((item) => item.model_format === modelFormat)\n .map((item) => item.model_size_in_billions)\n ),\n ]\n setSizeOptions(sizes)\n if (sizes.length === 1) {\n setModelSize(sizes[0])\n }\n }\n }, [modelEngine, modelFormat])\n\n useEffect(() => {\n setQuantization('')\n if (modelEngine && modelFormat && modelSize) {\n const quants = [\n ...new Set(\n enginesObj[modelEngine]\n .filter(\n (item) =>\n item.model_format === modelFormat &&\n item.model_size_in_billions === convertModelSize(modelSize)\n )\n .flatMap((item) => item.quantizations)\n ),\n ]\n setQuantizationOptions(quants)\n if (quants.length === 1) {\n setQuantization(quants[0])\n }\n }\n }, [modelEngine, modelFormat, modelSize])\n\n useEffect(() => {\n if (parentRef.current) {\n parentRef.current.scrollTo({\n top: parentRef.current.scrollHeight,\n behavior: 'smooth',\n })\n }\n }, [customParametersArr])\n\n const getNGPURange = () => {\n if (gpuAvailable === 0) {\n // remain 'auto' for distributed situation\n return ['auto', 'CPU']\n }\n return ['auto', 'CPU'].concat(range(1, gpuAvailable))\n }\n\n const getNewNGPURange = () => {\n if (gpuAvailable === 0) {\n return ['CPU']\n } else {\n return ['GPU', 'CPU']\n }\n }\n\n const getModelEngine = (model_name) => {\n fetcher(url + `/v1/engines/${model_name}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n })\n .then((response) => {\n if (!response.ok) {\n // Assuming the server returns error details in JSON format\n response.json().then((errorData) => {\n setErrorMsg(\n `Server error: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n response.json().then((data) => {\n setEnginesObj(data)\n setEngineOptions(Object.keys(data))\n })\n }\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }\n\n const launchModel = (url) => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n\n setIsCallingApi(true)\n\n const modelDataWithID_LLM = {\n // If user does not fill model_uid, pass null (None) to server and server generates it.\n model_uid: modelUID.trim() === '' ? null : modelUID.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\n model_engine: modelEngine,\n model_format: modelFormat,\n model_size_in_billions: convertModelSize(modelSize),\n quantization: quantization,\n n_gpu:\n parseInt(nGPU, 10) === 0 || nGPU === 'CPU'\n ? null\n : nGPU === 'auto'\n ? 'auto'\n : parseInt(nGPU, 10),\n replica: replica,\n request_limits:\n requestLimits.trim() === '' ? null : Number(requestLimits.trim()),\n worker_ip: workerIp.trim() === '' ? null : workerIp.trim(),\n gpu_idx: GPUIdx.trim() === '' ? null : handleGPUIdx(GPUIdx.trim()),\n }\n\n let modelDataWithID_other = {\n model_uid: modelUID.trim() === '' ? null : modelUID.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\n }\n\n if (modelType === 'embedding' || modelType === 'rerank') {\n modelDataWithID_other = {\n ...modelDataWithID_other,\n replica: replica,\n n_gpu: nGpu === 'GPU' ? 'auto' : null,\n worker_ip: workerIp.trim() === '' ? null : workerIp.trim(),\n gpu_idx: GPUIdx.trim() === '' ? null : handleGPUIdx(GPUIdx.trim()),\n }\n }\n\n if (nGPULayers >= 0) {\n modelDataWithID_LLM.n_gpu_layers = nGPULayers\n }\n\n if (\n loraListArr.length ||\n imageLoraLoadKwargsArr.length ||\n imageLoraFuseKwargsArr.length\n ) {\n const peft_model_config = {}\n if (imageLoraLoadKwargsArr.length) {\n const image_lora_load_kwargs = {}\n imageLoraLoadKwargsArr.forEach((item) => {\n image_lora_load_kwargs[item.key] = handleValueType(item.value)\n })\n peft_model_config['image_lora_load_kwargs'] = image_lora_load_kwargs\n }\n if (imageLoraFuseKwargsArr.length) {\n const image_lora_fuse_kwargs = {}\n imageLoraFuseKwargsArr.forEach((item) => {\n image_lora_fuse_kwargs[item.key] = handleValueType(item.value)\n })\n peft_model_config['image_lora_fuse_kwargs'] = image_lora_fuse_kwargs\n }\n if (loraListArr.length) {\n const lora_list = loraListArr\n lora_list.map((item) => {\n delete item.id\n })\n peft_model_config['lora_list'] = lora_list\n }\n modelDataWithID_LLM['peft_model_config'] = peft_model_config\n }\n\n if (customParametersArr.length) {\n customParametersArr.forEach((item) => {\n modelDataWithID_LLM[item.key] = handleValueType(item.value)\n })\n }\n\n const modelDataWithID =\n modelType === 'LLM' ? modelDataWithID_LLM : modelDataWithID_other\n\n // First fetcher request to initiate the model\n fetcher(url + '/v1/models', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(modelDataWithID),\n })\n .then((response) => {\n if (!response.ok) {\n // Assuming the server returns error details in JSON format\n response.json().then((errorData) => {\n setErrorMsg(\n `Server error: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n navigate(`/running_models/${modelType}`)\n sessionStorage.setItem(\n 'runningModelType',\n `/running_models/${modelType}`\n )\n }\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }\n\n const handleGPUIdx = (data) => {\n const arr = []\n data.split(',').forEach((item) => {\n arr.push(Number(item))\n })\n return arr\n }\n\n const handeCustomDelete = (e) => {\n e.stopPropagation()\n const subType = sessionStorage.getItem('subType').split('/')\n if (subType) {\n subType[3]\n fetcher(\n url +\n `/v1/model_registrations/${\n subType[3] === 'llm' ? 'LLM' : subType[3]\n }/${modelData.model_name}`,\n {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n )\n .then(() => {\n setCustomDeleted(true)\n })\n .catch(console.error)\n }\n }\n\n const judgeArr = (arr, keysArr) => {\n if (\n arr.length &&\n arr[arr.length - 1][keysArr[0]] !== '' &&\n arr[arr.length - 1][keysArr[1]] !== ''\n ) {\n return true\n } else if (arr.length === 0) {\n return true\n } else {\n return false\n }\n }\n\n const handleValueType = (str) => {\n if (str.toLowerCase() === 'none') {\n return null\n } else if (str.toLowerCase() === 'true') {\n return true\n } else if (str.toLowerCase() === 'false') {\n return false\n } else if (Number(str) || (str !== '' && Number(str) === 0)) {\n return Number(str)\n } else {\n return str\n }\n }\n\n const getLoraListArr = (arr) => {\n setLoraListArr(arr)\n }\n\n const getImageLoraLoadKwargsArr = (arr) => {\n setImageLoraLoadKwargsArr(arr)\n }\n\n const getImageLoraFuseKwargsArr = (arr) => {\n setImageLoraFuseKwargsArr(arr)\n }\n\n const getCustomParametersArr = (arr) => {\n setCustomParametersArr(arr)\n }\n\n // Set two different states based on mouse hover\n return (\n <Paper\n style={hover ? styles.containerSelected : styles.container}\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n onClick={() => {\n if (!selected && !customDeleted) {\n setSelected(true)\n if (modelType === 'LLM') {\n getModelEngine(modelData.model_name)\n }\n }\n }}\n elevation={hover ? 24 : 4}\n >\n {modelType === 'LLM' ? (\n <Box style={styles.descriptionCard}>\n {is_custom && (\n <Stack direction=\"row\" spacing={1} useFlexGap>\n <TitleTypography value={modelData.model_name} />\n <IconButton\n aria-label=\"delete\"\n onClick={handeCustomDelete}\n disabled={customDeleted}\n >\n <DeleteIcon />\n </IconButton>\n </Stack>\n )}\n {!is_custom && <TitleTypography value={modelData.model_name} />}\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {modelData.model_lang &&\n (() => {\n return modelData.model_lang.map((v) => {\n return (\n <Chip key={v} label={v} variant=\"outlined\" size=\"small\" />\n )\n })\n })()}\n {(() => {\n if (\n modelData.model_specs &&\n modelData.model_specs.some((spec) => isCached(spec))\n ) {\n return <Chip label=\"Cached\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n </Stack>\n {modelData.model_description && (\n <p style={styles.p} title={modelData.model_description}>\n {modelData.model_description}\n </p>\n )}\n\n <div style={styles.iconRow}>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>\n {Math.floor(modelData.context_length / 1000)}K\n </span>\n <small style={styles.smallText}>context length</small>\n </div>\n {(() => {\n if (\n modelData.model_ability &&\n modelData.model_ability.includes('chat')\n ) {\n return (\n <div style={styles.iconItem}>\n <ChatOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>chat model</small>\n </div>\n )\n } else if (\n modelData.model_ability &&\n modelData.model_ability.includes('generate')\n ) {\n return (\n <div style={styles.iconItem}>\n <EditNoteOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>generate model</small>\n </div>\n )\n } else {\n return (\n <div style={styles.iconItem}>\n <HelpCenterOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>other model</small>\n </div>\n )\n }\n })()}\n </div>\n </Box>\n ) : (\n <Box style={styles.descriptionCard}>\n <div style={styles.titleContainer}>\n {is_custom && (\n <Stack direction=\"row\" spacing={1} useFlexGap>\n <TitleTypography value={modelData.model_name} />\n <IconButton\n aria-label=\"delete\"\n onClick={handeCustomDelete}\n disabled={customDeleted}\n >\n <DeleteIcon />\n </IconButton>\n </Stack>\n )}\n {!is_custom && <TitleTypography value={modelData.model_name} />}\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {(() => {\n if (modelData.language) {\n return modelData.language.map((v) => {\n return <Chip label={v} variant=\"outlined\" size=\"small\" />\n })\n } else if (modelData.model_family) {\n return (\n <Chip\n label={modelData.model_family}\n variant=\"outlined\"\n size=\"small\"\n />\n )\n }\n })()}\n {(() => {\n if (modelData.cache_status) {\n return <Chip label=\"Cached\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n )\n }\n })()}\n </Stack>\n </div>\n {modelData.dimensions && (\n <div style={styles.iconRow}>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>{modelData.dimensions}</span>\n <small style={styles.smallText}>dimensions</small>\n </div>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>{modelData.max_tokens}</span>\n <small style={styles.smallText}>max tokens</small>\n </div>\n </div>\n )}\n {!selected && hover && (\n <p style={styles.instructionText}>\n Click with mouse to launch the model\n </p>\n )}\n </Box>\n )}\n <Drawer\n open={selected}\n onClose={() => {\n setSelected(false)\n setHover(false)\n }}\n anchor={'right'}\n >\n <div style={styles.drawerCard}>\n <TitleTypography value={modelData.model_name} />\n {modelType === 'LLM' ? (\n <Box\n ref={parentRef}\n style={styles.formContainer}\n display=\"flex\"\n flexDirection=\"column\"\n width=\"100%\"\n mx=\"auto\"\n >\n <Grid rowSpacing={0} columnSpacing={1}>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"modelEngine-label\">Model Engine</InputLabel>\n <Select\n labelId=\"modelEngine-label\"\n value={modelEngine}\n onChange={(e) => setModelEngine(e.target.value)}\n label=\"Model Engine\"\n >\n {engineOptions.map((engine) => {\n const arr = []\n enginesObj[engine].forEach((item) => {\n arr.push(item.model_format)\n })\n const specs = modelData.model_specs.filter((spec) =>\n arr.includes(spec.model_format)\n )\n\n const cached = specs.some((spec) => isCached(spec))\n const displayedEngine = cached\n ? engine + ' (cached)'\n : engine\n\n return (\n <MenuItem key={engine} value={engine}>\n {displayedEngine}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelEngine}\n >\n <InputLabel id=\"modelFormat-label\">Model Format</InputLabel>\n <Select\n labelId=\"modelFormat-label\"\n value={modelFormat}\n onChange={(e) => setModelFormat(e.target.value)}\n label=\"Model Format\"\n >\n {formatOptions.map((format) => {\n const specs = modelData.model_specs.filter(\n (spec) => spec.model_format === format\n )\n\n const cached = specs.some((spec) => isCached(spec))\n const displayedFormat = cached\n ? format + ' (cached)'\n : format\n\n return (\n <MenuItem key={format} value={format}>\n {displayedFormat}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat}\n >\n <InputLabel id=\"modelSize-label\">Model Size</InputLabel>\n <Select\n labelId=\"modelSize-label\"\n value={modelSize}\n onChange={(e) => setModelSize(e.target.value)}\n label=\"Model Size\"\n >\n {sizeOptions.map((size) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) => spec.model_size_in_billions === size\n )\n const cached = specs.some((spec) => isCached(spec))\n const displayedSize = cached ? size + ' (cached)' : size\n\n return (\n <MenuItem key={size} value={size}>\n {displayedSize}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize}\n >\n <InputLabel id=\"quantization-label\">\n Quantization\n </InputLabel>\n <Select\n labelId=\"quantization-label\"\n value={quantization}\n onChange={(e) => setQuantization(e.target.value)}\n label=\"Quantization\"\n >\n {quantizationOptions.map((quant, index) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) =>\n spec.model_size_in_billions ===\n convertModelSize(modelSize)\n )\n\n const cached =\n modelFormat === 'pytorch'\n ? specs[0]?.cache_status ?? false === true\n : specs[0]?.cache_status?.[index] ?? false === true\n const displayedQuant = cached\n ? quant + ' (cached)'\n : quant\n\n return (\n <MenuItem key={quant} value={quant}>\n {displayedQuant}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n {modelFormat !== 'ggufv2' && modelFormat !== 'ggmlv3' ? (\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize || !quantization}\n >\n <InputLabel id=\"n-gpu-label\">N-GPU</InputLabel>\n <Select\n labelId=\"n-gpu-label\"\n value={nGPU}\n onChange={(e) => setNGPU(e.target.value)}\n label=\"N-GPU\"\n >\n {getNGPURange().map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n ) : (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n label=\"N GPU Layers\"\n InputProps={{\n inputProps: {\n min: -1,\n },\n }}\n value={nGPULayers}\n onChange={(e) =>\n setNGPULayers(parseInt(e.target.value, 10))\n }\n />\n </FormControl>\n )}\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label=\"Replica\"\n value={replica}\n onChange={(e) => setReplica(parseInt(e.target.value, 10))}\n />\n </FormControl>\n </Grid>\n <ListItemButton onClick={() => setIsOther(!isOther)}>\n <ListItemText primary=\"Optional Configurations\" />\n {isOther ? <ExpandLess /> : <ExpandMore />}\n </ListItemButton>\n <Collapse in={isOther} timeout=\"auto\" unmountOnExit>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={requestLimits}\n label=\"(Optional) Request Limits, the number of request limits for this model,default is None\"\n onChange={(e) => {\n setRequestLimitsAlert(false)\n setRequestLimits(e.target.value)\n if (\n e.target.value !== '' &&\n (!Number(e.target.value) ||\n Number(e.target.value) < 1 ||\n parseInt(e.target.value) !==\n parseFloat(e.target.value))\n ) {\n setRequestLimitsAlert(true)\n }\n }}\n />\n {requestLimitsAlert && (\n <Alert severity=\"error\">\n Please enter an integer greater than 0\n </Alert>\n )}\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={workerIp}\n label=\"(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario\"\n onChange={(e) => setWorkerIp(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={GPUIdx}\n label=\"(Optional) GPU Idx, Specify the GPU index where the model is located\"\n onChange={(e) => {\n setGPUIdxAlert(false)\n setGPUIdx(e.target.value)\n const regular = /^\\d+(?:,\\d+)*$/\n if (\n e.target.value !== '' &&\n !regular.test(e.target.value)\n ) {\n setGPUIdxAlert(true)\n }\n }}\n />\n {GPUIdxAlert && (\n <Alert severity=\"error\">\n Please enter numeric data separated by commas, for\n example: 0,1,2\n </Alert>\n )}\n </FormControl>\n </Grid>\n <ListItemButton\n onClick={() => setIsPeftModelConfig(!isPeftModelConfig)}\n >\n <ListItemText primary=\"Lora Config\" />\n {isPeftModelConfig ? <ExpandLess /> : <ExpandMore />}\n </ListItemButton>\n <Collapse\n in={isPeftModelConfig}\n timeout=\"auto\"\n unmountOnExit\n style={{ marginLeft: '30px' }}\n >\n <AddPair\n customData={{\n title: 'Lora Model Config',\n key: 'lora_name',\n value: 'local_path',\n }}\n onGetArr={getLoraListArr}\n onJudgeArr={judgeArr}\n />\n <AddPair\n customData={{\n title: 'Lora Load Kwargs for Image Model',\n key: 'key',\n value: 'value',\n }}\n onGetArr={getImageLoraLoadKwargsArr}\n onJudgeArr={judgeArr}\n />\n <AddPair\n customData={{\n title: 'Lora Fuse Kwargs for Image Model',\n key: 'key',\n value: 'value',\n }}\n onGetArr={getImageLoraFuseKwargsArr}\n onJudgeArr={judgeArr}\n />\n </Collapse>\n </Collapse>\n <AddPair\n customData={{\n title: `Additional parameters passed to the inference engine${\n modelEngine ? ': ' + modelEngine : ''\n }`,\n key: 'key',\n value: 'value',\n }}\n onGetArr={getCustomParametersArr}\n onJudgeArr={judgeArr}\n />\n </Grid>\n </Box>\n ) : (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n {(modelType === 'embedding' || modelType === 'rerank') && (\n <>\n <TextField\n style={{ marginTop: '25px' }}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label=\"Replica\"\n value={replica}\n onChange={(e) => setReplica(parseInt(e.target.value, 10))}\n />\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"n-gpu-label\">Device</InputLabel>\n <Select\n labelId=\"n-gpu-label\"\n value={nGpu}\n onChange={(e) => setNGpu(e.target.value)}\n label=\"N-GPU\"\n >\n {getNewNGPURange().map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n {nGpu === 'GPU' && (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={GPUIdx}\n label=\"GPU Idx, Specify the GPU index where the model is located\"\n onChange={(e) => {\n setGPUIdxAlert(false)\n setGPUIdx(e.target.value)\n const regular = /^\\d+(?:,\\d+)*$/\n if (\n e.target.value !== '' &&\n !regular.test(e.target.value)\n ) {\n setGPUIdxAlert(true)\n }\n }}\n />\n {GPUIdxAlert && (\n <Alert severity=\"error\">\n Please enter numeric data separated by commas, for\n example: 0,1,2\n </Alert>\n )}\n </FormControl>\n )}\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={workerIp}\n label=\"Worker Ip, specify the worker ip where the model is located in a distributed scenario\"\n onChange={(e) => setWorkerIp(e.target.value)}\n />\n </FormControl>\n </>\n )}\n </FormControl>\n )}\n <Box style={styles.buttonsContainer}>\n <button\n title=\"Launch\"\n style={styles.buttonContainer}\n onClick={() => launchModel(url, modelData)}\n disabled={\n (modelType === 'LLM' &&\n (isCallingApi ||\n isUpdatingModel ||\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n ) ||\n !judgeArr(customParametersArr, ['key', 'value']) ||\n !judgeArr(loraListArr, ['lora_name', 'local_path']) ||\n !judgeArr(imageLoraLoadKwargsArr, ['key', 'value']) ||\n !judgeArr(imageLoraFuseKwargsArr, ['key', 'value']) ||\n requestLimitsAlert ||\n GPUIdxAlert)) ||\n ((modelType === 'embedding' || modelType === 'rerank') &&\n GPUIdxAlert)\n }\n >\n {(() => {\n if (isCallingApi || isUpdatingModel) {\n return (\n <Box\n style={{\n ...styles.buttonItem,\n backgroundColor: '#f2f2f2',\n }}\n >\n <CircularProgress\n size=\"20px\"\n sx={{\n color: '#000000',\n }}\n />\n </Box>\n )\n } else if (\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n )\n ) {\n return (\n <Box\n style={{\n ...styles.buttonItem,\n backgroundColor: '#f2f2f2',\n }}\n >\n <RocketLaunchOutlined size=\"20px\" />\n </Box>\n )\n } else {\n return (\n <Box style={styles.buttonItem}>\n <RocketLaunchOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n )\n }\n })()}\n </button>\n <button\n title=\"Go Back\"\n style={styles.buttonContainer}\n onClick={() => {\n setSelected(false)\n setHover(false)\n }}\n >\n <Box style={styles.buttonItem}>\n <UndoOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n </button>\n </Box>\n </div>\n </Drawer>\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 </Paper>\n )\n}\n\nexport default ModelCard\n"],"mappings":"8aAAA,OACEA,YAAY,CACZC,gBAAgB,CAChBC,UAAU,CACVC,UAAU,CACVC,kBAAkB,CAClBC,oBAAoB,CACpBC,YAAY,KACP,qBAAqB,CAC5B,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OACEC,KAAK,CACLC,GAAG,CACHC,IAAI,CACJC,gBAAgB,CAChBC,QAAQ,CACRC,MAAM,CACNC,WAAW,CACXC,IAAI,CACJC,UAAU,CACVC,UAAU,CACVC,cAAc,CAC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E,CACxDxD,IAAI,CAAEhP,YAAa,CACnBiP,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAAhP,eAAe,CAAC,KAAK,CAAC,EAAC,CACtCwS,OAAO,CAAC,wDAAwD,EAC3D,KAAK,CAAG,QACd,CAAC,EACG,CAAC,CAEZ,CAAC,CAED,cAAe,CAAA5U,SAAS"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xinference
3
- Version: 0.11.0
3
+ Version: 0.11.2
4
4
  Summary: Model Serving Made Easy
5
5
  Home-page: https://github.com/xorbitsai/inference
6
6
  Author: Qin Xuye
@@ -20,7 +20,7 @@ Classifier: Topic :: Software Development :: Libraries
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
22
  Requires-Dist: xoscar >=0.3.0
23
- Requires-Dist: torch <2.3.0
23
+ Requires-Dist: torch
24
24
  Requires-Dist: gradio >=3.39.0
25
25
  Requires-Dist: typer[all] <0.12.0
26
26
  Requires-Dist: pillow
@@ -31,7 +31,7 @@ Requires-Dist: requests
31
31
  Requires-Dist: pydantic
32
32
  Requires-Dist: fastapi
33
33
  Requires-Dist: uvicorn
34
- Requires-Dist: huggingface-hub <0.23.0,>=0.19.4
34
+ Requires-Dist: huggingface-hub >=0.19.4
35
35
  Requires-Dist: typing-extensions
36
36
  Requires-Dist: fsspec <=2023.10.0,>=2023.1.0
37
37
  Requires-Dist: s3fs
@@ -50,7 +50,7 @@ Provides-Extra: all
50
50
  Requires-Dist: chatglm-cpp >=0.3.0 ; extra == 'all'
51
51
  Requires-Dist: llama-cpp-python !=0.2.58,>=0.2.25 ; extra == 'all'
52
52
  Requires-Dist: transformers >=4.34.1 ; extra == 'all'
53
- Requires-Dist: torch <2.3.0 ; extra == 'all'
53
+ Requires-Dist: torch ; extra == 'all'
54
54
  Requires-Dist: accelerate >=0.27.2 ; extra == 'all'
55
55
  Requires-Dist: sentencepiece ; extra == 'all'
56
56
  Requires-Dist: transformers-stream-generator ; extra == 'all'
@@ -70,7 +70,7 @@ Requires-Dist: torchvision ; extra == 'all'
70
70
  Requires-Dist: FlagEmbedding ; extra == 'all'
71
71
  Requires-Dist: auto-gptq ; (sys_platform != "darwin") and extra == 'all'
72
72
  Requires-Dist: autoawq ; (sys_platform != "darwin") and extra == 'all'
73
- Requires-Dist: vllm <0.4.2,>=0.2.6 ; (sys_platform == "linux") and extra == 'all'
73
+ Requires-Dist: vllm >=0.2.6 ; (sys_platform == "linux") and extra == 'all'
74
74
  Requires-Dist: sglang[all] ; (sys_platform == "linux") and extra == 'all'
75
75
  Provides-Extra: benchmark
76
76
  Requires-Dist: psutil ; extra == 'benchmark'
@@ -92,6 +92,7 @@ Requires-Dist: black ; extra == 'dev'
92
92
  Requires-Dist: openai >1 ; extra == 'dev'
93
93
  Requires-Dist: opencv-contrib-python ; extra == 'dev'
94
94
  Requires-Dist: langchain ; extra == 'dev'
95
+ Requires-Dist: langchain-community ; extra == 'dev'
95
96
  Requires-Dist: orjson ; extra == 'dev'
96
97
  Requires-Dist: sphinx-tabs ; extra == 'dev'
97
98
  Requires-Dist: sphinx-design ; extra == 'dev'
@@ -122,7 +123,7 @@ Provides-Extra: sglang
122
123
  Requires-Dist: sglang[all] ; extra == 'sglang'
123
124
  Provides-Extra: transformers
124
125
  Requires-Dist: transformers >=4.34.1 ; extra == 'transformers'
125
- Requires-Dist: torch <2.3.0 ; extra == 'transformers'
126
+ Requires-Dist: torch ; extra == 'transformers'
126
127
  Requires-Dist: accelerate >=0.27.2 ; extra == 'transformers'
127
128
  Requires-Dist: sentencepiece ; extra == 'transformers'
128
129
  Requires-Dist: transformers-stream-generator ; extra == 'transformers'
@@ -138,7 +139,7 @@ Requires-Dist: peft ; extra == 'transformers'
138
139
  Requires-Dist: auto-gptq ; (sys_platform != "darwin") and extra == 'transformers'
139
140
  Requires-Dist: autoawq ; (sys_platform != "darwin") and extra == 'transformers'
140
141
  Provides-Extra: vllm
141
- Requires-Dist: vllm <0.4.2,>=0.2.6 ; extra == 'vllm'
142
+ Requires-Dist: vllm >=0.2.6 ; extra == 'vllm'
142
143
 
143
144
  <div align="center">
144
145
  <img src="./assets/xorbits-logo.png" width="180px" alt="xorbits" />
@@ -183,9 +184,10 @@ potential of cutting-edge AI models.
183
184
  - Built-in support for [Qwen1.5 MOE](https://huggingface.co/Qwen/Qwen1.5-MoE-A2.7B-Chat): [#1263](https://github.com/xorbitsai/inference/pull/1263)
184
185
  - Built-in support for [Qwen1.5 32B](https://huggingface.co/Qwen/Qwen1.5-32B-Chat): [#1249](https://github.com/xorbitsai/inference/pull/1249)
185
186
  ### Integrations
186
- - [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.
187
187
  - [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.
188
+ - [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.
188
189
  - [Chatbox](https://chatboxai.app/): a desktop client for multiple cutting-edge LLM models, available on Windows, Mac and Linux.
190
+ - [RAGFlow](https://github.com/infiniflow/ragflow): is an open-source RAG engine based on deep document understanding.
189
191
 
190
192
 
191
193
  ## Key Features