diff --git a/src/lib/components/chat/Settings/Advanced.svelte b/src/lib/components/chat/Settings/Advanced.svelte
index a188f107a..5c70dc56a 100644
--- a/src/lib/components/chat/Settings/Advanced.svelte
+++ b/src/lib/components/chat/Settings/Advanced.svelte
@@ -12,7 +12,8 @@
top_k: '',
top_p: '',
tfs_z: '',
- num_ctx: ''
+ num_ctx: '',
+ num_predict: ''
};
@@ -507,4 +508,49 @@
{/if}
+
+
+
Max Tokens
+
+
+
+
+ {#if options.num_predict !== ''}
+
+ {/if}
+
diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte
index 1a9c3314e..58719edc5 100644
--- a/src/lib/components/chat/SettingsModal.svelte
+++ b/src/lib/components/chat/SettingsModal.svelte
@@ -53,7 +53,8 @@
top_p: '',
stop: '',
tfs_z: '',
- num_ctx: ''
+ num_ctx: '',
+ num_predict: ''
};
// Models
@@ -1132,7 +1133,8 @@
top_k: options.top_k !== '' ? options.top_k : undefined,
top_p: options.top_p !== '' ? options.top_p : undefined,
tfs_z: options.tfs_z !== '' ? options.tfs_z : undefined,
- num_ctx: options.num_ctx !== '' ? options.num_ctx : undefined
+ num_ctx: options.num_ctx !== '' ? options.num_ctx : undefined,
+ num_predict: options.num_predict !== '' ? options.num_predict : undefined
}
});
show = false;
diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte
index a6aa0929e..d0e618794 100644
--- a/src/routes/(app)/+page.svelte
+++ b/src/routes/(app)/+page.svelte
@@ -379,10 +379,13 @@
}
: { content: message.content })
})),
- temperature: $settings.temperature ?? undefined,
- top_p: $settings.top_p ?? undefined,
- num_ctx: $settings.num_ctx ?? undefined,
- frequency_penalty: $settings.repeat_penalty ?? undefined
+ seed: $settings.options.seed ?? undefined,
+ stop: $settings.options.stop ?? undefined,
+ temperature: $settings.options.temperature ?? undefined,
+ top_p: $settings.options.top_p ?? undefined,
+ num_ctx: $settings.options.num_ctx ?? undefined,
+ frequency_penalty: $settings.options.repeat_penalty ?? undefined,
+ max_tokens: $settings.options.num_predict ?? undefined,
})
}
).catch((err) => {
diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte
index db0275026..0b4b28e53 100644
--- a/src/routes/(app)/c/[id]/+page.svelte
+++ b/src/routes/(app)/c/[id]/+page.svelte
@@ -406,10 +406,13 @@
}
: { content: message.content })
})),
- temperature: $settings.temperature ?? undefined,
- top_p: $settings.top_p ?? undefined,
- num_ctx: $settings.num_ctx ?? undefined,
- frequency_penalty: $settings.repeat_penalty ?? undefined
+ seed: $settings.options.seed ?? undefined,
+ stop: $settings.options.stop ?? undefined,
+ temperature: $settings.options.temperature ?? undefined,
+ top_p: $settings.options.top_p ?? undefined,
+ num_ctx: $settings.options.num_ctx ?? undefined,
+ frequency_penalty: $settings.options.repeat_penalty ?? undefined,
+ max_tokens: $settings.options.num_predict ?? undefined,
})
}
).catch((err) => {
diff --git a/src/routes/(app)/modelfiles/create/+page.svelte b/src/routes/(app)/modelfiles/create/+page.svelte
index 506edb9f7..23a0cffc0 100644
--- a/src/routes/(app)/modelfiles/create/+page.svelte
+++ b/src/routes/(app)/modelfiles/create/+page.svelte
@@ -51,7 +51,8 @@
top_k: '',
top_p: '',
tfs_z: '',
- num_ctx: ''
+ num_ctx: '',
+ num_predict: ''
};
let modelfileCreator = null;
@@ -73,6 +74,7 @@ ${options.top_k !== '' ? `PARAMETER top_k ${options.top_k}` : ''}
${options.top_p !== '' ? `PARAMETER top_p ${options.top_p}` : ''}
${options.tfs_z !== '' ? `PARAMETER tfs_z ${options.tfs_z}` : ''}
${options.num_ctx !== '' ? `PARAMETER num_ctx ${options.num_ctx}` : ''}
+${options.num_predict !== '' ? `PARAMETER num_predict ${options.num_predict}` : ''}
SYSTEM """${system}"""`.replace(/^\s*\n/gm, '');
}