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.
- xinference/_version.py +3 -3
- xinference/api/restful_api.py +30 -0
- xinference/client/restful/restful_client.py +29 -0
- xinference/core/cache_tracker.py +12 -1
- xinference/core/chat_interface.py +10 -4
- xinference/core/model.py +2 -2
- xinference/core/supervisor.py +30 -2
- xinference/core/utils.py +12 -0
- xinference/core/worker.py +4 -1
- xinference/deploy/cmdline.py +126 -0
- xinference/deploy/test/test_cmdline.py +24 -0
- xinference/fields.py +3 -1
- xinference/model/llm/__init__.py +2 -0
- xinference/model/llm/ggml/chatglm.py +98 -13
- xinference/model/llm/ggml/llamacpp.py +49 -2
- xinference/model/llm/llm_family.json +633 -9
- xinference/model/llm/llm_family.py +84 -10
- xinference/model/llm/llm_family_modelscope.json +337 -10
- xinference/model/llm/memory.py +332 -0
- xinference/model/llm/pytorch/chatglm.py +48 -0
- xinference/model/llm/pytorch/core.py +25 -6
- xinference/model/llm/pytorch/deepseek_vl.py +35 -9
- xinference/model/llm/pytorch/intern_vl.py +387 -0
- xinference/model/llm/pytorch/internlm2.py +32 -1
- xinference/model/llm/pytorch/qwen_vl.py +38 -11
- xinference/model/llm/pytorch/utils.py +38 -1
- xinference/model/llm/pytorch/yi_vl.py +42 -14
- xinference/model/llm/sglang/core.py +31 -9
- xinference/model/llm/utils.py +38 -5
- xinference/model/llm/vllm/core.py +87 -5
- xinference/model/rerank/core.py +23 -1
- xinference/model/utils.py +17 -7
- xinference/thirdparty/deepseek_vl/models/processing_vlm.py +1 -1
- xinference/thirdparty/deepseek_vl/models/siglip_vit.py +2 -2
- xinference/thirdparty/llava/mm_utils.py +3 -2
- xinference/thirdparty/llava/model/llava_arch.py +1 -1
- xinference/thirdparty/omnilmm/chat.py +6 -5
- xinference/types.py +10 -1
- xinference/web/ui/build/asset-manifest.json +3 -3
- xinference/web/ui/build/index.html +1 -1
- xinference/web/ui/build/static/js/{main.8e44da4b.js → main.551aa479.js} +3 -3
- xinference/web/ui/build/static/js/main.551aa479.js.map +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/1fa824d82b2af519de7700c594e50bde4bbca60d13bd3fabff576802e4070304.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/23caf6f1e52c43e983ca3bfd4189f41dbd645fa78f2dfdcd7f6b69bc41678665.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/a6da6bc3d0d2191adebee87fb58ecebe82d071087bd2f7f3a9c7fdd2ada130f2.json +1 -0
- {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/METADATA +10 -8
- {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/RECORD +52 -50
- xinference/web/ui/build/static/js/main.8e44da4b.js.map +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/1870cd6f7054d04e049e363c0a85526584fe25519378609d2838e28d7492bbf1.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/5393569d846332075b93b55656716a34f50e0a8c970be789502d7e6c49755fd7.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/ddaec68b88e5eff792df1e39a4b4b8b737bfc832293c015660c3c69334e3cf5c.json +0 -1
- /xinference/web/ui/build/static/js/{main.8e44da4b.js.LICENSE.txt → main.551aa479.js.LICENSE.txt} +0 -0
- {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/LICENSE +0 -0
- {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/WHEEL +0 -0
- {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/entry_points.txt +0 -0
- {xinference-0.11.0.dist-info → xinference-0.11.2.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
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;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},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","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 }) => {\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 />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchModelCom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,GAAG,CAAEnE,QAAS,CACdoE,SAAS,CAAEF,oBAAqB,CAChCnE,SAAS,CAAEA,SAAU,EAHhBmE,oBAAoB,CAAC5C,UAI3B,CAAC,EACH,CAAC,CACD,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAAzB,oBAAoB"},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,Tab}from'@mui/material';import React,{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'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'rerank'})}),/*#__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 modelType={'embedding'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/rerank\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'rerank'} />\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,KAAA,yBAEzD,GAAM,CAAAC,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAA,CAAS,CACxB,GAAI,CAAAC,QAAQ,CAAGhB,UAAU,CAACK,UAAU,CAAC,CAACW,QAAQ,CAC9C,IAAAC,eAAA,CAA0BlB,KAAK,CAACG,QAAQ,CACtCgB,cAAc,CAACC,OAAO,CAAC,WAAW,CAAC,CAC/BD,cAAc,CAACC,OAAO,CAAC,WAAW,CAAC,CACnC,mBACN,CAAC,CAAAC,gBAAA,CAAAC,cAAA,CAAAJ,eAAA,IAJMK,KAAK,CAAAF,g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AE,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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
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\";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(-1),_useState28=_slicedToArray(_useState27,2),nGPULayers=_useState28[0],setNGPULayers=_useState28[1];var _useState29=useState(1),_useState30=_slicedToArray(_useState29,2),replica=_useState30[0],setReplica=_useState30[1];var _useState31=useState(''),_useState32=_slicedToArray(_useState31,2),requestLimits=_useState32[0],setRequestLimits=_useState32[1];var _useState33=useState(''),_useState34=_slicedToArray(_useState33,2),workerIp=_useState34[0],setWorkerIp=_useState34[1];var _useState35=useState(''),_useState36=_slicedToArray(_useState35,2),GPUIdx=_useState36[0],setGPUIdx=_useState36[1];var _useState37=useState({}),_useState38=_slicedToArray(_useState37,2),enginesObj=_useState38[0],setEnginesObj=_useState38[1];var _useState39=useState([]),_useState40=_slicedToArray(_useState39,2),engineOptions=_useState40[0],setEngineOptions=_useState40[1];var _useState41=useState([]),_useState42=_slicedToArray(_useState41,2),formatOptions=_useState42[0],setFormatOptions=_useState42[1];var _useState43=useState([]),_useState44=_slicedToArray(_useState43,2),sizeOptions=_useState44[0],setSizeOptions=_useState44[1];var _useState45=useState([]),_useState46=_slicedToArray(_useState45,2),quantizationOptions=_useState46[0],setQuantizationOptions=_useState46[1];var _useState47=useState(false),_useState48=_slicedToArray(_useState47,2),customDeleted=_useState48[0],setCustomDeleted=_useState48[1];var _useState49=useState([]),_useState50=_slicedToArray(_useState49,2),customParametersArr=_useState50[0],setCustomParametersArr=_useState50[1];var _useState51=useState([]),_useState52=_slicedToArray(_useState51,2),loraListArr=_useState52[0],setLoraListArr=_useState52[1];var _useState53=useState([]),_useState54=_slicedToArray(_useState53,2),imageLoraLoadKwargsArr=_useState54[0],setImageLoraLoadKwargsArr=_useState54[1];var _useState55=useState([]),_useState56=_slicedToArray(_useState55,2),imageLoraFuseKwargsArr=_useState56[0],setImageLoraFuseKwargsArr=_useState56[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 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(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:modelType==='embedding'||modelType==='rerank'?_objectSpread(_objectSpread({},modelDataWithID_other),{},{replica:replica}):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__*/_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(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),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","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","nGPULayers","setNGPULayers","_useState29","_useState30","replica","setReplica","_useState31","_useState32","requestLimits","setRequestLimits","_useState33","_useState34","workerIp","setWorkerIp","_useState35","_useState36","GPUIdx","setGPUIdx","_useState37","_useState38","enginesObj","setEnginesObj","_useState39","_useState40","engineOptions","setEngineOptions","_useState41","_useState42","formatOptions","setFormatOptions","_useState43","_useState44","sizeOptions","setSizeOptions","_useState45","_useState46","quantizationOptions","setQuantizationOptions","_useState47","_useState48","customDeleted","setCustomDeleted","_useState49","_useState50","customParametersArr","setCustomParametersArr","_useState51","_useState52","loraListArr","setLoraListArr","_useState53","_useState54","imageLoraLoadKwargsArr","setImageLoraLoadKwargsArr","_useState55","_useState56","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","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","n_gpu_layers","peft_model_config","image_lora_load_kwargs","forEach","key","handleValueType","value","image_lora_fuse_kwargs","lora_list","id","modelDataWithID","_objectSpread","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 [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 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 const modelDataWithID_other = {\n model_uid: modelUID.trim() === '' ? null : modelUID.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\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'\n ? modelDataWithID_LLM\n : modelType === 'embedding' || modelType === 'rerank'\n ? { ...modelDataWithID_other, replica }\n : 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 <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 )}\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 }\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,CACdC,YAAY,CACZC,QAAQ,CACRC,MAAM,CACNC,QAAQ,CACRC,KAAK,CACLC,SAAS,KACJ,eAAe,CACtB,MAAO,CAAAC,KAAK,KAAM,qBAAqB,CACvC,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,MAAM,CAAEC,QAAQ,KAAQ,OAAO,CACtE,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,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A,CAACjC,oBAAoB,EAACuW,KAAK,CAAC,SAAS,CAACjL,IAAI,CAAC,MAAM,CAAE,CAAC,CACjD,CAAC,CAEV,CACF,CAAC,CAAE,CAAC,CACE,CAAC,cACTrJ,IAAA,WACEiQ,KAAK,CAAC,SAAS,CACfvB,KAAK,CAAE5O,MAAM,CAACoU,eAAgB,CAC9BnF,OAAO,CAAE,SAAAA,QAAA,CAAM,CACb5N,WAAW,CAAC,KAAK,CAAC,CAClBJ,QAAQ,CAAC,KAAK,CAAC,CACjB,CAAE,CAAAkO,QAAA,cAEFjP,IAAA,CAAC7B,GAAG,EAACuQ,KAAK,CAAE5O,MAAM,CAACsU,UAAW,CAAAnF,QAAA,cAC5BjP,IAAA,CAAChC,YAAY,EAACsW,KAAK,CAAC,SAAS,CAACjL,IAAI,CAAC,MAAM,CAAE,CAAC,CACzC,CAAC,CACA,CAAC,EACN,CAAC,EACH,CAAC,CACA,CAAC,cACTrJ,IAAA,CAAChB,QAAQ,EACPuV,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDxD,IAAI,CAAE3O,YAAa,CACnB4O,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAA3O,eAAe,CAAC,KAAK,CAAC,EAAC,CACtCmS,OAAO,CAAC,wDAAwD,EAC3D,KAAK,CAAG,QACd,CAAC,EACG,CAAC,CAEZ,CAAC,CAED,cAAe,CAAAvU,SAAS"},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
/xinference/web/ui/build/static/js/{main.8e44da4b.js.LICENSE.txt → main.551aa479.js.LICENSE.txt}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|