xinference 1.6.0.post1__py3-none-any.whl → 1.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xinference might be problematic. Click here for more details.

Files changed (124) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +79 -2
  3. xinference/client/restful/restful_client.py +65 -3
  4. xinference/conftest.py +0 -7
  5. xinference/core/media_interface.py +132 -8
  6. xinference/core/model.py +44 -6
  7. xinference/core/scheduler.py +1 -10
  8. xinference/core/supervisor.py +8 -17
  9. xinference/core/worker.py +5 -27
  10. xinference/deploy/cmdline.py +6 -2
  11. xinference/model/audio/chattts.py +24 -39
  12. xinference/model/audio/cosyvoice.py +18 -30
  13. xinference/model/audio/funasr.py +42 -0
  14. xinference/model/audio/model_spec.json +71 -1
  15. xinference/model/audio/model_spec_modelscope.json +76 -2
  16. xinference/model/audio/utils.py +75 -0
  17. xinference/model/core.py +1 -0
  18. xinference/model/embedding/__init__.py +74 -18
  19. xinference/model/embedding/core.py +98 -589
  20. xinference/model/embedding/embed_family.py +133 -0
  21. xinference/{thirdparty/omnilmm/train → model/embedding/flag}/__init__.py +1 -1
  22. xinference/model/embedding/flag/core.py +282 -0
  23. xinference/model/embedding/model_spec.json +24 -0
  24. xinference/model/embedding/model_spec_modelscope.json +24 -0
  25. xinference/model/embedding/sentence_transformers/__init__.py +13 -0
  26. xinference/model/embedding/sentence_transformers/core.py +399 -0
  27. xinference/model/embedding/vllm/core.py +95 -0
  28. xinference/model/image/model_spec.json +30 -3
  29. xinference/model/image/model_spec_modelscope.json +41 -2
  30. xinference/model/image/stable_diffusion/core.py +144 -53
  31. xinference/model/llm/__init__.py +6 -54
  32. xinference/model/llm/core.py +19 -5
  33. xinference/model/llm/llama_cpp/core.py +59 -3
  34. xinference/model/llm/llama_cpp/memory.py +457 -0
  35. xinference/model/llm/llm_family.json +247 -402
  36. xinference/model/llm/llm_family.py +88 -16
  37. xinference/model/llm/llm_family_modelscope.json +260 -421
  38. xinference/model/llm/llm_family_openmind_hub.json +0 -34
  39. xinference/model/llm/sglang/core.py +8 -0
  40. xinference/model/llm/transformers/__init__.py +27 -6
  41. xinference/model/llm/transformers/chatglm.py +4 -2
  42. xinference/model/llm/transformers/core.py +49 -28
  43. xinference/model/llm/transformers/deepseek_v2.py +6 -49
  44. xinference/model/llm/transformers/gemma3.py +119 -164
  45. xinference/model/llm/transformers/multimodal/__init__.py +13 -0
  46. xinference/model/llm/transformers/{cogagent.py → multimodal/cogagent.py} +58 -95
  47. xinference/model/llm/transformers/multimodal/core.py +205 -0
  48. xinference/model/llm/transformers/{deepseek_vl2.py → multimodal/deepseek_vl2.py} +59 -120
  49. xinference/model/llm/transformers/multimodal/gemma3.py +117 -0
  50. xinference/model/llm/transformers/{glm4v.py → multimodal/glm4v.py} +57 -93
  51. xinference/model/llm/transformers/multimodal/intern_vl.py +412 -0
  52. xinference/model/llm/transformers/{minicpmv26.py → multimodal/minicpmv26.py} +55 -102
  53. xinference/model/llm/transformers/{ovis2.py → multimodal/ovis2.py} +114 -175
  54. xinference/model/llm/transformers/{qwen-omni.py → multimodal/qwen-omni.py} +82 -167
  55. xinference/model/llm/transformers/multimodal/qwen2_audio.py +131 -0
  56. xinference/model/llm/transformers/{qwen2_vl.py → multimodal/qwen2_vl.py} +224 -256
  57. xinference/model/llm/transformers/opt.py +4 -2
  58. xinference/model/llm/transformers/utils.py +6 -37
  59. xinference/model/llm/utils.py +11 -0
  60. xinference/model/llm/vllm/core.py +7 -0
  61. xinference/model/rerank/core.py +91 -3
  62. xinference/model/rerank/model_spec.json +24 -0
  63. xinference/model/rerank/model_spec_modelscope.json +24 -0
  64. xinference/model/rerank/utils.py +20 -2
  65. xinference/model/utils.py +38 -1
  66. xinference/model/video/diffusers.py +65 -3
  67. xinference/model/video/model_spec.json +31 -4
  68. xinference/model/video/model_spec_modelscope.json +32 -4
  69. xinference/web/ui/build/asset-manifest.json +6 -6
  70. xinference/web/ui/build/index.html +1 -1
  71. xinference/web/ui/build/static/css/main.013f296b.css +2 -0
  72. xinference/web/ui/build/static/css/main.013f296b.css.map +1 -0
  73. xinference/web/ui/build/static/js/main.8a9e3ba0.js +3 -0
  74. xinference/web/ui/build/static/js/main.8a9e3ba0.js.map +1 -0
  75. xinference/web/ui/node_modules/.cache/babel-loader/34cfbfb7836e136ba3261cfd411cc554bf99ba24b35dcceebeaa4f008cb3c9dc.json +1 -0
  76. xinference/web/ui/node_modules/.cache/babel-loader/55b9fb40b57fa926e8f05f31c2f96467e76e5ad62f033dca97c03f9e8c4eb4fe.json +1 -0
  77. xinference/web/ui/node_modules/.cache/babel-loader/567e49df411efb24425d289bb484758cb57067ca54f8b5c67fe4505f698deb96.json +1 -0
  78. xinference/web/ui/node_modules/.cache/babel-loader/6595880facebca7ceace6f17cf21c3a5a9219a2f52fb0ba9f3cf1131eddbcf6b.json +1 -0
  79. xinference/web/ui/node_modules/.cache/babel-loader/aa998bc2d9c11853add6b8a2e08f50327f56d8824ccaaec92d6dde1b305f0d85.json +1 -0
  80. xinference/web/ui/node_modules/.cache/babel-loader/c748246b1d7bcebc16153be69f37e955bb2145526c47dd425aeeff70d3004dbc.json +1 -0
  81. xinference/web/ui/node_modules/.cache/babel-loader/e31234e95d60a5a7883fbcd70de2475dc1c88c90705df1a530abb68f86f80a51.json +1 -0
  82. xinference/web/ui/src/locales/en.json +21 -8
  83. xinference/web/ui/src/locales/ja.json +224 -0
  84. xinference/web/ui/src/locales/ko.json +224 -0
  85. xinference/web/ui/src/locales/zh.json +21 -8
  86. {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/METADATA +14 -11
  87. {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/RECORD +93 -100
  88. {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/WHEEL +1 -1
  89. xinference/model/llm/transformers/cogvlm2.py +0 -442
  90. xinference/model/llm/transformers/cogvlm2_video.py +0 -333
  91. xinference/model/llm/transformers/deepseek_vl.py +0 -280
  92. xinference/model/llm/transformers/glm_edge_v.py +0 -213
  93. xinference/model/llm/transformers/intern_vl.py +0 -526
  94. xinference/model/llm/transformers/internlm2.py +0 -94
  95. xinference/model/llm/transformers/minicpmv25.py +0 -193
  96. xinference/model/llm/transformers/omnilmm.py +0 -132
  97. xinference/model/llm/transformers/qwen2_audio.py +0 -179
  98. xinference/model/llm/transformers/qwen_vl.py +0 -360
  99. xinference/thirdparty/omnilmm/LICENSE +0 -201
  100. xinference/thirdparty/omnilmm/chat.py +0 -218
  101. xinference/thirdparty/omnilmm/constants.py +0 -4
  102. xinference/thirdparty/omnilmm/conversation.py +0 -332
  103. xinference/thirdparty/omnilmm/model/__init__.py +0 -1
  104. xinference/thirdparty/omnilmm/model/omnilmm.py +0 -595
  105. xinference/thirdparty/omnilmm/model/resampler.py +0 -166
  106. xinference/thirdparty/omnilmm/model/utils.py +0 -578
  107. xinference/thirdparty/omnilmm/train/train_utils.py +0 -150
  108. xinference/thirdparty/omnilmm/utils.py +0 -134
  109. xinference/web/ui/build/static/css/main.337afe76.css +0 -2
  110. xinference/web/ui/build/static/css/main.337afe76.css.map +0 -1
  111. xinference/web/ui/build/static/js/main.ae579a97.js +0 -3
  112. xinference/web/ui/build/static/js/main.ae579a97.js.map +0 -1
  113. xinference/web/ui/node_modules/.cache/babel-loader/12e02ee790dbf57ead09a241a93bb5f893393aa36628ca741d44390e836a103f.json +0 -1
  114. xinference/web/ui/node_modules/.cache/babel-loader/2fdc61dcb6a9d1fbcb44be592d0e87d8c3f21297a7327559ef5345665f8343f7.json +0 -1
  115. xinference/web/ui/node_modules/.cache/babel-loader/3d596a3e8dd6430d7ce81d164e32c31f8d47cfa5f725c328a298754d78563e14.json +0 -1
  116. xinference/web/ui/node_modules/.cache/babel-loader/5c08e2cd07809ed3e41486b16652253404cbb63a3ff8d0366ee50f57e2413cea.json +0 -1
  117. xinference/web/ui/node_modules/.cache/babel-loader/8472e58a31720892d534f3febda31f746b25ec4aa60787eef34217b074e67965.json +0 -1
  118. xinference/web/ui/node_modules/.cache/babel-loader/dc249829767b8abcbc3677e0b07b6d3ecbfdfe6d08cfe23a665eb33373a9aa9d.json +0 -1
  119. xinference/web/ui/node_modules/.cache/babel-loader/f91af913d7f91c410719ab13136aaed3aaf0f8dda06652f25c42cb5231587398.json +0 -1
  120. /xinference/{thirdparty/omnilmm → model/embedding/vllm}/__init__.py +0 -0
  121. /xinference/web/ui/build/static/js/{main.ae579a97.js.LICENSE.txt → main.8a9e3ba0.js.LICENSE.txt} +0 -0
  122. {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/entry_points.txt +0 -0
  123. {xinference-1.6.0.post1.dist-info → xinference-1.7.0.dist-info}/licenses/LICENSE +0 -0
  124. {xinference-1.6.0.post1.dist-info → xinference-1.7.0.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 _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'./styles/modelCardStyle.css';import{ChatOutlined,Close,ContentPasteGo,Delete,EditNote,EditNoteOutlined,ExpandLess,ExpandMore,Grade,HelpCenterOutlined,HelpOutline,RocketLaunchOutlined,StarBorder,StopCircle,UndoOutlined}from'@mui/icons-material';import{Alert,Backdrop,Box,Button,Chip,CircularProgress,Collapse,FormControl,FormControlLabel,Grid,IconButton,InputLabel,ListItemButton,ListItemText,MenuItem,Paper,Select,Snackbar,Stack,Switch,Table,TableBody,TableCell,TableContainer,TableHead,TablePagination,TableRow,TextField,Tooltip}from'@mui/material';import{useTheme}from'@mui/material';import{styled}from'@mui/material/styles';import React,{useContext,useEffect,useRef,useState}from'react';import{useTranslation}from'react-i18next';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import CopyComponent from'../../components/copyComponent/copyComponent';import DeleteDialog from'../../components/deleteDialog';import fetchWrapper from'../../components/fetchWrapper';import TitleTypography from'../../components/titleTypography';import AddPair from'./components/addPair';import CopyToCommandLine from'./components/copyComponent';import Drawer from'./components/drawer';import PasteDialog from'./components/pasteDialog';import Progress from'./components/progress';import{additionalParameterTipList,llmAllDataKey,quantizationParametersTipList}from'./data/data';import{jsx as _jsx}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var csghubArr=['qwen2-instruct'];var enginesWithNWorker=['SGLang','vLLM'];var ModelCard=function ModelCard(_ref){var _JSON$parse,_JSON$parse2,_modelData$model_abil4,_modelData$model_abil5;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,onHandleCompleteDelete=_ref.onHandleCompleteDelete,onHandlecustomDelete=_ref.onHandlecustomDelete,onGetCollectionArr=_ref.onGetCollectionArr;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,setSuccessMsg=_useContext3.setSuccessMsg;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(1),_useState26=_slicedToArray(_useState25,2),nWorker=_useState26[0],setNWorker=_useState26[1];var _useState27=useState('auto'),_useState28=_slicedToArray(_useState27,2),nGPU=_useState28[0],setNGPU=_useState28[1];var _useState29=useState(gpuAvailable===0?'CPU':'GPU'),_useState30=_slicedToArray(_useState29,2),nGpu=_useState30[0],setNGpu=_useState30[1];var _useState31=useState(-1),_useState32=_slicedToArray(_useState31,2),nGPULayers=_useState32[0],setNGPULayers=_useState32[1];var _useState33=useState(1),_useState34=_slicedToArray(_useState33,2),replica=_useState34[0],setReplica=_useState34[1];var _useState35=useState(''),_useState36=_slicedToArray(_useState35,2),requestLimits=_useState36[0],setRequestLimits=_useState36[1];var _useState37=useState(''),_useState38=_slicedToArray(_useState37,2),workerIp=_useState38[0],setWorkerIp=_useState38[1];var _useState39=useState(''),_useState40=_slicedToArray(_useState39,2),GPUIdx=_useState40[0],setGPUIdx=_useState40[1];var _useState41=useState(''),_useState42=_slicedToArray(_useState41,2),downloadHub=_useState42[0],setDownloadHub=_useState42[1];var _useState43=useState(''),_useState44=_slicedToArray(_useState43,2),modelPath=_useState44[0],setModelPath=_useState44[1];var _useState45=useState(true),_useState46=_slicedToArray(_useState45,2),enableThinking=_useState46[0],setEnableThinking=_useState46[1];var _useState47=useState(false),_useState48=_slicedToArray(_useState47,2),reasoningContent=_useState48[0],setReasoningContent=_useState48[1];var _useState49=useState(''),_useState50=_slicedToArray(_useState49,2),ggufQuantizations=_useState50[0],setGgufQuantizations=_useState50[1];var _useState51=useState(''),_useState52=_slicedToArray(_useState51,2),ggufModelPath=_useState52[0],setGgufModelPath=_useState52[1];var _useState53=useState(false),_useState54=_slicedToArray(_useState53,2),cpuOffload=_useState54[0],setCpuOffload=_useState54[1];var _useState55=useState({}),_useState56=_slicedToArray(_useState55,2),enginesObj=_useState56[0],setEnginesObj=_useState56[1];var _useState57=useState([]),_useState58=_slicedToArray(_useState57,2),engineOptions=_useState58[0],setEngineOptions=_useState58[1];var _useState59=useState([]),_useState60=_slicedToArray(_useState59,2),formatOptions=_useState60[0],setFormatOptions=_useState60[1];var _useState61=useState([]),_useState62=_slicedToArray(_useState61,2),sizeOptions=_useState62[0],setSizeOptions=_useState62[1];var _useState63=useState([]),_useState64=_slicedToArray(_useState63,2),quantizationOptions=_useState64[0],setQuantizationOptions=_useState64[1];var _useState65=useState(false),_useState66=_slicedToArray(_useState65,2),customDeleted=_useState66[0],setCustomDeleted=_useState66[1];var _useState67=useState([]),_useState68=_slicedToArray(_useState67,2),customParametersArr=_useState68[0],setCustomParametersArr=_useState68[1];var _useState69=useState([]),_useState70=_slicedToArray(_useState69,2),quantizationParametersArr=_useState70[0],setQuantizationParametersArr=_useState70[1];var _useState71=useState([]),_useState72=_slicedToArray(_useState71,2),loraListArr=_useState72[0],setLoraListArr=_useState72[1];var _useState73=useState([]),_useState74=_slicedToArray(_useState73,2),imageLoraLoadKwargsArr=_useState74[0],setImageLoraLoadKwargsArr=_useState74[1];var _useState75=useState([]),_useState76=_slicedToArray(_useState75,2),imageLoraFuseKwargsArr=_useState76[0],setImageLoraFuseKwargsArr=_useState76[1];var _useState77=useState(false),_useState78=_slicedToArray(_useState77,2),isOpenCachedList=_useState78[0],setIsOpenCachedList=_useState78[1];var _useState79=useState(false),_useState80=_slicedToArray(_useState79,2),isDeleteCached=_useState80[0],setIsDeleteCached=_useState80[1];var _useState81=useState([]),_useState82=_slicedToArray(_useState81,2),cachedListArr=_useState82[0],setCachedListArr=_useState82[1];var _useState83=useState(''),_useState84=_slicedToArray(_useState83,2),cachedModelVersion=_useState84[0],setCachedModelVersion=_useState84[1];var _useState85=useState(''),_useState86=_slicedToArray(_useState85,2),cachedRealPath=_useState86[0],setCachedRealPath=_useState86[1];var _useState87=useState(0),_useState88=_slicedToArray(_useState87,2),page=_useState88[0],setPage=_useState88[1];var _useState89=useState(false),_useState90=_slicedToArray(_useState89,2),isDeleteCustomModel=_useState90[0],setIsDeleteCustomModel=_useState90[1];var _useState91=useState(false),_useState92=_slicedToArray(_useState91,2),isJsonShow=_useState92[0],setIsJsonShow=_useState92[1];var _useState93=useState(false),_useState94=_slicedToArray(_useState93,2),isHistory=_useState94[0],setIsHistory=_useState94[1];var _useState95=useState([]),_useState96=_slicedToArray(_useState95,2),customArr=_useState96[0],setCustomArr=_useState96[1];var _useState97=useState([]),_useState98=_slicedToArray(_useState97,2),quantizationConfigArr=_useState98[0],setQuantizationConfigArr=_useState98[1];var _useState99=useState([]),_useState100=_slicedToArray(_useState99,2),loraArr=_useState100[0],setLoraArr=_useState100[1];var _useState101=useState([]),_useState102=_slicedToArray(_useState101,2),imageLoraLoadArr=_useState102[0],setImageLoraLoadArr=_useState102[1];var _useState103=useState([]),_useState104=_slicedToArray(_useState103,2),imageLoraFuseArr=_useState104[0],setImageLoraFuseArr=_useState104[1];var _useState105=useState(0),_useState106=_slicedToArray(_useState105,2),customParametersArrLength=_useState106[0],setCustomParametersArrLength=_useState106[1];var _useState107=useState(false),_useState108=_slicedToArray(_useState107,2),isOpenPasteDialog=_useState108[0],setIsOpenPasteDialog=_useState108[1];var _useState109=useState(false),_useState110=_slicedToArray(_useState109,2),isShowProgress=_useState110[0],setIsShowProgress=_useState110[1];var _useState111=useState(0),_useState112=_slicedToArray(_useState111,2),progress=_useState112[0],setProgress=_useState112[1];var _useState113=useState(false),_useState114=_slicedToArray(_useState113,2),isShowCancel=_useState114[0],setIsShowCancel=_useState114[1];var _useState115=useState(false),_useState116=_slicedToArray(_useState115,2),isLoading=_useState116[0],setIsLoading=_useState116[1];var parentRef=useRef(null);var intervalRef=useRef(null);var _useTranslation=useTranslation(),t=_useTranslation.t;var theme=useTheme();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(Array.isArray(spec.cache_status)){return spec.cache_status.some(function(cs){return cs;});}else{return spec.cache_status===true;}};// 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(){var keyArr=[];for(var key in enginesObj){keyArr.push(key);}var data=handleGetHistory();if(keyArr.length&&data.model_name){handleLlmHistory(data);}},[enginesObj]);useEffect(function(){if(modelEngine){var format=_toConsumableArray(new Set(enginesObj[modelEngine].map(function(item){return item.model_format;})));setFormatOptions(format);if(!format.includes(modelFormat)){setModelFormat('');}if(format.length===1){setModelFormat(format[0]);}}},[modelEngine]);useEffect(function(){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(sizeOptions.length&&JSON.stringify(sizes)!==JSON.stringify(sizeOptions)){setModelSize('');}if(sizes.length===1){setModelSize(sizes[0]);}}},[modelEngine,modelFormat]);useEffect(function(){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.includes(quantization)){setQuantization('');}if(quants.length===1){setQuantization(quants[0]);}}},[modelEngine,modelFormat,modelSize]);useEffect(function(){setCustomParametersArrLength(customParametersArr.length);if(parentRef.current&&customParametersArr.length>customParametersArrLength){parentRef.current.scrollTo({top:parentRef.current.scrollHeight,behavior:'smooth'});}},[customParametersArr]);var getNGPURange=function getNGPURange(){if(gpuAvailable>0){return['auto','CPU'].concat(range(1,gpuAvailable));}return['auto','CPU'];};var getNewNGPURange=function getNewNGPURange(){if(gpuAvailable===0){return['CPU'];}else{return['GPU','CPU'];}};var getModelEngine=function getModelEngine(model_name){fetchWrapper.get(\"/v1/engines/\".concat(model_name)).then(function(data){setEnginesObj(data);setEngineOptions(Object.keys(data));setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403){setErrorMsg(error.message);}setIsCallingApi(false);});};var fetchProgress=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var res;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return fetchWrapper.get(\"/v1/models/\".concat(modelData.model_name,\"/progress\"));case 3:res=_context.sent;if(res.progress!==1.0)setProgress(Number(res.progress));_context.next=11;break;case 7:_context.prev=7;_context.t0=_context[\"catch\"](0);stopPolling();setIsCallingApi(false);case 11:case\"end\":return _context.stop();}},_callee,null,[[0,7]]);}));return function fetchProgress(){return _ref2.apply(this,arguments);};}();var startPolling=function startPolling(){if(intervalRef.current)return;intervalRef.current=setInterval(fetchProgress,500);};var stopPolling=function stopPolling(){if(intervalRef.current!==null){clearInterval(intervalRef.current);intervalRef.current=null;}};var handleModelData=function handleModelData(){var _String,_String2,_modelData$model_abil,_modelData$model_abil2,_modelData$model_abil3;var modelDataWithID_LLM={// If user does not fill model_uid, pass null (None) to server and server generates it.\nmodel_uid:(modelUID===null||modelUID===void 0?void 0:modelUID.trim())===''?null:modelUID===null||modelUID===void 0?void 0: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:((_String=String(requestLimits))===null||_String===void 0?void 0:_String.trim())===''?null:Number((_String2=String(requestLimits))===null||_String2===void 0?void 0:_String2.trim()),n_worker:nWorker,worker_ip:(workerIp===null||workerIp===void 0?void 0:workerIp.trim())===''?null:workerIp===null||workerIp===void 0?void 0:workerIp.trim(),gpu_idx:(GPUIdx===null||GPUIdx===void 0?void 0:GPUIdx.trim())===''?null:handleGPUIdx(GPUIdx===null||GPUIdx===void 0?void 0:GPUIdx.trim()),download_hub:downloadHub===''?null:downloadHub,model_path:(modelPath===null||modelPath===void 0?void 0:modelPath.trim())===''?null:modelPath===null||modelPath===void 0?void 0:modelPath.trim()};var modelDataWithID_other={model_uid:(modelUID===null||modelUID===void 0?void 0:modelUID.trim())===''?null:modelUID===null||modelUID===void 0?void 0:modelUID.trim(),model_name:modelData.model_name,model_type:modelType,replica:replica,n_gpu:nGpu==='GPU'?'auto':null,worker_ip:(workerIp===null||workerIp===void 0?void 0:workerIp.trim())===''?null:workerIp===null||workerIp===void 0?void 0:workerIp.trim(),gpu_idx:(GPUIdx===null||GPUIdx===void 0?void 0:GPUIdx.trim())===''?null:handleGPUIdx(GPUIdx===null||GPUIdx===void 0?void 0:GPUIdx.trim()),download_hub:downloadHub===''?null:downloadHub,model_path:(modelPath===null||modelPath===void 0?void 0:modelPath.trim())===''?null:modelPath===null||modelPath===void 0?void 0:modelPath.trim()};if(nGPULayers>=0)modelDataWithID_LLM.n_gpu_layers=nGPULayers;if((_modelData$model_abil=modelData.model_ability)!==null&&_modelData$model_abil!==void 0&&_modelData$model_abil.includes('hybrid'))modelDataWithID_LLM.enable_thinking=enableThinking;if((_modelData$model_abil2=modelData.model_ability)!==null&&_modelData$model_abil2!==void 0&&_modelData$model_abil2.includes('reasoning')&&(!((_modelData$model_abil3=modelData.model_ability)!==null&&_modelData$model_abil3!==void 0&&_modelData$model_abil3.includes('hybrid'))||enableThinking))modelDataWithID_LLM.reasoning_content=reasoningContent;if(ggufQuantizations)modelDataWithID_other.gguf_quantization=ggufQuantizations;if(ggufModelPath)modelDataWithID_other.gguf_model_path=ggufModelPath;if(['image','video'].includes(modelType))modelDataWithID_other.cpu_offload=cpuOffload;var modelDataWithID=modelType==='LLM'?modelDataWithID_LLM:modelDataWithID_other;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['peft_model_config']=peft_model_config;}if(customParametersArr.length){customParametersArr.forEach(function(item){modelDataWithID[item.key]=handleValueType(item.value);});}if(quantizationParametersArr.length){var quantizationConfig={};quantizationParametersArr.forEach(function(item){quantizationConfig[item.key]=handleValueType(item.value);});modelDataWithID['quantization_config']=quantizationConfig;}return modelDataWithID;};var launchModel=function launchModel(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);setProgress(0);setIsShowProgress(true);setIsShowCancel(true);try{var modelDataWithID=handleModelData();// First fetcher request to initiate the model\nfetchWrapper.post('/v1/models',modelDataWithID).then(function(){navigate(\"/running_models/\".concat(modelType));sessionStorage.setItem('runningModelType',\"/running_models/\".concat(modelType));var historyArr=JSON.parse(localStorage.getItem('historyArr'))||[];var historyModelNameArr=historyArr.map(function(item){return item.model_name;});if(historyModelNameArr.includes(modelDataWithID.model_name)){historyArr=historyArr.map(function(item){if(item.model_name===modelDataWithID.model_name){return modelDataWithID;}return item;});}else{historyArr.push(modelDataWithID);}localStorage.setItem('historyArr',JSON.stringify(historyArr));}).catch(function(error){var _error$response,_error$response2;console.error('Error:',error);if(((_error$response=error.response)===null||_error$response===void 0?void 0:_error$response.status)===499){setSuccessMsg(t('launchModel.cancelledSuccessfully'));}else if(((_error$response2=error.response)===null||_error$response2===void 0?void 0:_error$response2.status)!==403){setErrorMsg(error.message);}}).finally(function(){setIsCallingApi(false);stopPolling();setIsShowProgress(false);setIsShowCancel(false);setIsLoading(false);});startPolling();}catch(error){setErrorMsg(\"\".concat(error));setIsCallingApi(false);}};var cancelModel=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return fetchWrapper.post(\"/v1/models/\".concat(modelData.model_name,\"/cancel\"));case 3:setIsLoading(true);_context2.next=9;break;case 6:_context2.prev=6;_context2.t0=_context2[\"catch\"](0);console.log('err',_context2.t0);case 9:_context2.prev=9;stopPolling();setIsShowProgress(false);setIsShowCancel(false);return _context2.finish(9);case 14:case\"end\":return _context2.stop();}},_callee2,null,[[0,6,9,14]]);}));return function cancelModel(){return _ref3.apply(this,arguments);};}();var handleGPUIdx=function handleGPUIdx(data){var arr=[];data===null||data===void 0?void 0: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];fetchWrapper.delete(\"/v1/model_registrations/\".concat(subType[3]==='llm'?'LLM':subType[3],\"/\").concat(modelData.model_name)).then(function(){setCustomDeleted(true);onHandlecustomDelete(modelData.model_name);setIsDeleteCustomModel(false);}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});}};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){str=String(str);if(str.toLowerCase()==='none'){return null;}else if(str.toLowerCase()==='true'){return true;}else if(str.toLowerCase()==='false'){return false;}else if(str.includes(',')){return str.split(',');}else if(str.includes(',')){return str.split(',');}else if(Number(str)||str!==''&&Number(str)===0){return Number(str);}else{return str;}};var StyledTableRow=styled(TableRow)(function(_ref4){var theme=_ref4.theme;return{'&:nth-of-type(odd)':{backgroundColor:theme.palette.action.hover}};});var emptyRows=page>=0?Math.max(0,(1+page)*5-cachedListArr.length):0;var handleChangePage=function handleChangePage(_,newPage){setPage(newPage);};var handleOpenCachedList=function handleOpenCachedList(){setIsOpenCachedList(true);getCachedList();document.body.style.overflow='hidden';};var handleCloseCachedList=function handleCloseCachedList(){document.body.style.overflow='auto';setHover(false);setIsOpenCachedList(false);if(cachedListArr.length===0){onHandleCompleteDelete(modelData.model_name);}};var getCachedList=function getCachedList(){fetchWrapper.get(\"/v1/cache/models?model_name=\".concat(modelData.model_name)).then(function(data){return setCachedListArr(data.list);}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});};var handleOpenDeleteCachedDialog=function handleOpenDeleteCachedDialog(real_path,model_version){setCachedRealPath(real_path);setCachedModelVersion(model_version);setIsDeleteCached(true);};var handleDeleteCached=function handleDeleteCached(){fetchWrapper.delete(\"/v1/cache/models?model_version=\".concat(cachedModelVersion)).then(function(){var cachedArr=cachedListArr.filter(function(item){return item.real_path!==cachedRealPath;});setCachedListArr(cachedArr);setIsDeleteCached(false);if(cachedArr.length){if((page+1)*5>=cachedListArr.length&&cachedArr.length%5===0){setPage(cachedArr.length/5-1);}}}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});};var handleJsonDataPresentation=function handleJsonDataPresentation(){var arr=sessionStorage.getItem('subType').split('/');sessionStorage.setItem('registerModelType',\"/register_model/\".concat(arr[arr.length-1]));sessionStorage.setItem('customJsonData',JSON.stringify(modelData));navigate(\"/register_model/\".concat(arr[arr.length-1],\"/\").concat(modelData.model_name));};var handleGetHistory=function handleGetHistory(){var historyArr=JSON.parse(localStorage.getItem('historyArr'))||[];return historyArr.find(function(item){return item.model_name===modelData.model_name;})||{};};var handleLlmHistory=function handleLlmHistory(data){var _peft_model_config$lo;var model_engine=data.model_engine,model_format=data.model_format,model_size_in_billions=data.model_size_in_billions,quantization=data.quantization,n_worker=data.n_worker,n_gpu=data.n_gpu,n_gpu_layers=data.n_gpu_layers,replica=data.replica,model_uid=data.model_uid,request_limits=data.request_limits,worker_ip=data.worker_ip,gpu_idx=data.gpu_idx,download_hub=data.download_hub,model_path=data.model_path,enable_thinking=data.enable_thinking,reasoning_content=data.reasoning_content,peft_model_config=data.peft_model_config,quantization_config=data.quantization_config;if(!engineOptions.includes(model_engine)){setModelEngine('');}else{setModelEngine(model_engine||'');}setModelFormat(model_format||'');setModelSize(String(model_size_in_billions)||'');setQuantization(quantization||'');setNWorker(Number(n_worker)||1);setNGPU(n_gpu||'auto');if(n_gpu_layers>=0){setNGPULayers(n_gpu_layers);}else{setNGPULayers(-1);}setReplica(Number(replica)||1);setModelUID(model_uid||'');setRequestLimits(request_limits||'');setWorkerIp(worker_ip||'');setGPUIdx((gpu_idx===null||gpu_idx===void 0?void 0:gpu_idx.join(','))||'');setDownloadHub(download_hub||'');setModelPath(model_path||'');setEnableThinking(enable_thinking!==false);setReasoningContent(reasoning_content||false);var loraData=[];peft_model_config===null||peft_model_config===void 0?void 0:(_peft_model_config$lo=peft_model_config.lora_list)===null||_peft_model_config$lo===void 0?void 0:_peft_model_config$lo.forEach(function(item){loraData.push({lora_name:item.lora_name,local_path:item.local_path});});setLoraArr(loraData);var customData=[];for(var key in data){!llmAllDataKey.includes(key)&&customData.push({key:key,value:data[key]===null?'none':data[key]===false?false:data[key]});}setCustomArr(customData);var quantizationConfigData=[];for(var _key in quantization_config){quantizationConfigData.push({key:_key,value:quantization_config[_key]===null?'none':quantization_config[_key]===false?false:quantization_config[_key]});}setQuantizationConfigArr(quantizationConfigData);if(model_uid||request_limits||worker_ip||gpu_idx!==null&&gpu_idx!==void 0&&gpu_idx.join(',')||download_hub||model_path||reasoning_content)setIsOther(true);if(loraData.length){setIsOther(true);setIsPeftModelConfig(true);}};var handleOtherHistory=function handleOtherHistory(data){var model_uid=data.model_uid,replica=data.replica,n_gpu=data.n_gpu,gpu_idx=data.gpu_idx,worker_ip=data.worker_ip,download_hub=data.download_hub,model_path=data.model_path,gguf_quantization=data.gguf_quantization,gguf_model_path=data.gguf_model_path,cpu_offload=data.cpu_offload,model_type=data.model_type,peft_model_config=data.peft_model_config;setModelUID(model_uid||'');setReplica(replica||1);setNGpu(n_gpu==='auto'?'GPU':'CPU');setGPUIdx((gpu_idx===null||gpu_idx===void 0?void 0:gpu_idx.join(','))||'');setWorkerIp(worker_ip||'');setDownloadHub(download_hub||'');setModelPath(model_path||'');setGgufQuantizations(gguf_quantization||'');setGgufModelPath(gguf_model_path||'');setCpuOffload(cpu_offload||false);if(model_type==='image'){var _peft_model_config$lo2;var loraData=[];peft_model_config===null||peft_model_config===void 0?void 0:(_peft_model_config$lo2=peft_model_config.lora_list)===null||_peft_model_config$lo2===void 0?void 0:_peft_model_config$lo2.forEach(function(item){loraData.push({lora_name:item.lora_name,local_path:item.local_path});});setLoraArr(loraData);var ImageLoraLoadData=[];for(var key in peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_load_kwargs){ImageLoraLoadData.push({key:key,value:(peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_load_kwargs[key])||'none'});}setImageLoraLoadArr(ImageLoraLoadData);var ImageLoraFuseData=[];for(var _key2 in peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_fuse_kwargs){ImageLoraFuseData.push({key:_key2,value:(peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_fuse_kwargs[_key2])||'none'});}setImageLoraFuseArr(ImageLoraFuseData);if(loraData.length||ImageLoraLoadData.length||ImageLoraFuseData.length){setIsPeftModelConfig(true);}}var customData=[];for(var _key3 in data){!llmAllDataKey.includes(_key3)&&customData.push({key:_key3,value:data[_key3]||'none'});}setCustomArr(customData);};var handleCollection=function handleCollection(bool){setHover(false);var collectionArr=JSON.parse(localStorage.getItem('collectionArr'))||[];if(bool){collectionArr.push(modelData.model_name);}else{collectionArr=collectionArr.filter(function(item){return item!==modelData.model_name;});}localStorage.setItem('collectionArr',JSON.stringify(collectionArr));onGetCollectionArr(collectionArr);};var handleDeleteChip=function handleDeleteChip(){var arr=JSON.parse(localStorage.getItem('historyArr'));var newArr=arr.filter(function(item){return item.model_name!==modelData.model_name;});localStorage.setItem('historyArr',JSON.stringify(newArr));setIsHistory(false);if(modelType==='LLM'){setModelEngine('');setModelFormat('');setModelSize('');setQuantization('');setNWorker(1);setNGPU('auto');setReplica(1);setModelUID('');setRequestLimits('');setWorkerIp('');setGPUIdx('');setDownloadHub('');setModelPath('');setEnableThinking(true);setReasoningContent(false);setLoraArr([]);setCustomArr([]);setQuantizationConfigArr([]);setIsOther(false);setIsPeftModelConfig(false);}else{setModelUID('');setReplica(1);setNGpu(gpuAvailable===0?'CPU':'GPU');setGPUIdx('');setWorkerIp('');setDownloadHub('');setModelPath('');setGgufQuantizations('');setGgufModelPath('');setCpuOffload(false);setLoraArr([]);setImageLoraLoadArr([]);setImageLoraFuseArr([]);setCustomArr([]);setIsPeftModelConfig(false);}};var normalizeLanguage=function normalizeLanguage(language){if(Array.isArray(language)){return language.map(function(lang){return lang.toLowerCase();});}else if(typeof language==='string'){return[language.toLowerCase()];}else{return[];}};var handleCommandLine=function handleCommandLine(data){if(data.model_name===modelData.model_name){if(data.model_type==='LLM'){handleLlmHistory(data);}else{handleOtherHistory(data);}}else{setErrorMsg(t('launchModel.commandLineTip'));}};var isModelStartable=function isModelStartable(){return!(modelType==='LLM'&&(isCallingApi||isUpdatingModel||!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))||!judgeArr(loraListArr,['lora_name','local_path'])||!judgeArr(imageLoraLoadKwargsArr,['key','value'])||!judgeArr(imageLoraFuseKwargsArr,['key','value'])||requestLimitsAlert||GPUIdxAlert)&&!isShowCancel||(modelType==='embedding'||modelType==='rerank')&&GPUIdxAlert||!judgeArr(customParametersArr,['key','value'])||!judgeArr(quantizationParametersArr,['key','value']));};var renderButtonContent=function renderButtonContent(){if(isShowCancel){return/*#__PURE__*/_jsx(StopCircle,{sx:{fontSize:26}});}if(isLoading){return/*#__PURE__*/_jsx(CircularProgress,{size:26});}return/*#__PURE__*/_jsx(RocketLaunchOutlined,{sx:{fontSize:26}});};var showAbilityParameter=function showAbilityParameter(){if(!modelData.model_ability)return;if(Array.isArray(modelData.model_ability)){return modelData.model_ability.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,size:\"small\",onClick:function onClick(e){e.stopPropagation();}},v);});}else{return/*#__PURE__*/_jsx(Chip,{label:modelData.model_ability,size:\"small\",onClick:function onClick(e){e.stopPropagation();}});}};// Set two different states based on mouse hover\nreturn/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Paper,{id:modelData.model_name,className:\"container\",onMouseEnter:function onMouseEnter(){return setHover(true);},onMouseLeave:function onMouseLeave(){return setHover(false);},onClick:function onClick(){if(!selected&&!customDeleted){var data=handleGetHistory();if(data!==null&&data!==void 0&&data.model_name)setIsHistory(true);setSelected(true);if(modelType==='LLM'){getModelEngine(modelData.model_name);}else if(data!==null&&data!==void 0&&data.model_name){handleOtherHistory(data);}}},elevation:hover?24:4,children:modelType==='LLM'?/*#__PURE__*/_jsxs(Box,{className:\"descriptionCard\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(\"div\",{className:\"iconButtonBox\",children:is_custom?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.edit'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"show\",onClick:function onClick(e){e.stopPropagation();setIsJsonShow(true);},children:/*#__PURE__*/_jsx(EditNote,{})})}),/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.delete'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(e){e.stopPropagation();setIsDeleteCustomModel(true);},children:/*#__PURE__*/_jsx(Delete,{})})})]}):/*#__PURE__*/_jsx(_Fragment,{children:(_JSON$parse=JSON.parse(localStorage.getItem('collectionArr')))!==null&&_JSON$parse!==void 0&&_JSON$parse.includes(modelData.model_name)?/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.unfavorite'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"collection\",onClick:function onClick(e){e.stopPropagation();handleCollection(false);},children:/*#__PURE__*/_jsx(Grade,{style:{color:'rgb(255, 206, 0)'}})})}):/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.favorite'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"cancellation-of-collections\",onClick:function onClick(e){e.stopPropagation();handleCollection(true);},children:/*#__PURE__*/_jsx(StarBorder,{})})})})})]}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[showAbilityParameter(),modelData.model_lang&&function(){return modelData.model_lang.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\",onClick:function onClick(e){e.stopPropagation();}},v);});}(),function(){if(modelData.model_specs&&modelData.model_specs.some(function(spec){return isCached(spec);})){return/*#__PURE__*/_jsx(Chip,{label:t('launchModel.manageCachedModels'),variant:\"outlined\",color:\"primary\",size:\"small\",deleteIcon:/*#__PURE__*/_jsx(EditNote,{}),onDelete:handleOpenCachedList,onClick:function onClick(e){e.stopPropagation();handleOpenCachedList();}});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]}),modelData.model_description&&/*#__PURE__*/_jsx(\"p\",{className:\"p\",title:modelData.model_description,children:modelData.model_description}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconRow\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsxs(\"span\",{className:\"boldIconText\",children:[Math.floor(modelData.context_length/1000),\"K\"]}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:t('launchModel.contextLength')})]}),function(){if(modelData.model_ability&&modelData.model_ability.includes('chat')){return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(ChatOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:t('launchModel.chatModel')})]});}else if(modelData.model_ability&&modelData.model_ability.includes('generate')){return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(EditNoteOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:t('launchModel.generateModel')})]});}else{return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(HelpCenterOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:t('launchModel.otherModel')})]});}}()]})]}):/*#__PURE__*/_jsxs(Box,{className:\"descriptionCard\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"titleContainer\",children:[is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconButtonBox\",children:[/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.edit'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"show\",onClick:function onClick(e){e.stopPropagation();setIsJsonShow(true);},children:/*#__PURE__*/_jsx(EditNote,{})})}),/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.delete'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(e){e.stopPropagation();setIsDeleteCustomModel(true);},disabled:customDeleted,children:/*#__PURE__*/_jsx(Delete,{})})})]})]}),!is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(\"div\",{className:\"iconButtonBox\",children:(_JSON$parse2=JSON.parse(localStorage.getItem('collectionArr')))!==null&&_JSON$parse2!==void 0&&_JSON$parse2.includes(modelData.model_name)?/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.unfavorite'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"collection\",onClick:function onClick(e){e.stopPropagation();handleCollection(false);},children:/*#__PURE__*/_jsx(Grade,{style:{color:'rgb(255, 206, 0)'}})})}):/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.favorite'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"cancellation-of-collections\",onClick:function onClick(e){e.stopPropagation();handleCollection(true);},children:/*#__PURE__*/_jsx(StarBorder,{})})})})]}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[showAbilityParameter(),function(){if(modelData.language){return normalizeLanguage(modelData.language).map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\",onClick:function onClick(e){e.stopPropagation();}},v);});}else if(modelData.model_family){return/*#__PURE__*/_jsx(Chip,{label:modelData.model_family,variant:\"outlined\",size:\"small\",onClick:function onClick(e){e.stopPropagation();}});}}(),function(){if(modelData.cache_status){return/*#__PURE__*/_jsx(Chip,{label:t('launchModel.manageCachedModels'),variant:\"outlined\",color:\"primary\",size:\"small\",deleteIcon:/*#__PURE__*/_jsx(EditNote,{}),onDelete:handleOpenCachedList,onClick:function onClick(e){e.stopPropagation();handleOpenCachedList();}});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]}),modelData.model_description&&/*#__PURE__*/_jsx(\"p\",{className:\"p\",title:modelData.model_description,children:modelData.model_description})]}),modelData.dimensions&&/*#__PURE__*/_jsxs(\"div\",{className:\"iconRow\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"boldIconText\",children:modelData.dimensions}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:t('launchModel.dimensions')})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"boldIconText\",children:modelData.max_tokens}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:t('launchModel.maxTokens')})]})]}),!selected&&hover&&/*#__PURE__*/_jsx(\"p\",{className:\"instructionText\",children:t('launchModel.clickToLaunchModel')})]})}),/*#__PURE__*/_jsx(DeleteDialog,{text:t('launchModel.confirmDeleteCustomModel'),isDelete:isDeleteCustomModel,onHandleIsDelete:function onHandleIsDelete(){return setIsDeleteCustomModel(false);},onHandleDelete:handeCustomDelete}),/*#__PURE__*/_jsx(Drawer,{isOpen:selected,onClose:function onClose(){setSelected(false);setHover(false);},children:/*#__PURE__*/_jsxs(\"div\",{className:\"drawerCard\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',justifyContent:'space-between'},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),isHistory&&/*#__PURE__*/_jsx(Chip,{label:t('launchModel.lastConfig'),variant:\"outlined\",size:\"small\",color:\"primary\",onDelete:handleDeleteChip})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.commandLineParsing'),placement:\"top\",children:/*#__PURE__*/_jsx(ContentPasteGo,{className:\"pasteText\",onClick:function onClick(){return setIsOpenPasteDialog(true);}})}),isModelStartable()&&/*#__PURE__*/_jsx(CopyToCommandLine,{style:{fontSize:'30px'},modelData:selected&&handleModelData(),predefinedKeys:llmAllDataKey,getData:handleModelData})]})]}),modelType==='LLM'?/*#__PURE__*/_jsx(Box,{ref:parentRef,className:\"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:t('launchModel.modelEngine')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"modelEngine-label\",value:modelEngine,onChange:function onChange(e){return setModelEngine(e.target.value);},label:t('launchModel.modelEngine'),children:engineOptions.map(function(engine){var subArr=[];enginesObj[engine].forEach(function(item){subArr.push(item.model_format);});var arr=_toConsumableArray(new Set(subArr));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+' '+t('launchModel.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:t('launchModel.modelFormat')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"modelFormat-label\",value:modelFormat,onChange:function onChange(e){return setModelFormat(e.target.value);},label:t('launchModel.modelFormat'),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+' '+t('launchModel.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:t('launchModel.modelSize')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"modelSize-label\",value:modelSize,onChange:function onChange(e){return setModelSize(e.target.value);},label:t('launchModel.modelSize'),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+' '+t('launchModel.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:t('launchModel.quantization')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"quantization-label\",value:quantization,onChange:function onChange(e){return setQuantization(e.target.value);},label:t('launchModel.quantization'),children:quantizationOptions.map(function(quant){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 spec=specs.find(function(s){return s.quantizations.includes(quant);});var cached=Array.isArray(spec===null||spec===void 0?void 0:spec.cache_status)?spec===null||spec===void 0?void 0:spec.cache_status[spec===null||spec===void 0?void 0:spec.quantizations.indexOf(quant)]:spec===null||spec===void 0?void 0:spec.cache_status;var displayedQuant=cached?quant+' '+t('launchModel.cached'):quant;return/*#__PURE__*/_jsx(MenuItem,{value:quant,children:displayedQuant},quant);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize||!quantization,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:t(enginesWithNWorker.includes(modelEngine)?'launchModel.nGPUPerWorker':'launchModel.nGPU')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"n-gpu-label\",value:nGPU,onChange:function onChange(e){return setNGPU(e.target.value);},label:t(enginesWithNWorker.includes(modelEngine)?'launchModel.nGPUPerWorker':'launchModel.nGPU'),children:getNGPURange().map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:(modelFormat==='ggufv2'||modelFormat==='ggmlv3')&&/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",disabled:!modelFormat||!modelSize||!quantization,type:\"number\",label:t('launchModel.nGpuLayers'),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,{className:\"textHighlight\",disabled:!modelFormat||!modelSize||!quantization,type:\"number\",InputProps:{inputProps:{min:1}},label:t('launchModel.replica'),value:replica,onChange:function onChange(e){return setReplica(parseInt(e.target.value,10));}})})}),((_modelData$model_abil4=modelData.model_ability)===null||_modelData$model_abil4===void 0?void 0:_modelData$model_abil4.includes('hybrid'))&&/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(FormControlLabel,{label:t('launchModel.enableThinking'),labelPlacement:\"start\",control:/*#__PURE__*/_jsx(Switch,{checked:enableThinking}),onChange:function onChange(e){setEnableThinking(e.target.checked);}})})})}),((_modelData$model_abil5=modelData.model_ability)===null||_modelData$model_abil5===void 0?void 0:_modelData$model_abil5.includes('reasoning'))&&enableThinking&&/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(FormControlLabel,{label:t('launchModel.parsingReasoningContent'),labelPlacement:\"start\",control:/*#__PURE__*/_jsx(Switch,{checked:reasoningContent}),onChange:function onChange(e){setReasoningContent(e.target.checked);}})})})}),/*#__PURE__*/_jsx(ListItemButton,{onClick:function onClick(){return setIsOther(!isOther);},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(ListItemText,{primary:t('launchModel.optionalConfigurations'),style:{marginRight:10}}),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,{className:\"textHighlight\",variant:\"outlined\",value:modelUID,label:t('launchModel.modelUID.optional'),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,{className:\"textHighlight\",value:requestLimits,label:t('launchModel.requestLimits.optional'),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:t('launchModel.enterIntegerGreaterThanZero')})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:enginesWithNWorker.includes(modelEngine)&&/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",type:\"number\",InputProps:{inputProps:{min:1}},label:t('launchModel.workerCount.optional'),value:nWorker,onChange:function onChange(e){return setNWorker(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,{className:\"textHighlight\",variant:\"outlined\",value:workerIp,label:t('launchModel.workerIp.optional'),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,{className:\"textHighlight\",value:GPUIdx,label:t('launchModel.GPUIdx.optional'),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:t('launchModel.enterCommaSeparatedNumbers')})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:t('launchModel.downloadHub.optional')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"download_hub-label\",value:downloadHub,onChange:function onChange(e){e.target.value==='none'?setDownloadHub(''):setDownloadHub(e.target.value);},label:t('launchModel.downloadHub.optional'),children:(csghubArr.includes(modelData.model_name)?['none','huggingface','modelscope','openmind_hub','csghub']:['none','huggingface','modelscope','openmind_hub']).map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:item},item);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",variant:\"outlined\",value:modelPath,label:t('launchModel.modelPath.optional'),onChange:function onChange(e){return setModelPath(e.target.value);}})})}),/*#__PURE__*/_jsx(ListItemButton,{onClick:function onClick(){return setIsPeftModelConfig(!isPeftModelConfig);},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(ListItemText,{primary:t('launchModel.loraConfig'),style:{marginRight:10}}),isPeftModelConfig?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]})}),/*#__PURE__*/_jsx(Collapse,{in:isPeftModelConfig,timeout:\"auto\",unmountOnExit:true,style:{marginLeft:'30px'},children:/*#__PURE__*/_jsx(AddPair,{customData:{title:t('launchModel.loraModelConfig'),key:'lora_name',value:'local_path'},onGetArr:function onGetArr(arr){setLoraListArr(arr);},onJudgeArr:judgeArr,pairData:loraArr})})]}),modelEngine==='Transformers'&&/*#__PURE__*/_jsx(AddPair,{customData:{title:t('launchModel.additionalQuantizationParametersForInferenceEngine'),key:'key',value:'value'},onGetArr:function onGetArr(arr){setQuantizationParametersArr(arr);},onJudgeArr:judgeArr,pairData:quantizationConfigArr,tipOptions:quantizationParametersTipList}),/*#__PURE__*/_jsx(AddPair,{customData:{title:\"\".concat(t('launchModel.additionalParametersForInferenceEngine')).concat(modelEngine?': '+modelEngine:''),key:'key',value:'value'},onGetArr:function onGetArr(arr){setCustomParametersArr(arr);},onJudgeArr:judgeArr,pairData:customArr,tipOptions:additionalParameterTipList[modelEngine===null||modelEngine===void 0?void 0:modelEngine.toLocaleLowerCase()]})]})}):/*#__PURE__*/_jsx(Box,{ref:parentRef,className:\"formContainer\",display:\"flex\",flexDirection:\"column\",width:\"100%\",mx:\"auto\",children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",variant:\"outlined\",value:modelUID,label:t('launchModel.modelUID.optional'),onChange:function onChange(e){return setModelUID(e.target.value);}}),/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",style:{marginTop:'25px'},type:\"number\",InputProps:{inputProps:{min:1}},label:t('launchModel.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:t('launchModel.device')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"n-gpu-label\",value:nGpu,onChange:function onChange(e){return setNGpu(e.target.value);},label:t('launchModel.nGPU'),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,{className:\"textHighlight\",value:GPUIdx,label:t('launchModel.GPUIdx'),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:t('launchModel.enterCommaSeparatedNumbers')})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",variant:\"outlined\",value:workerIp,label:t('launchModel.workerIp'),onChange:function onChange(e){return setWorkerIp(e.target.value);}})}),/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:t('launchModel.downloadHub.optional')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"download_hub-label\",value:downloadHub,onChange:function onChange(e){e.target.value==='none'?setDownloadHub(''):setDownloadHub(e.target.value);},label:t('launchModel.downloadHub.optional'),children:['none','huggingface','modelscope','openmind_hub'].map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:item},item);})})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",variant:\"outlined\",value:modelPath,label:t('launchModel.modelPath.optional'),onChange:function onChange(e){return setModelPath(e.target.value);}})}),modelData.gguf_quantizations&&/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:t('launchModel.GGUFQuantization.optional')}),/*#__PURE__*/_jsx(Select,{className:\"textHighlight\",labelId:\"gguf_quantizations-label\",value:ggufQuantizations,onChange:function onChange(e){e.target.value==='none'?setGgufQuantizations(''):setGgufQuantizations(e.target.value);},label:t('launchModel.GGUFQuantization.optional'),children:['none'].concat(_toConsumableArray(modelData.gguf_quantizations)).map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:item},item);})})]}),modelData.gguf_quantizations&&/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{className:\"textHighlight\",variant:\"outlined\",value:ggufModelPath,label:t('launchModel.GGUFModelPath.optional'),onChange:function onChange(e){return setGgufModelPath(e.target.value);}})}),['image','video'].includes(modelType)&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{marginBlock:'10px'},children:/*#__PURE__*/_jsx(FormControlLabel,{label:/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"span\",{children:t('launchModel.CPUOffload')}),/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.CPUOffload.tip'),placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{children:/*#__PURE__*/_jsx(HelpOutline,{})})})]}),labelPlacement:\"start\",control:/*#__PURE__*/_jsx(Switch,{checked:cpuOffload}),onChange:function onChange(e){setCpuOffload(e.target.checked);}})}),/*#__PURE__*/_jsx(ListItemButton,{onClick:function onClick(){return setIsPeftModelConfig(!isPeftModelConfig);},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(ListItemText,{primary:t('launchModel.loraConfig'),style:{marginRight:10}}),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:t('launchModel.loraModelConfig'),key:'lora_name',value:'local_path'},onGetArr:function onGetArr(arr){setLoraListArr(arr);},onJudgeArr:judgeArr,pairData:loraArr}),/*#__PURE__*/_jsx(AddPair,{customData:{title:t('launchModel.loraLoadKwargsForImageModel'),key:'key',value:'value'},onGetArr:function onGetArr(arr){setImageLoraLoadKwargsArr(arr);},onJudgeArr:judgeArr,pairData:imageLoraLoadArr}),/*#__PURE__*/_jsx(AddPair,{customData:{title:t('launchModel.loraFuseKwargsForImageModel'),key:'key',value:'value'},onGetArr:function onGetArr(arr){setImageLoraFuseKwargsArr(arr);},onJudgeArr:judgeArr,pairData:imageLoraFuseArr})]})]}),/*#__PURE__*/_jsx(AddPair,{customData:{title:t('launchModel.additionalParametersForInferenceEngine'),key:'key',value:'value'},onGetArr:function onGetArr(arr){setCustomParametersArr(arr);},onJudgeArr:judgeArr,pairData:customArr})]})}),/*#__PURE__*/_jsxs(Box,{className:\"buttonsContainer\",children:[isShowProgress&&/*#__PURE__*/_jsx(Progress,{progress:progress}),/*#__PURE__*/_jsxs(\"div\",{className:\"buttons\",children:[/*#__PURE__*/_jsx(Button,{variant:\"outlined\",title:t(isShowCancel?'launchModel.cancel':'launchModel.launch'),style:{flex:1},disabled:!isModelStartable()||isLoading,onClick:function onClick(){if(isShowCancel){cancelModel();}else{launchModel(url,modelData);}},children:renderButtonContent()}),/*#__PURE__*/_jsx(Button,{variant:\"outlined\",title:t('launchModel.goBack'),style:{flex:1},onClick:function onClick(){setSelected(false);setHover(false);},children:/*#__PURE__*/_jsx(UndoOutlined,{sx:{fontSize:26}})})]})]})]})}),/*#__PURE__*/_jsx(Backdrop,{sx:{color:'#fff',zIndex:function zIndex(theme){return theme.zIndex.drawer+1;}},open:isJsonShow,children:/*#__PURE__*/_jsxs(\"div\",{className:\"jsonDialog\",style:{backgroundColor:theme.palette.mode==='dark'?'#121212':'#fff',color:theme.palette.mode==='dark'?'#fff':'#000'},children:[/*#__PURE__*/_jsxs(\"div\",{className:\"jsonDialog-title\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"title-name\",children:modelData.model_name}),/*#__PURE__*/_jsx(CopyComponent,{tip:t('launchModel.copyJson'),text:JSON.stringify(modelData,null,4)})]}),/*#__PURE__*/_jsx(\"div\",{className:\"main-box\",children:/*#__PURE__*/_jsx(TextField,{multiline:true,fullWidth:true,rows:24,disabled:true,defaultValue:JSON.stringify(modelData,null,4)})}),/*#__PURE__*/_jsxs(\"div\",{className:\"but-box\",children:[/*#__PURE__*/_jsx(Button,{onClick:function onClick(){setIsJsonShow(false);},style:{marginRight:30},children:t('launchModel.cancel')}),/*#__PURE__*/_jsx(Button,{onClick:handleJsonDataPresentation,children:t('launchModel.edit')})]})]})}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:openSnackbar,onClose:function onClose(){return setOpenSnackbar(false);},message:t('launchModel.fillCompleteParametersBeforeAdding')}),/*#__PURE__*/_jsx(Backdrop,{sx:{color:'#fff',zIndex:function zIndex(theme){return theme.zIndex.drawer+1;}},open:isOpenCachedList,children:/*#__PURE__*/_jsxs(\"div\",{className:\"dialogBox\",style:{backgroundColor:theme.palette.mode==='dark'?'#121212':'#fff',color:theme.palette.mode==='dark'?'#fff':'#000'},children:[/*#__PURE__*/_jsxs(\"div\",{className:\"dialogTitle\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"dialogTitle-model_name\",children:modelData.model_name}),/*#__PURE__*/_jsx(Close,{style:{cursor:'pointer'},onClick:handleCloseCachedList})]}),/*#__PURE__*/_jsx(TableContainer,{component:Paper,children:/*#__PURE__*/_jsxs(Table,{sx:{minWidth:500},style:{height:'500px',width:'100%'},stickyHeader:true,\"aria-label\":\"simple pagination table\",children:[/*#__PURE__*/_jsx(TableHead,{children:/*#__PURE__*/_jsxs(TableRow,{children:[modelType==='LLM'&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:t('launchModel.model_format')}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:t('launchModel.model_size_in_billions')}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:t('launchModel.quantizations')})]}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:192},children:t('launchModel.real_path')}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:46}}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:192},children:t('launchModel.path')}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:46}}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{whiteSpace:'nowrap',minWidth:116},children:t('launchModel.ipAddress')}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:t('launchModel.operation')})]})}),/*#__PURE__*/_jsxs(TableBody,{style:{position:'relative'},children:[cachedListArr.slice(page*5,page*5+5).map(function(row){return/*#__PURE__*/_jsxs(StyledTableRow,{style:{maxHeight:90},children:[modelType==='LLM'&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TableCell,{component:\"th\",scope:\"row\",children:row.model_format===null?'—':row.model_format}),/*#__PURE__*/_jsx(TableCell,{children:row.model_size_in_billions===null?'—':row.model_size_in_billions}),/*#__PURE__*/_jsx(TableCell,{children:row.quantization===null?'—':row.quantization})]}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(Tooltip,{title:row.real_path,children:/*#__PURE__*/_jsx(\"div\",{className:modelType==='LLM'?'pathBox':'pathBox pathBox2',children:row.real_path})})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(CopyComponent,{tip:t('launchModel.copyRealPath'),text:row.real_path})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(Tooltip,{title:row.path,children:/*#__PURE__*/_jsx(\"div\",{className:modelType==='LLM'?'pathBox':'pathBox pathBox2',children:row.path})})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(CopyComponent,{tip:t('launchModel.copyPath'),text:row.path})}),/*#__PURE__*/_jsx(TableCell,{children:row.actor_ip_address}),/*#__PURE__*/_jsx(TableCell,{align:modelType==='LLM'?'center':'left',children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",size:\"large\",onClick:function onClick(){return handleOpenDeleteCachedDialog(row.real_path,row.model_version);},children:/*#__PURE__*/_jsx(Delete,{})})})]},row.model_name);}),emptyRows>0&&/*#__PURE__*/_jsx(TableRow,{style:{height:89.4*emptyRows},children:/*#__PURE__*/_jsx(TableCell,{})}),cachedListArr.length===0&&/*#__PURE__*/_jsx(\"div\",{className:\"empty\",children:t('launchModel.noCacheForNow')})]})]})}),/*#__PURE__*/_jsx(TablePagination,{style:{float:'right'},rowsPerPageOptions:[5],count:cachedListArr.length,rowsPerPage:5,page:page,onPageChange:handleChangePage})]})}),/*#__PURE__*/_jsx(DeleteDialog,{text:t('launchModel.confirmDeleteCacheFiles'),isDelete:isDeleteCached,onHandleIsDelete:function onHandleIsDelete(){return setIsDeleteCached(false);},onHandleDelete:handleDeleteCached}),/*#__PURE__*/_jsx(PasteDialog,{open:isOpenPasteDialog,onHandleClose:function onHandleClose(){return setIsOpenPasteDialog(false);},onHandleCommandLine:handleCommandLine})]});};export default ModelCard;","map":{"version":3,"names":["ChatOutlined","Close","ContentPasteGo","Delete","EditNote","EditNoteOutlined","ExpandLess","ExpandMore","Grade","HelpCenterOutlined","HelpOutline","RocketLaunchOutlined","StarBorder","StopCircle","UndoOutlined","Alert","Backdrop","Box","Button","Chip","CircularProgress","Collapse","FormControl","FormControlLabel","Grid","IconButton","InputLabel","ListItemButton","ListItemText","MenuItem","Paper","Select","Snackbar","Stack","Switch","Table","TableBody","TableCell","TableContainer","TableHead","TablePagination","TableRow","TextField","Tooltip","useTheme","styled","React","useContext","useEffect","useRef","useState","useTranslation","useNavigate","ApiContext","CopyComponent","DeleteDialog","fetchWrapper","TitleTypography","AddPair","CopyToCommandLine","Drawer","PasteDialog","Progress","additionalParameterTipList","llmAllDataKey","quantizationParametersTipList","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","csghubArr","enginesWithNWorker","ModelCard","_ref","_JSON$parse","_JSON$parse2","_modelData$model_abil4","_modelData$model_abil5","url","modelData","gpuAvailable","modelType","_ref$is_custom","is_custom","onHandleCompleteDelete","onHandlecustomDelete","onGetCollectionArr","_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","setSuccessMsg","navigate","_useState15","_useState16","modelUID","setModelUID","_useState17","_useState18","modelEngine","setModelEngine","_useState19","_useState20","modelFormat","setModelFormat","_useState21","_useState22","modelSize","setModelSize","_useState23","_useState24","quantization","setQuantization","_useState25","_useState26","nWorker","setNWorker","_useState27","_useState28","nGPU","setNGPU","_useState29","_useState30","nGpu","setNGpu","_useState31","_useState32","nGPULayers","setNGPULayers","_useState33","_useState34","replica","setReplica","_useState35","_useState36","requestLimits","setRequestLimits","_useState37","_useState38","workerIp","setWorkerIp","_useState39","_useState40","GPUIdx","setGPUIdx","_useState41","_useState42","downloadHub","setDownloadHub","_useState43","_useState44","modelPath","setModelPath","_useState45","_useState46","enableThinking","setEnableThinking","_useState47","_useState48","reasoningContent","setReasoningContent","_useState49","_useState50","ggufQuantizations","setGgufQuantizations","_useState51","_useState52","ggufModelPath","setGgufModelPath","_useState53","_useState54","cpuOffload","setCpuOffload","_useState55","_useState56","enginesObj","setEnginesObj","_useState57","_useState58","engineOptions","setEngineOptions","_useState59","_useState60","formatOptions","setFormatOptions","_useState61","_useState62","sizeOptions","setSizeOptions","_useState63","_useState64","quantizationOptions","setQuantizationOptions","_useState65","_useState66","customDeleted","setCustomDeleted","_useState67","_useState68","customParametersArr","setCustomParametersArr","_useState69","_useState70","quantizationParametersArr","setQuantizationParametersArr","_useState71","_useState72","loraListArr","setLoraListArr","_useState73","_useState74","imageLoraLoadKwargsArr","setImageLoraLoadKwargsArr","_useState75","_useState76","imageLoraFuseKwargsArr","setImageLoraFuseKwargsArr","_useState77","_useState78","isOpenCachedList","setIsOpenCachedList","_useState79","_useState80","isDeleteCached","setIsDeleteCached","_useState81","_useState82","cachedListArr","setCachedListArr","_useState83","_useState84","cachedModelVersion","setCachedModelVersion","_useState85","_useState86","cachedRealPath","setCachedRealPath","_useState87","_useState88","page","setPage","_useState89","_useState90","isDeleteCustomModel","setIsDeleteCustomModel","_useState91","_useState92","isJsonShow","setIsJsonShow","_useState93","_useState94","isHistory","setIsHistory","_useState95","_useState96","customArr","setCustomArr","_useState97","_useState98","quantizationConfigArr","setQuantizationConfigArr","_useState99","_useState100","loraArr","setLoraArr","_useState101","_useState102","imageLoraLoadArr","setImageLoraLoadArr","_useState103","_useState104","imageLoraFuseArr","setImageLoraFuseArr","_useState105","_useState106","customParametersArrLength","setCustomParametersArrLength","_useState107","_useState108","isOpenPasteDialog","setIsOpenPasteDialog","_useState109","_useState110","isShowProgress","setIsShowProgress","_useState111","_useState112","progress","setProgress","_useState113","_useState114","isShowCancel","setIsShowCancel","_useState115","_useState116","isLoading","setIsLoading","parentRef","intervalRef","_useTranslation","t","theme","range","start","end","Array","fill","undefined","map","_","i","isCached","spec","isArray","cache_status","some","cs","convertModelSize","size","toString","includes","parseInt","keyArr","key","push","data","handleGetHistory","length","model_name","handleLlmHistory","format","_toConsumableArray","Set","item","model_format","sizes","filter","model_size_in_billions","JSON","stringify","quants","flatMap","quantizations","current","scrollTo","top","scrollHeight","behavior","getNGPURange","concat","getNewNGPURange","getModelEngine","get","then","Object","keys","catch","error","console","response","status","message","fetchProgress","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","res","wrap","_callee$","_context","prev","next","sent","Number","t0","stopPolling","stop","apply","arguments","startPolling","setInterval","clearInterval","handleModelData","_String","_String2","_modelData$model_abil","_modelData$model_abil2","_modelData$model_abil3","modelDataWithID_LLM","model_uid","trim","model_type","model_engine","n_gpu","request_limits","String","n_worker","worker_ip","gpu_idx","handleGPUIdx","download_hub","model_path","modelDataWithID_other","n_gpu_layers","model_ability","enable_thinking","reasoning_content","gguf_quantization","gguf_model_path","cpu_offload","modelDataWithID","peft_model_config","image_lora_load_kwargs","forEach","handleValueType","value","image_lora_fuse_kwargs","lora_list","id","quantizationConfig","launchModel","post","sessionStorage","setItem","historyArr","parse","localStorage","getItem","historyModelNameArr","_error$response","_error$response2","finally","cancelModel","_ref3","_callee2","_callee2$","_context2","log","finish","arr","split","handeCustomDelete","e","stopPropagation","subType","delete","judgeArr","keysArr","str","toLowerCase","StyledTableRow","_ref4","backgroundColor","palette","action","emptyRows","Math","max","handleChangePage","newPage","handleOpenCachedList","getCachedList","document","body","style","overflow","handleCloseCachedList","list","handleOpenDeleteCachedDialog","real_path","model_version","handleDeleteCached","cachedArr","handleJsonDataPresentation","find","_peft_model_config$lo","quantization_config","join","loraData","lora_name","local_path","customData","quantizationConfigData","handleOtherHistory","_peft_model_config$lo2","ImageLoraLoadData","ImageLoraFuseData","handleCollection","bool","collectionArr","handleDeleteChip","newArr","normalizeLanguage","language","lang","handleCommandLine","isModelStartable","is_builtin","renderButtonContent","sx","fontSize","showAbilityParameter","v","label","onClick","children","className","onMouseEnter","onMouseLeave","elevation","title","placement","color","spacing","direction","useFlexGap","flexWrap","marginLeft","model_lang","variant","model_specs","deleteIcon","onDelete","model_description","floor","context_length","disabled","model_family","dimensions","max_tokens","text","isDelete","onHandleIsDelete","onHandleDelete","isOpen","onClose","display","alignItems","justifyContent","predefinedKeys","getData","ref","flexDirection","width","mx","rowSpacing","columnSpacing","xs","margin","fullWidth","labelId","onChange","target","engine","subArr","specs","cached","displayedEngine","displayedFormat","displayedSize","quant","s","indexOf","displayedQuant","type","InputProps","inputProps","min","labelPlacement","control","checked","primary","marginRight","in","timeout","unmountOnExit","parseFloat","severity","regular","test","onGetArr","onJudgeArr","pairData","tipOptions","toLocaleLowerCase","marginTop","gguf_quantizations","marginBlock","flex","zIndex","drawer","open","mode","tip","multiline","rows","defaultValue","anchorOrigin","vertical","horizontal","cursor","component","minWidth","height","stickyHeader","align","whiteSpace","position","slice","row","maxHeight","scope","path","actor_ip_address","float","rowsPerPageOptions","count","rowsPerPage","onPageChange","onHandleClose","onHandleCommandLine"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/modelCard.js"],"sourcesContent":["import './styles/modelCardStyle.css'\n\nimport {\n ChatOutlined,\n Close,\n ContentPasteGo,\n Delete,\n EditNote,\n EditNoteOutlined,\n ExpandLess,\n ExpandMore,\n Grade,\n HelpCenterOutlined,\n HelpOutline,\n RocketLaunchOutlined,\n StarBorder,\n StopCircle,\n UndoOutlined,\n} from '@mui/icons-material'\nimport {\n Alert,\n Backdrop,\n Box,\n Button,\n Chip,\n CircularProgress,\n Collapse,\n FormControl,\n FormControlLabel,\n Grid,\n IconButton,\n InputLabel,\n ListItemButton,\n ListItemText,\n MenuItem,\n Paper,\n Select,\n Snackbar,\n Stack,\n Switch,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TablePagination,\n TableRow,\n TextField,\n Tooltip,\n} from '@mui/material'\nimport { useTheme } from '@mui/material'\nimport { styled } from '@mui/material/styles'\nimport React, { useContext, useEffect, useRef, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport CopyComponent from '../../components/copyComponent/copyComponent'\nimport DeleteDialog from '../../components/deleteDialog'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport TitleTypography from '../../components/titleTypography'\nimport AddPair from './components/addPair'\nimport CopyToCommandLine from './components/copyComponent'\nimport Drawer from './components/drawer'\nimport PasteDialog from './components/pasteDialog'\nimport Progress from './components/progress'\nimport {\n additionalParameterTipList,\n llmAllDataKey,\n quantizationParametersTipList,\n} from './data/data'\n\nconst csghubArr = ['qwen2-instruct']\nconst enginesWithNWorker = ['SGLang', 'vLLM']\n\nconst ModelCard = ({\n url,\n modelData,\n gpuAvailable,\n modelType,\n is_custom = false,\n onHandleCompleteDelete,\n onHandlecustomDelete,\n onGetCollectionArr,\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, setSuccessMsg } = 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 [nWorker, setNWorker] = useState(1)\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 const [downloadHub, setDownloadHub] = useState('')\n const [modelPath, setModelPath] = useState('')\n const [enableThinking, setEnableThinking] = useState(true)\n const [reasoningContent, setReasoningContent] = useState(false)\n const [ggufQuantizations, setGgufQuantizations] = useState('')\n const [ggufModelPath, setGgufModelPath] = useState('')\n const [cpuOffload, setCpuOffload] = useState(false)\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 [quantizationParametersArr, setQuantizationParametersArr] = useState([])\n const [loraListArr, setLoraListArr] = useState([])\n const [imageLoraLoadKwargsArr, setImageLoraLoadKwargsArr] = useState([])\n const [imageLoraFuseKwargsArr, setImageLoraFuseKwargsArr] = useState([])\n const [isOpenCachedList, setIsOpenCachedList] = useState(false)\n const [isDeleteCached, setIsDeleteCached] = useState(false)\n const [cachedListArr, setCachedListArr] = useState([])\n const [cachedModelVersion, setCachedModelVersion] = useState('')\n const [cachedRealPath, setCachedRealPath] = useState('')\n const [page, setPage] = useState(0)\n const [isDeleteCustomModel, setIsDeleteCustomModel] = useState(false)\n const [isJsonShow, setIsJsonShow] = useState(false)\n const [isHistory, setIsHistory] = useState(false)\n const [customArr, setCustomArr] = useState([])\n const [quantizationConfigArr, setQuantizationConfigArr] = useState([])\n const [loraArr, setLoraArr] = useState([])\n const [imageLoraLoadArr, setImageLoraLoadArr] = useState([])\n const [imageLoraFuseArr, setImageLoraFuseArr] = useState([])\n const [customParametersArrLength, setCustomParametersArrLength] = useState(0)\n const [isOpenPasteDialog, setIsOpenPasteDialog] = useState(false)\n const [isShowProgress, setIsShowProgress] = useState(false)\n const [progress, setProgress] = useState(0)\n const [isShowCancel, setIsShowCancel] = useState(false)\n const [isLoading, setIsLoading] = useState(false)\n\n const parentRef = useRef(null)\n const intervalRef = useRef(null)\n const { t } = useTranslation()\n const theme = useTheme()\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 (Array.isArray(spec.cache_status)) {\n return spec.cache_status.some((cs) => cs)\n } else {\n return spec.cache_status === true\n }\n }\n\n // 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 let keyArr = []\n for (let key in enginesObj) {\n keyArr.push(key)\n }\n const data = handleGetHistory()\n if (keyArr.length && data.model_name) {\n handleLlmHistory(data)\n }\n }, [enginesObj])\n\n useEffect(() => {\n if (modelEngine) {\n const format = [\n ...new Set(enginesObj[modelEngine].map((item) => item.model_format)),\n ]\n setFormatOptions(format)\n if (!format.includes(modelFormat)) {\n setModelFormat('')\n }\n if (format.length === 1) {\n setModelFormat(format[0])\n }\n }\n }, [modelEngine])\n\n useEffect(() => {\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 (\n sizeOptions.length &&\n JSON.stringify(sizes) !== JSON.stringify(sizeOptions)\n ) {\n setModelSize('')\n }\n if (sizes.length === 1) {\n setModelSize(sizes[0])\n }\n }\n }, [modelEngine, modelFormat])\n\n useEffect(() => {\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.includes(quantization)) {\n setQuantization('')\n }\n if (quants.length === 1) {\n setQuantization(quants[0])\n }\n }\n }, [modelEngine, modelFormat, modelSize])\n\n useEffect(() => {\n setCustomParametersArrLength(customParametersArr.length)\n if (\n parentRef.current &&\n customParametersArr.length > customParametersArrLength\n ) {\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 return ['auto', 'CPU'].concat(range(1, gpuAvailable))\n }\n\n return ['auto', 'CPU']\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 fetchWrapper\n .get(`/v1/engines/${model_name}`)\n .then((data) => {\n setEnginesObj(data)\n setEngineOptions(Object.keys(data))\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n setIsCallingApi(false)\n })\n }\n\n const fetchProgress = async () => {\n try {\n const res = await fetchWrapper.get(\n `/v1/models/${modelData.model_name}/progress`\n )\n if (res.progress !== 1.0) setProgress(Number(res.progress))\n } catch (err) {\n stopPolling()\n setIsCallingApi(false)\n }\n }\n\n const startPolling = () => {\n if (intervalRef.current) return\n intervalRef.current = setInterval(fetchProgress, 500)\n }\n\n const stopPolling = () => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current)\n intervalRef.current = null\n }\n }\n\n const handleModelData = () => {\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 String(requestLimits)?.trim() === ''\n ? null\n : Number(String(requestLimits)?.trim()),\n n_worker: nWorker,\n worker_ip: workerIp?.trim() === '' ? null : workerIp?.trim(),\n gpu_idx: GPUIdx?.trim() === '' ? null : handleGPUIdx(GPUIdx?.trim()),\n download_hub: downloadHub === '' ? null : downloadHub,\n model_path: modelPath?.trim() === '' ? null : modelPath?.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 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 download_hub: downloadHub === '' ? null : downloadHub,\n model_path: modelPath?.trim() === '' ? null : modelPath?.trim(),\n }\n\n if (nGPULayers >= 0) modelDataWithID_LLM.n_gpu_layers = nGPULayers\n if (modelData.model_ability?.includes('hybrid'))\n modelDataWithID_LLM.enable_thinking = enableThinking\n if (\n modelData.model_ability?.includes('reasoning') &&\n (!modelData.model_ability?.includes('hybrid') || enableThinking)\n )\n modelDataWithID_LLM.reasoning_content = reasoningContent\n if (ggufQuantizations)\n modelDataWithID_other.gguf_quantization = ggufQuantizations\n if (ggufModelPath) modelDataWithID_other.gguf_model_path = ggufModelPath\n if (['image', 'video'].includes(modelType))\n modelDataWithID_other.cpu_offload = cpuOffload\n\n const modelDataWithID =\n modelType === 'LLM' ? modelDataWithID_LLM : modelDataWithID_other\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['peft_model_config'] = peft_model_config\n }\n\n if (customParametersArr.length) {\n customParametersArr.forEach((item) => {\n modelDataWithID[item.key] = handleValueType(item.value)\n })\n }\n\n if (quantizationParametersArr.length) {\n const quantizationConfig = {}\n quantizationParametersArr.forEach((item) => {\n quantizationConfig[item.key] = handleValueType(item.value)\n })\n modelDataWithID['quantization_config'] = quantizationConfig\n }\n\n return modelDataWithID\n }\n\n const launchModel = () => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n\n setIsCallingApi(true)\n setProgress(0)\n setIsShowProgress(true)\n setIsShowCancel(true)\n\n try {\n const modelDataWithID = handleModelData()\n // First fetcher request to initiate the model\n fetchWrapper\n .post('/v1/models', modelDataWithID)\n .then(() => {\n navigate(`/running_models/${modelType}`)\n sessionStorage.setItem(\n 'runningModelType',\n `/running_models/${modelType}`\n )\n let historyArr = JSON.parse(localStorage.getItem('historyArr')) || []\n const historyModelNameArr = historyArr.map((item) => item.model_name)\n if (historyModelNameArr.includes(modelDataWithID.model_name)) {\n historyArr = historyArr.map((item) => {\n if (item.model_name === modelDataWithID.model_name) {\n return modelDataWithID\n }\n return item\n })\n } else {\n historyArr.push(modelDataWithID)\n }\n localStorage.setItem('historyArr', JSON.stringify(historyArr))\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response?.status === 499) {\n setSuccessMsg(t('launchModel.cancelledSuccessfully'))\n } else if (error.response?.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n .finally(() => {\n setIsCallingApi(false)\n stopPolling()\n setIsShowProgress(false)\n setIsShowCancel(false)\n setIsLoading(false)\n })\n startPolling()\n } catch (error) {\n setErrorMsg(`${error}`)\n setIsCallingApi(false)\n }\n }\n\n const cancelModel = async () => {\n try {\n await fetchWrapper.post(`/v1/models/${modelData.model_name}/cancel`)\n setIsLoading(true)\n } catch (err) {\n console.log('err', err)\n } finally {\n stopPolling()\n setIsShowProgress(false)\n setIsShowCancel(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 fetchWrapper\n .delete(\n `/v1/model_registrations/${\n subType[3] === 'llm' ? 'LLM' : subType[3]\n }/${modelData.model_name}`\n )\n .then(() => {\n setCustomDeleted(true)\n onHandlecustomDelete(modelData.model_name)\n setIsDeleteCustomModel(false)\n })\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\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 str = String(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 (str.includes(',')) {\n return str.split(',')\n } else if (str.includes(',')) {\n return str.split(',')\n } else if (Number(str) || (str !== '' && Number(str) === 0)) {\n return Number(str)\n } else {\n return str\n }\n }\n\n const StyledTableRow = styled(TableRow)(({ theme }) => ({\n '&:nth-of-type(odd)': {\n backgroundColor: theme.palette.action.hover,\n },\n }))\n\n const emptyRows =\n page >= 0 ? Math.max(0, (1 + page) * 5 - cachedListArr.length) : 0\n\n const handleChangePage = (_, newPage) => {\n setPage(newPage)\n }\n\n const handleOpenCachedList = () => {\n setIsOpenCachedList(true)\n getCachedList()\n document.body.style.overflow = 'hidden'\n }\n\n const handleCloseCachedList = () => {\n document.body.style.overflow = 'auto'\n setHover(false)\n setIsOpenCachedList(false)\n if (cachedListArr.length === 0) {\n onHandleCompleteDelete(modelData.model_name)\n }\n }\n\n const getCachedList = () => {\n fetchWrapper\n .get(`/v1/cache/models?model_name=${modelData.model_name}`)\n .then((data) => setCachedListArr(data.list))\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n }\n\n const handleOpenDeleteCachedDialog = (real_path, model_version) => {\n setCachedRealPath(real_path)\n setCachedModelVersion(model_version)\n setIsDeleteCached(true)\n }\n\n const handleDeleteCached = () => {\n fetchWrapper\n .delete(`/v1/cache/models?model_version=${cachedModelVersion}`)\n .then(() => {\n const cachedArr = cachedListArr.filter(\n (item) => item.real_path !== cachedRealPath\n )\n setCachedListArr(cachedArr)\n setIsDeleteCached(false)\n if (cachedArr.length) {\n if (\n (page + 1) * 5 >= cachedListArr.length &&\n cachedArr.length % 5 === 0\n ) {\n setPage(cachedArr.length / 5 - 1)\n }\n }\n })\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n }\n\n const handleJsonDataPresentation = () => {\n const arr = sessionStorage.getItem('subType').split('/')\n sessionStorage.setItem(\n 'registerModelType',\n `/register_model/${arr[arr.length - 1]}`\n )\n sessionStorage.setItem('customJsonData', JSON.stringify(modelData))\n navigate(`/register_model/${arr[arr.length - 1]}/${modelData.model_name}`)\n }\n\n const handleGetHistory = () => {\n const historyArr = JSON.parse(localStorage.getItem('historyArr')) || []\n return (\n historyArr.find((item) => item.model_name === modelData.model_name) || {}\n )\n }\n\n const handleLlmHistory = (data) => {\n const {\n model_engine,\n model_format,\n model_size_in_billions,\n quantization,\n n_worker,\n n_gpu,\n n_gpu_layers,\n replica,\n model_uid,\n request_limits,\n worker_ip,\n gpu_idx,\n download_hub,\n model_path,\n enable_thinking,\n reasoning_content,\n peft_model_config,\n quantization_config,\n } = data\n\n if (!engineOptions.includes(model_engine)) {\n setModelEngine('')\n } else {\n setModelEngine(model_engine || '')\n }\n setModelFormat(model_format || '')\n setModelSize(String(model_size_in_billions) || '')\n setQuantization(quantization || '')\n setNWorker(Number(n_worker) || 1)\n setNGPU(n_gpu || 'auto')\n if (n_gpu_layers >= 0) {\n setNGPULayers(n_gpu_layers)\n } else {\n setNGPULayers(-1)\n }\n setReplica(Number(replica) || 1)\n setModelUID(model_uid || '')\n setRequestLimits(request_limits || '')\n setWorkerIp(worker_ip || '')\n setGPUIdx(gpu_idx?.join(',') || '')\n setDownloadHub(download_hub || '')\n setModelPath(model_path || '')\n setEnableThinking(enable_thinking !== false)\n setReasoningContent(reasoning_content || false)\n\n let loraData = []\n peft_model_config?.lora_list?.forEach((item) => {\n loraData.push({\n lora_name: item.lora_name,\n local_path: item.local_path,\n })\n })\n setLoraArr(loraData)\n\n let customData = []\n for (let key in data) {\n !llmAllDataKey.includes(key) &&\n customData.push({\n key: key,\n value:\n data[key] === null\n ? 'none'\n : data[key] === false\n ? false\n : data[key],\n })\n }\n setCustomArr(customData)\n\n let quantizationConfigData = []\n for (let key in quantization_config) {\n quantizationConfigData.push({\n key: key,\n value:\n quantization_config[key] === null\n ? 'none'\n : quantization_config[key] === false\n ? false\n : quantization_config[key],\n })\n }\n setQuantizationConfigArr(quantizationConfigData)\n\n if (\n model_uid ||\n request_limits ||\n worker_ip ||\n gpu_idx?.join(',') ||\n download_hub ||\n model_path ||\n reasoning_content\n )\n setIsOther(true)\n\n if (loraData.length) {\n setIsOther(true)\n setIsPeftModelConfig(true)\n }\n }\n\n const handleOtherHistory = (data) => {\n const {\n model_uid,\n replica,\n n_gpu,\n gpu_idx,\n worker_ip,\n download_hub,\n model_path,\n gguf_quantization,\n gguf_model_path,\n cpu_offload,\n model_type,\n peft_model_config,\n } = data\n setModelUID(model_uid || '')\n setReplica(replica || 1)\n setNGpu(n_gpu === 'auto' ? 'GPU' : 'CPU')\n setGPUIdx(gpu_idx?.join(',') || '')\n setWorkerIp(worker_ip || '')\n setDownloadHub(download_hub || '')\n setModelPath(model_path || '')\n setGgufQuantizations(gguf_quantization || '')\n setGgufModelPath(gguf_model_path || '')\n setCpuOffload(cpu_offload || false)\n\n if (model_type === 'image') {\n let loraData = []\n peft_model_config?.lora_list?.forEach((item) => {\n loraData.push({\n lora_name: item.lora_name,\n local_path: item.local_path,\n })\n })\n setLoraArr(loraData)\n\n let ImageLoraLoadData = []\n for (let key in peft_model_config?.image_lora_load_kwargs) {\n ImageLoraLoadData.push({\n key: key,\n value: peft_model_config?.image_lora_load_kwargs[key] || 'none',\n })\n }\n setImageLoraLoadArr(ImageLoraLoadData)\n\n let ImageLoraFuseData = []\n for (let key in peft_model_config?.image_lora_fuse_kwargs) {\n ImageLoraFuseData.push({\n key: key,\n value: peft_model_config?.image_lora_fuse_kwargs[key] || 'none',\n })\n }\n setImageLoraFuseArr(ImageLoraFuseData)\n\n if (\n loraData.length ||\n ImageLoraLoadData.length ||\n ImageLoraFuseData.length\n ) {\n setIsPeftModelConfig(true)\n }\n }\n\n let customData = []\n for (let key in data) {\n !llmAllDataKey.includes(key) &&\n customData.push({ key: key, value: data[key] || 'none' })\n }\n setCustomArr(customData)\n }\n\n const handleCollection = (bool) => {\n setHover(false)\n\n let collectionArr = JSON.parse(localStorage.getItem('collectionArr')) || []\n if (bool) {\n collectionArr.push(modelData.model_name)\n } else {\n collectionArr = collectionArr.filter(\n (item) => item !== modelData.model_name\n )\n }\n localStorage.setItem('collectionArr', JSON.stringify(collectionArr))\n\n onGetCollectionArr(collectionArr)\n }\n\n const handleDeleteChip = () => {\n const arr = JSON.parse(localStorage.getItem('historyArr'))\n const newArr = arr.filter(\n (item) => item.model_name !== modelData.model_name\n )\n localStorage.setItem('historyArr', JSON.stringify(newArr))\n setIsHistory(false)\n if (modelType === 'LLM') {\n setModelEngine('')\n setModelFormat('')\n setModelSize('')\n setQuantization('')\n setNWorker(1)\n setNGPU('auto')\n setReplica(1)\n setModelUID('')\n setRequestLimits('')\n setWorkerIp('')\n setGPUIdx('')\n setDownloadHub('')\n setModelPath('')\n setEnableThinking(true)\n setReasoningContent(false)\n setLoraArr([])\n setCustomArr([])\n setQuantizationConfigArr([])\n setIsOther(false)\n setIsPeftModelConfig(false)\n } else {\n setModelUID('')\n setReplica(1)\n setNGpu(gpuAvailable === 0 ? 'CPU' : 'GPU')\n setGPUIdx('')\n setWorkerIp('')\n setDownloadHub('')\n setModelPath('')\n setGgufQuantizations('')\n setGgufModelPath('')\n setCpuOffload(false)\n setLoraArr([])\n setImageLoraLoadArr([])\n setImageLoraFuseArr([])\n setCustomArr([])\n setIsPeftModelConfig(false)\n }\n }\n\n const normalizeLanguage = (language) => {\n if (Array.isArray(language)) {\n return language.map((lang) => lang.toLowerCase())\n } else if (typeof language === 'string') {\n return [language.toLowerCase()]\n } else {\n return []\n }\n }\n\n const handleCommandLine = (data) => {\n if (data.model_name === modelData.model_name) {\n if (data.model_type === 'LLM') {\n handleLlmHistory(data)\n } else {\n handleOtherHistory(data)\n }\n } else {\n setErrorMsg(t('launchModel.commandLineTip'))\n }\n }\n\n const isModelStartable = () => {\n return !(\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(loraListArr, ['lora_name', 'local_path']) ||\n !judgeArr(imageLoraLoadKwargsArr, ['key', 'value']) ||\n !judgeArr(imageLoraFuseKwargsArr, ['key', 'value']) ||\n requestLimitsAlert ||\n GPUIdxAlert) &&\n !isShowCancel) ||\n ((modelType === 'embedding' || modelType === 'rerank') && GPUIdxAlert) ||\n !judgeArr(customParametersArr, ['key', 'value']) ||\n !judgeArr(quantizationParametersArr, ['key', 'value'])\n )\n }\n\n const renderButtonContent = () => {\n if (isShowCancel) {\n return <StopCircle sx={{ fontSize: 26 }} />\n }\n if (isLoading) {\n return <CircularProgress size={26} />\n }\n\n return <RocketLaunchOutlined sx={{ fontSize: 26 }} />\n }\n\n const showAbilityParameter = () => {\n if (!modelData.model_ability) return\n if (Array.isArray(modelData.model_ability)) {\n return modelData.model_ability.map((v) => {\n return (\n <Chip\n key={v}\n label={v}\n size=\"small\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n />\n )\n })\n } else {\n return (\n <Chip\n label={modelData.model_ability}\n size=\"small\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n />\n )\n }\n }\n\n // Set two different states based on mouse hover\n return (\n <>\n <Paper\n id={modelData.model_name}\n className=\"container\"\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n onClick={() => {\n if (!selected && !customDeleted) {\n const data = handleGetHistory()\n if (data?.model_name) setIsHistory(true)\n setSelected(true)\n if (modelType === 'LLM') {\n getModelEngine(modelData.model_name)\n } else if (data?.model_name) {\n handleOtherHistory(data)\n }\n }\n }}\n elevation={hover ? 24 : 4}\n >\n {modelType === 'LLM' ? (\n <Box className=\"descriptionCard\">\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n {is_custom ? (\n <>\n <Tooltip title={t('launchModel.edit')} placement=\"top\">\n <IconButton\n aria-label=\"show\"\n onClick={(e) => {\n e.stopPropagation()\n setIsJsonShow(true)\n }}\n >\n <EditNote />\n </IconButton>\n </Tooltip>\n <Tooltip title={t('launchModel.delete')} placement=\"top\">\n <IconButton\n aria-label=\"delete\"\n onClick={(e) => {\n e.stopPropagation()\n setIsDeleteCustomModel(true)\n }}\n >\n <Delete />\n </IconButton>\n </Tooltip>\n </>\n ) : (\n <>\n {JSON.parse(\n localStorage.getItem('collectionArr')\n )?.includes(modelData.model_name) ? (\n <Tooltip\n title={t('launchModel.unfavorite')}\n placement=\"top\"\n >\n <IconButton\n aria-label=\"collection\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(false)\n }}\n >\n <Grade style={{ color: 'rgb(255, 206, 0)' }} />\n </IconButton>\n </Tooltip>\n ) : (\n <Tooltip\n title={t('launchModel.favorite')}\n placement=\"top\"\n >\n <IconButton\n aria-label=\"cancellation-of-collections\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(true)\n }}\n >\n <StarBorder />\n </IconButton>\n </Tooltip>\n )}\n </>\n )}\n </div>\n </div>\n\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {showAbilityParameter()}\n {modelData.model_lang &&\n (() => {\n return modelData.model_lang.map((v) => {\n return (\n <Chip\n key={v}\n label={v}\n variant=\"outlined\"\n size=\"small\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n />\n )\n })\n })()}\n {(() => {\n if (\n modelData.model_specs &&\n modelData.model_specs.some((spec) => isCached(spec))\n ) {\n return (\n <Chip\n label={t('launchModel.manageCachedModels')}\n variant=\"outlined\"\n color=\"primary\"\n size=\"small\"\n deleteIcon={<EditNote />}\n onDelete={handleOpenCachedList}\n onClick={(e) => {\n e.stopPropagation()\n handleOpenCachedList()\n }}\n />\n )\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n )\n }\n })()}\n </Stack>\n {modelData.model_description && (\n <p className=\"p\" title={modelData.model_description}>\n {modelData.model_description}\n </p>\n )}\n\n <div className=\"iconRow\">\n <div className=\"iconItem\">\n <span className=\"boldIconText\">\n {Math.floor(modelData.context_length / 1000)}K\n </span>\n <small className=\"smallText\">\n {t('launchModel.contextLength')}\n </small>\n </div>\n {(() => {\n if (\n modelData.model_ability &&\n modelData.model_ability.includes('chat')\n ) {\n return (\n <div className=\"iconItem\">\n <ChatOutlined className=\"muiIcon\" />\n <small className=\"smallText\">\n {t('launchModel.chatModel')}\n </small>\n </div>\n )\n } else if (\n modelData.model_ability &&\n modelData.model_ability.includes('generate')\n ) {\n return (\n <div className=\"iconItem\">\n <EditNoteOutlined className=\"muiIcon\" />\n <small className=\"smallText\">\n {t('launchModel.generateModel')}\n </small>\n </div>\n )\n } else {\n return (\n <div className=\"iconItem\">\n <HelpCenterOutlined className=\"muiIcon\" />\n <small className=\"smallText\">\n {t('launchModel.otherModel')}\n </small>\n </div>\n )\n }\n })()}\n </div>\n </Box>\n ) : (\n <Box className=\"descriptionCard\">\n <div className=\"titleContainer\">\n {is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n <Tooltip title={t('launchModel.edit')} placement=\"top\">\n <IconButton\n aria-label=\"show\"\n onClick={(e) => {\n e.stopPropagation()\n setIsJsonShow(true)\n }}\n >\n <EditNote />\n </IconButton>\n </Tooltip>\n <Tooltip title={t('launchModel.delete')} placement=\"top\">\n <IconButton\n aria-label=\"delete\"\n onClick={(e) => {\n e.stopPropagation()\n setIsDeleteCustomModel(true)\n }}\n disabled={customDeleted}\n >\n <Delete />\n </IconButton>\n </Tooltip>\n </div>\n </div>\n )}\n {!is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n {JSON.parse(\n localStorage.getItem('collectionArr')\n )?.includes(modelData.model_name) ? (\n <Tooltip\n title={t('launchModel.unfavorite')}\n placement=\"top\"\n >\n <IconButton\n aria-label=\"collection\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(false)\n }}\n >\n <Grade style={{ color: 'rgb(255, 206, 0)' }} />\n </IconButton>\n </Tooltip>\n ) : (\n <Tooltip\n title={t('launchModel.favorite')}\n placement=\"top\"\n >\n <IconButton\n aria-label=\"cancellation-of-collections\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(true)\n }}\n >\n <StarBorder />\n </IconButton>\n </Tooltip>\n )}\n </div>\n </div>\n )}\n\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {showAbilityParameter()}\n {(() => {\n if (modelData.language) {\n return normalizeLanguage(modelData.language).map((v) => {\n return (\n <Chip\n key={v}\n label={v}\n variant=\"outlined\"\n size=\"small\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n />\n )\n })\n } else if (modelData.model_family) {\n return (\n <Chip\n label={modelData.model_family}\n variant=\"outlined\"\n size=\"small\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n />\n )\n }\n })()}\n {(() => {\n if (modelData.cache_status) {\n return (\n <Chip\n label={t('launchModel.manageCachedModels')}\n variant=\"outlined\"\n color=\"primary\"\n size=\"small\"\n deleteIcon={<EditNote />}\n onDelete={handleOpenCachedList}\n onClick={(e) => {\n e.stopPropagation()\n handleOpenCachedList()\n }}\n />\n )\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n )\n }\n })()}\n </Stack>\n {modelData.model_description && (\n <p className=\"p\" title={modelData.model_description}>\n {modelData.model_description}\n </p>\n )}\n </div>\n {modelData.dimensions && (\n <div className=\"iconRow\">\n <div className=\"iconItem\">\n <span className=\"boldIconText\">{modelData.dimensions}</span>\n <small className=\"smallText\">\n {t('launchModel.dimensions')}\n </small>\n </div>\n <div className=\"iconItem\">\n <span className=\"boldIconText\">{modelData.max_tokens}</span>\n <small className=\"smallText\">\n {t('launchModel.maxTokens')}\n </small>\n </div>\n </div>\n )}\n {!selected && hover && (\n <p className=\"instructionText\">\n {t('launchModel.clickToLaunchModel')}\n </p>\n )}\n </Box>\n )}\n </Paper>\n\n <DeleteDialog\n text={t('launchModel.confirmDeleteCustomModel')}\n isDelete={isDeleteCustomModel}\n onHandleIsDelete={() => setIsDeleteCustomModel(false)}\n onHandleDelete={handeCustomDelete}\n />\n <Drawer\n isOpen={selected}\n onClose={() => {\n setSelected(false)\n setHover(false)\n }}\n >\n <div className=\"drawerCard\">\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <TitleTypography value={modelData.model_name} />\n {isHistory && (\n <Chip\n label={t('launchModel.lastConfig')}\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n onDelete={handleDeleteChip}\n />\n )}\n </div>\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <Tooltip\n title={t('launchModel.commandLineParsing')}\n placement=\"top\"\n >\n <ContentPasteGo\n className=\"pasteText\"\n onClick={() => setIsOpenPasteDialog(true)}\n />\n </Tooltip>\n {isModelStartable() && (\n <CopyToCommandLine\n style={{ fontSize: '30px' }}\n modelData={selected && handleModelData()}\n predefinedKeys={llmAllDataKey}\n getData={handleModelData}\n />\n )}\n </div>\n </div>\n\n {modelType === 'LLM' ? (\n <Box\n ref={parentRef}\n className=\"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\">\n {t('launchModel.modelEngine')}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"modelEngine-label\"\n value={modelEngine}\n onChange={(e) => setModelEngine(e.target.value)}\n label={t('launchModel.modelEngine')}\n >\n {engineOptions.map((engine) => {\n const subArr = []\n enginesObj[engine].forEach((item) => {\n subArr.push(item.model_format)\n })\n const arr = [...new Set(subArr)]\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\n const displayedEngine = cached\n ? engine + ' ' + t('launchModel.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\">\n {t('launchModel.modelFormat')}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"modelFormat-label\"\n value={modelFormat}\n onChange={(e) => setModelFormat(e.target.value)}\n label={t('launchModel.modelFormat')}\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\n const displayedFormat = cached\n ? format + ' ' + t('launchModel.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\">\n {t('launchModel.modelSize')}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"modelSize-label\"\n value={modelSize}\n onChange={(e) => setModelSize(e.target.value)}\n label={t('launchModel.modelSize')}\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\n const displayedSize = cached\n ? size + ' ' + t('launchModel.cached')\n : 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 {t('launchModel.quantization')}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"quantization-label\"\n value={quantization}\n onChange={(e) => setQuantization(e.target.value)}\n label={t('launchModel.quantization')}\n >\n {quantizationOptions.map((quant) => {\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 spec = specs.find((s) => {\n return s.quantizations.includes(quant)\n })\n const cached = Array.isArray(spec?.cache_status)\n ? spec?.cache_status[\n spec?.quantizations.indexOf(quant)\n ]\n : spec?.cache_status\n\n const displayedQuant = cached\n ? quant + ' ' + t('launchModel.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 <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize || !quantization}\n >\n <InputLabel id=\"n-gpu-label\">\n {t(\n enginesWithNWorker.includes(modelEngine)\n ? 'launchModel.nGPUPerWorker'\n : 'launchModel.nGPU'\n )}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"n-gpu-label\"\n value={nGPU}\n onChange={(e) => setNGPU(e.target.value)}\n label={t(\n enginesWithNWorker.includes(modelEngine)\n ? 'launchModel.nGPUPerWorker'\n : 'launchModel.nGPU'\n )}\n >\n {getNGPURange().map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n {(modelFormat === 'ggufv2' || modelFormat === 'ggmlv3') && (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n className=\"textHighlight\"\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n label={t('launchModel.nGpuLayers')}\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 className=\"textHighlight\"\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label={t('launchModel.replica')}\n value={replica}\n onChange={(e) => setReplica(parseInt(e.target.value, 10))}\n />\n </FormControl>\n </Grid>\n {modelData.model_ability?.includes('hybrid') && (\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <div>\n <FormControlLabel\n label={t('launchModel.enableThinking')}\n labelPlacement=\"start\"\n control={<Switch checked={enableThinking} />}\n onChange={(e) => {\n setEnableThinking(e.target.checked)\n }}\n />\n </div>\n </FormControl>\n </Grid>\n )}\n {modelData.model_ability?.includes('reasoning') &&\n enableThinking && (\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <div>\n <FormControlLabel\n label={t('launchModel.parsingReasoningContent')}\n labelPlacement=\"start\"\n control={<Switch checked={reasoningContent} />}\n onChange={(e) => {\n setReasoningContent(e.target.checked)\n }}\n />\n </div>\n </FormControl>\n </Grid>\n )}\n <ListItemButton onClick={() => setIsOther(!isOther)}>\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <ListItemText\n primary={t('launchModel.optionalConfigurations')}\n style={{ marginRight: 10 }}\n />\n {isOther ? <ExpandLess /> : <ExpandMore />}\n </div>\n </ListItemButton>\n <Collapse in={isOther} timeout=\"auto\" unmountOnExit>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n className=\"textHighlight\"\n variant=\"outlined\"\n value={modelUID}\n label={t('launchModel.modelUID.optional')}\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 className=\"textHighlight\"\n value={requestLimits}\n label={t('launchModel.requestLimits.optional')}\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 {t('launchModel.enterIntegerGreaterThanZero')}\n </Alert>\n )}\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n {enginesWithNWorker.includes(modelEngine) && (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n className=\"textHighlight\"\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label={t('launchModel.workerCount.optional')}\n value={nWorker}\n onChange={(e) =>\n setNWorker(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 className=\"textHighlight\"\n variant=\"outlined\"\n value={workerIp}\n label={t('launchModel.workerIp.optional')}\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 className=\"textHighlight\"\n value={GPUIdx}\n label={t('launchModel.GPUIdx.optional')}\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 {t('launchModel.enterCommaSeparatedNumbers')}\n </Alert>\n )}\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"quantization-label\">\n {t('launchModel.downloadHub.optional')}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"download_hub-label\"\n value={downloadHub}\n onChange={(e) => {\n e.target.value === 'none'\n ? setDownloadHub('')\n : setDownloadHub(e.target.value)\n }}\n label={t('launchModel.downloadHub.optional')}\n >\n {(csghubArr.includes(modelData.model_name)\n ? [\n 'none',\n 'huggingface',\n 'modelscope',\n 'openmind_hub',\n 'csghub',\n ]\n : [\n 'none',\n 'huggingface',\n 'modelscope',\n 'openmind_hub',\n ]\n ).map((item) => {\n return (\n <MenuItem key={item} value={item}>\n {item}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n className=\"textHighlight\"\n variant=\"outlined\"\n value={modelPath}\n label={t('launchModel.modelPath.optional')}\n onChange={(e) => setModelPath(e.target.value)}\n />\n </FormControl>\n </Grid>\n <ListItemButton\n onClick={() => setIsPeftModelConfig(!isPeftModelConfig)}\n >\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <ListItemText\n primary={t('launchModel.loraConfig')}\n style={{ marginRight: 10 }}\n />\n {isPeftModelConfig ? <ExpandLess /> : <ExpandMore />}\n </div>\n </ListItemButton>\n <Collapse\n in={isPeftModelConfig}\n timeout=\"auto\"\n unmountOnExit\n style={{ marginLeft: '30px' }}\n >\n <AddPair\n customData={{\n title: t('launchModel.loraModelConfig'),\n key: 'lora_name',\n value: 'local_path',\n }}\n onGetArr={(arr) => {\n setLoraListArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={loraArr}\n />\n </Collapse>\n </Collapse>\n {modelEngine === 'Transformers' && (\n <AddPair\n customData={{\n title: t(\n 'launchModel.additionalQuantizationParametersForInferenceEngine'\n ),\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setQuantizationParametersArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={quantizationConfigArr}\n tipOptions={quantizationParametersTipList}\n />\n )}\n <AddPair\n customData={{\n title: `${t(\n 'launchModel.additionalParametersForInferenceEngine'\n )}${modelEngine ? ': ' + modelEngine : ''}`,\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setCustomParametersArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={customArr}\n tipOptions={\n additionalParameterTipList[modelEngine?.toLocaleLowerCase()]\n }\n />\n </Grid>\n </Box>\n ) : (\n <Box\n ref={parentRef}\n className=\"formContainer\"\n display=\"flex\"\n flexDirection=\"column\"\n width=\"100%\"\n mx=\"auto\"\n >\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n className=\"textHighlight\"\n variant=\"outlined\"\n value={modelUID}\n label={t('launchModel.modelUID.optional')}\n onChange={(e) => setModelUID(e.target.value)}\n />\n <TextField\n className=\"textHighlight\"\n style={{ marginTop: '25px' }}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label={t('launchModel.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\">\n {t('launchModel.device')}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"n-gpu-label\"\n value={nGpu}\n onChange={(e) => setNGpu(e.target.value)}\n label={t('launchModel.nGPU')}\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 className=\"textHighlight\"\n value={GPUIdx}\n label={t('launchModel.GPUIdx')}\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 {t('launchModel.enterCommaSeparatedNumbers')}\n </Alert>\n )}\n </FormControl>\n )}\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n className=\"textHighlight\"\n variant=\"outlined\"\n value={workerIp}\n label={t('launchModel.workerIp')}\n onChange={(e) => setWorkerIp(e.target.value)}\n />\n </FormControl>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"quantization-label\">\n {t('launchModel.downloadHub.optional')}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"download_hub-label\"\n value={downloadHub}\n onChange={(e) => {\n e.target.value === 'none'\n ? setDownloadHub('')\n : setDownloadHub(e.target.value)\n }}\n label={t('launchModel.downloadHub.optional')}\n >\n {['none', 'huggingface', 'modelscope', 'openmind_hub'].map(\n (item) => {\n return (\n <MenuItem key={item} value={item}>\n {item}\n </MenuItem>\n )\n }\n )}\n </Select>\n </FormControl>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n className=\"textHighlight\"\n variant=\"outlined\"\n value={modelPath}\n label={t('launchModel.modelPath.optional')}\n onChange={(e) => setModelPath(e.target.value)}\n />\n </FormControl>\n {modelData.gguf_quantizations && (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"quantization-label\">\n {t('launchModel.GGUFQuantization.optional')}\n </InputLabel>\n <Select\n className=\"textHighlight\"\n labelId=\"gguf_quantizations-label\"\n value={ggufQuantizations}\n onChange={(e) => {\n e.target.value === 'none'\n ? setGgufQuantizations('')\n : setGgufQuantizations(e.target.value)\n }}\n label={t('launchModel.GGUFQuantization.optional')}\n >\n {['none', ...modelData.gguf_quantizations].map((item) => {\n return (\n <MenuItem key={item} value={item}>\n {item}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n )}\n {modelData.gguf_quantizations && (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n className=\"textHighlight\"\n variant=\"outlined\"\n value={ggufModelPath}\n label={t('launchModel.GGUFModelPath.optional')}\n onChange={(e) => setGgufModelPath(e.target.value)}\n />\n </FormControl>\n )}\n {['image', 'video'].includes(modelType) && (\n <>\n <div\n style={{\n marginBlock: '10px',\n }}\n >\n <FormControlLabel\n label={\n <div>\n <span>{t('launchModel.CPUOffload')}</span>\n <Tooltip\n title={t('launchModel.CPUOffload.tip')}\n placement=\"top\"\n >\n <IconButton>\n <HelpOutline />\n </IconButton>\n </Tooltip>\n </div>\n }\n labelPlacement=\"start\"\n control={<Switch checked={cpuOffload} />}\n onChange={(e) => {\n setCpuOffload(e.target.checked)\n }}\n />\n </div>\n <ListItemButton\n onClick={() => setIsPeftModelConfig(!isPeftModelConfig)}\n >\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <ListItemText\n primary={t('launchModel.loraConfig')}\n style={{ marginRight: 10 }}\n />\n {isPeftModelConfig ? <ExpandLess /> : <ExpandMore />}\n </div>\n </ListItemButton>\n <Collapse\n in={isPeftModelConfig}\n timeout=\"auto\"\n unmountOnExit\n style={{ marginLeft: '30px' }}\n >\n <AddPair\n customData={{\n title: t('launchModel.loraModelConfig'),\n key: 'lora_name',\n value: 'local_path',\n }}\n onGetArr={(arr) => {\n setLoraListArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={loraArr}\n />\n <AddPair\n customData={{\n title: t('launchModel.loraLoadKwargsForImageModel'),\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setImageLoraLoadKwargsArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={imageLoraLoadArr}\n />\n <AddPair\n customData={{\n title: t('launchModel.loraFuseKwargsForImageModel'),\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setImageLoraFuseKwargsArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={imageLoraFuseArr}\n />\n </Collapse>\n </>\n )}\n <AddPair\n customData={{\n title: t(\n 'launchModel.additionalParametersForInferenceEngine'\n ),\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setCustomParametersArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={customArr}\n />\n </FormControl>\n </Box>\n )}\n <Box className=\"buttonsContainer\">\n {isShowProgress && <Progress progress={progress} />}\n <div className=\"buttons\">\n <Button\n variant=\"outlined\"\n title={t(\n isShowCancel ? 'launchModel.cancel' : 'launchModel.launch'\n )}\n style={{ flex: 1 }}\n disabled={!isModelStartable() || isLoading}\n onClick={() => {\n if (isShowCancel) {\n cancelModel()\n } else {\n launchModel(url, modelData)\n }\n }}\n >\n {renderButtonContent()}\n </Button>\n <Button\n variant=\"outlined\"\n title={t('launchModel.goBack')}\n style={{ flex: 1 }}\n onClick={() => {\n setSelected(false)\n setHover(false)\n }}\n >\n <UndoOutlined sx={{ fontSize: 26 }} />\n </Button>\n </div>\n </Box>\n </div>\n </Drawer>\n <Backdrop\n sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}\n open={isJsonShow}\n >\n <div\n className=\"jsonDialog\"\n style={{\n backgroundColor: theme.palette.mode === 'dark' ? '#121212' : '#fff',\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n }}\n >\n <div className=\"jsonDialog-title\">\n <div className=\"title-name\">{modelData.model_name}</div>\n <CopyComponent\n tip={t('launchModel.copyJson')}\n text={JSON.stringify(modelData, null, 4)}\n />\n </div>\n <div className=\"main-box\">\n <TextField\n multiline\n fullWidth\n rows={24}\n disabled\n defaultValue={JSON.stringify(modelData, null, 4)}\n />\n </div>\n <div className=\"but-box\">\n <Button\n onClick={() => {\n setIsJsonShow(false)\n }}\n style={{ marginRight: 30 }}\n >\n {t('launchModel.cancel')}\n </Button>\n <Button onClick={handleJsonDataPresentation}>\n {t('launchModel.edit')}\n </Button>\n </div>\n </div>\n </Backdrop>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={openSnackbar}\n onClose={() => setOpenSnackbar(false)}\n message={t('launchModel.fillCompleteParametersBeforeAdding')}\n />\n\n <Backdrop\n sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}\n open={isOpenCachedList}\n >\n <div\n className=\"dialogBox\"\n style={{\n backgroundColor: theme.palette.mode === 'dark' ? '#121212' : '#fff',\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n }}\n >\n <div className=\"dialogTitle\">\n <div className=\"dialogTitle-model_name\">{modelData.model_name}</div>\n <Close\n style={{ cursor: 'pointer' }}\n onClick={handleCloseCachedList}\n />\n </div>\n <TableContainer component={Paper}>\n <Table\n sx={{ minWidth: 500 }}\n style={{ height: '500px', width: '100%' }}\n stickyHeader\n aria-label=\"simple pagination table\"\n >\n <TableHead>\n <TableRow>\n {modelType === 'LLM' && (\n <>\n <TableCell align=\"left\">\n {t('launchModel.model_format')}\n </TableCell>\n <TableCell align=\"left\">\n {t('launchModel.model_size_in_billions')}\n </TableCell>\n <TableCell align=\"left\">\n {t('launchModel.quantizations')}\n </TableCell>\n </>\n )}\n <TableCell align=\"left\" style={{ width: 192 }}>\n {t('launchModel.real_path')}\n </TableCell>\n <TableCell align=\"left\" style={{ width: 46 }}></TableCell>\n <TableCell align=\"left\" style={{ width: 192 }}>\n {t('launchModel.path')}\n </TableCell>\n <TableCell align=\"left\" style={{ width: 46 }}></TableCell>\n <TableCell\n align=\"left\"\n style={{ whiteSpace: 'nowrap', minWidth: 116 }}\n >\n {t('launchModel.ipAddress')}\n </TableCell>\n <TableCell align=\"left\">\n {t('launchModel.operation')}\n </TableCell>\n </TableRow>\n </TableHead>\n <TableBody style={{ position: 'relative' }}>\n {cachedListArr.slice(page * 5, page * 5 + 5).map((row) => (\n <StyledTableRow\n style={{ maxHeight: 90 }}\n key={row.model_name}\n >\n {modelType === 'LLM' && (\n <>\n <TableCell component=\"th\" scope=\"row\">\n {row.model_format === null ? '—' : row.model_format}\n </TableCell>\n <TableCell>\n {row.model_size_in_billions === null\n ? '—'\n : row.model_size_in_billions}\n </TableCell>\n <TableCell>\n {row.quantization === null ? '—' : row.quantization}\n </TableCell>\n </>\n )}\n <TableCell>\n <Tooltip title={row.real_path}>\n <div\n className={\n modelType === 'LLM' ? 'pathBox' : 'pathBox pathBox2'\n }\n >\n {row.real_path}\n </div>\n </Tooltip>\n </TableCell>\n <TableCell>\n <CopyComponent\n tip={t('launchModel.copyRealPath')}\n text={row.real_path}\n />\n </TableCell>\n <TableCell>\n <Tooltip title={row.path}>\n <div\n className={\n modelType === 'LLM' ? 'pathBox' : 'pathBox pathBox2'\n }\n >\n {row.path}\n </div>\n </Tooltip>\n </TableCell>\n <TableCell>\n <CopyComponent\n tip={t('launchModel.copyPath')}\n text={row.path}\n />\n </TableCell>\n <TableCell>{row.actor_ip_address}</TableCell>\n <TableCell align={modelType === 'LLM' ? 'center' : 'left'}>\n <IconButton\n aria-label=\"delete\"\n size=\"large\"\n onClick={() =>\n handleOpenDeleteCachedDialog(\n row.real_path,\n row.model_version\n )\n }\n >\n <Delete />\n </IconButton>\n </TableCell>\n </StyledTableRow>\n ))}\n {emptyRows > 0 && (\n <TableRow style={{ height: 89.4 * emptyRows }}>\n <TableCell />\n </TableRow>\n )}\n {cachedListArr.length === 0 && (\n <div className=\"empty\">{t('launchModel.noCacheForNow')}</div>\n )}\n </TableBody>\n </Table>\n </TableContainer>\n <TablePagination\n style={{ float: 'right' }}\n rowsPerPageOptions={[5]}\n count={cachedListArr.length}\n rowsPerPage={5}\n page={page}\n onPageChange={handleChangePage}\n />\n </div>\n </Backdrop>\n <DeleteDialog\n text={t('launchModel.confirmDeleteCacheFiles')}\n isDelete={isDeleteCached}\n onHandleIsDelete={() => setIsDeleteCached(false)}\n onHandleDelete={handleDeleteCached}\n />\n <PasteDialog\n open={isOpenPasteDialog}\n onHandleClose={() => setIsOpenPasteDialog(false)}\n onHandleCommandLine={handleCommandLine}\n />\n </>\n )\n}\n\nexport default ModelCard\n"],"mappings":"4kBAAA,MAAO,6BAA6B,CAEpC,OACEA,YAAY,CACZC,KAAK,CACLC,cAAc,CACdC,MAAM,CACNC,QAAQ,CACRC,gBAAgB,CAChBC,UAAU,CACVC,UAAU,CACVC,KAAK,CACLC,kBAAkB,CAClBC,WAAW,CACXC,oBAAoB,CACpBC,UAAU,CACVC,UAAU,CACVC,YAAY,KACP,qBAAqB,CAC5B,OACEC,KAAK,CACLC,QAAQ,CACRC,GAAG,CACHC,MAAM,CACNC,IAAI,CACJC,gBAAgB,CAChBC,QAAQ,CACRC,WAAW,CACXC,gBAAgB,CAChBC,IAAI,CACJC,UAAU,CACVC,UAAU,CACVC,cAAc,CACdC,YAAY,CACZC,QAAQ,CACRC,KAAK,CACLC,MAAM,CACNC,QAAQ,CACRC,KAAK,CACLC,MAAM,CACNC,KAAK,CACLC,SAAS,CACTC,SAAS,CACTC,cAAc,CACdC,SAAS,CACTC,eAAe,CACfC,QAAQ,CACRC,SAAS,CACTC,OAAO,KACF,eAAe,CACtB,OAASC,QAAQ,KAAQ,eAAe,CACxC,OAASC,MAAM,KAAQ,sBAAsB,CAC7C,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,MAAM,CAAEC,QAAQ,KAAQ,OAAO,CACtE,OAASC,cAAc,KAAQ,eAAe,CAC9C,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAA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