feat: Add support for minP, repeatLastN, and repeatPenalty model settings
This commit is contained in:
@@ -95,6 +95,8 @@ export class ChatOllama
|
||||
|
||||
topP?: number;
|
||||
|
||||
minP?: number;
|
||||
|
||||
typicalP?: number;
|
||||
|
||||
useMLock?: boolean;
|
||||
@@ -142,6 +144,7 @@ export class ChatOllama
|
||||
this.tfsZ = fields.tfsZ;
|
||||
this.topK = fields.topK;
|
||||
this.topP = fields.topP;
|
||||
this.minP = fields.minP;
|
||||
this.typicalP = fields.typicalP;
|
||||
this.useMLock = fields.useMLock;
|
||||
this.useMMap = fields.useMMap;
|
||||
@@ -205,6 +208,7 @@ export class ChatOllama
|
||||
tfs_z: this.tfsZ,
|
||||
top_k: this.topK,
|
||||
top_p: this.topP,
|
||||
min_p: this.minP,
|
||||
typical_p: this.typicalP,
|
||||
use_mlock: this.useMLock,
|
||||
use_mmap: this.useMMap,
|
||||
|
||||
@@ -17,7 +17,10 @@ export const pageAssistModel = async ({
|
||||
seed,
|
||||
numGpu,
|
||||
numPredict,
|
||||
useMMap
|
||||
useMMap,
|
||||
minP,
|
||||
repeatLastN,
|
||||
repeatPenalty
|
||||
}: {
|
||||
model: string
|
||||
baseUrl: string
|
||||
@@ -30,6 +33,9 @@ export const pageAssistModel = async ({
|
||||
numGpu?: number
|
||||
numPredict?: number
|
||||
useMMap?: boolean
|
||||
minP?: number
|
||||
repeatPenalty?: number
|
||||
repeatLastN?: number
|
||||
}) => {
|
||||
if (model === "chrome::gemini-nano::page-assist") {
|
||||
return new ChatChromeAI({
|
||||
@@ -86,6 +92,9 @@ export const pageAssistModel = async ({
|
||||
model,
|
||||
numGpu,
|
||||
numPredict,
|
||||
useMMap
|
||||
useMMap,
|
||||
minP: minP,
|
||||
repeatPenalty: repeatPenalty,
|
||||
repeatLastN: repeatLastN,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ export interface OllamaInput {
|
||||
tfsZ?: number
|
||||
topK?: number
|
||||
topP?: number
|
||||
minP?: number
|
||||
typicalP?: number
|
||||
useMLock?: boolean
|
||||
useMMap?: boolean
|
||||
|
||||
Reference in New Issue
Block a user