improve strategy

This commit is contained in:
josc146 2023-12-25 19:30:57 +08:00
parent ad30c63c69
commit 12e488ba80

View File

@ -202,6 +202,8 @@ export const getStrategy = (modelConfig: ModelConfig | undefined = undefined) =>
strategy += params.precision === 'int8' ? 'fp16i8' : params.precision === 'fp32' ? 'fp32' : 'fp16'; strategy += params.precision === 'int8' ? 'fp16i8' : params.precision === 'fp32' ? 'fp32' : 'fp16';
if (params.storedLayers < params.maxStoredLayers) if (params.storedLayers < params.maxStoredLayers)
strategy += ` *${params.storedLayers}+`; strategy += ` *${params.storedLayers}+`;
else
strategy += ` -> cuda fp16 *1`;
break; break;
case 'MPS': case 'MPS':
if (avoidOverflow) if (avoidOverflow)