Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

feat: add min_p inference parameter to chat page

imagineer9936703c46a8b0
diff --git a/studio/frontend/src/features/chat/api/chat-adapter.ts b/studio/frontend/src/features/chat/api/chat-adapter.ts
index 45e172bcd43..89975702711 100644
--- a/studio/frontend/src/features/chat/api/chat-adapter.ts
+++ b/studio/frontend/src/features/chat/api/chat-adapter.ts
@@ -182,6 +182,7 @@ export function createOpenAIStreamAdapter(): ChatModelAdapter {
top_p: params.topP,
max_tokens: params.maxTokens,
top_k: params.topK,
+ min_p: params.minP,
repetition_penalty: params.repetitionPenalty,
image_base64: imageBase64,
...(useAdapter === undefined ? {} : { use_adapter: useAdapter }),
diff --git a/studio/frontend/src/features/chat/chat-settings-sheet.tsx b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
index f61f3329e00..900a82a6527 100644
--- a/studio/frontend/src/features/chat/chat-settings-sheet.tsx
+++ b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
@@ -300,6 +300,14 @@ export function ChatSettingsPanel({
step={1}
onChange={set("topK")}
/>
+ <ParamSlider
+ label="Min P"
+ value={params.minP}
+ min={0}
+ max={1}
+ step={0.01}
+ onChange={set("minP")}
+ />
<ParamSlider
label="Repetition Penalty"
value={params.repetitionPenalty}
diff --git a/studio/frontend/src/features/chat/types/api.ts b/studio/frontend/src/features/chat/types/api.ts
index 48ea76c4ddf..e92ccc1aad1 100644
--- a/studio/frontend/src/features/chat/types/api.ts
+++ b/studio/frontend/src/features/chat/types/api.ts
@@ -61,6 +61,7 @@ export interface OpenAIChatCompletionsRequest {
top_p: number;
max_tokens: number;
top_k: number;
+ min_p: number;
repetition_penalty: number;
image_base64?: string;
use_adapter?: boolean | string | null;
diff --git a/studio/frontend/src/features/chat/types/runtime.ts b/studio/frontend/src/features/chat/types/runtime.ts
index 558f1a5464d..47478e5aae8 100644
--- a/studio/frontend/src/features/chat/types/runtime.ts
+++ b/studio/frontend/src/features/chat/types/runtime.ts
@@ -2,6 +2,7 @@ export interface InferenceParams {
temperature: number;
topP: number;
topK: number;
+ minP: number;
repetitionPenalty: number;
maxTokens: number;
systemPrompt: string;
@@ -12,6 +13,7 @@ export const DEFAULT_INFERENCE_PARAMS: InferenceParams = {
temperature: 0.7,
topP: 0.9,
topK: 50,
+ minP: 0.01,
repetitionPenalty: 1.1,
maxTokens: 512,
systemPrompt: "",