From 8c86e2a048aa2254000541b66fdeca5322dd0d7c Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 25 Jun 2024 18:14:46 +0700 Subject: [PATCH] chore: remove default inference params --- .../infrastructure/commanders/usecases/chat.cli.usecases.ts | 6 ++---- cortex-js/src/infrastructure/constants/benchmark.ts | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cortex-js/src/infrastructure/commanders/usecases/chat.cli.usecases.ts b/cortex-js/src/infrastructure/commanders/usecases/chat.cli.usecases.ts index 4990a4073..00ca6ff43 100644 --- a/cortex-js/src/infrastructure/commanders/usecases/chat.cli.usecases.ts +++ b/cortex-js/src/infrastructure/commanders/usecases/chat.cli.usecases.ts @@ -63,6 +63,8 @@ export class ChatCliUsecases { rl.on('line', sendCompletionMessage.bind(this)); async function sendCompletionMessage(userInput: string) { + if (!userInput || userInput.trim() === '') return; + if (userInput.trim() === this.exitClause) { rl.close(); return; @@ -98,11 +100,7 @@ export class ChatCliUsecases { model: modelId, stream: true, max_tokens: 4098, - stop: [], frequency_penalty: 0.7, - presence_penalty: 0.7, - temperature: 0.7, - top_p: 0.7, // Override with model settings ...parser.parseModelInferenceParams(model), diff --git a/cortex-js/src/infrastructure/constants/benchmark.ts b/cortex-js/src/infrastructure/constants/benchmark.ts index a55574c73..083b46584 100644 --- a/cortex-js/src/infrastructure/constants/benchmark.ts +++ b/cortex-js/src/infrastructure/constants/benchmark.ts @@ -18,7 +18,6 @@ export const defaultBenchmarkConfiguration: BenchmarkConfig = { model: 'tinyllama', stream: true, max_tokens: 2048, - stop: [], frequency_penalty: 0, presence_penalty: 0, temperature: 0.7,