Support more parameters for Infermatic

This commit is contained in:
Cohee
2024-06-24 19:16:20 +03:00
parent b188c176fd
commit 41ab90bb8e
5 changed files with 23 additions and 9 deletions

View File

@ -905,6 +905,7 @@ export function parseTextgenLogprobs(token, logprobs) {
case VLLM:
case APHRODITE:
case MANCER:
case INFERMATICAI:
case OOBA: {
/** @type {Record<string, number>[]} */
const topLogprobs = logprobs.top_logprobs;
@ -1020,7 +1021,7 @@ export function isJsonSchemaSupported() {
}
function getLogprobsNumber() {
if (settings.type === VLLM) {
if (settings.type === VLLM || settings.type === INFERMATICAI) {
return 5;
}
@ -1124,7 +1125,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'best_of': canMultiSwipe ? settings.n : 1,
'ignore_eos': settings.ignore_eos_token,
'spaces_between_special_tokens': settings.spaces_between_special_tokens,
'seed': settings.seed,
'seed': settings.seed >= 0 ? settings.seed : undefined,
};
const aphroditeParams = {
'n': canMultiSwipe ? settings.n : 1,
@ -1162,6 +1163,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
switch (settings.type) {
case VLLM:
case INFERMATICAI:
params = Object.assign(params, vllmParams);
break;