feat: support for GPU layer

This commit is contained in:
n4ze3m
2024-08-20 16:11:50 +05:30
parent 00735cddad
commit 4ef17ff479
16 changed files with 108 additions and 25 deletions

View File

@@ -126,7 +126,7 @@ export class ChatOllama
this.mirostatTau = fields.mirostatTau;
this.numBatch = fields.numBatch;
this.numCtx = fields.numCtx;
this.numGpu = fields.numGpu;
this.numGpu = fields.numGpu === null ? undefined : fields.numGpu;
this.numGqa = fields.numGqa;
this.numKeep = fields.numKeep;
this.numPredict = fields.numPredict;

View File

@@ -9,7 +9,8 @@ export const pageAssistModel = async ({
topK,
topP,
numCtx,
seed
seed,
numGpu
}: {
model: string
baseUrl: string
@@ -19,6 +20,7 @@ export const pageAssistModel = async ({
topP?: number
numCtx?: number
seed?: number
numGpu?: number
}) => {
switch (model) {
case "chrome::gemini-nano::page-assist":
@@ -35,7 +37,8 @@ export const pageAssistModel = async ({
topP,
numCtx,
seed,
model
model,
numGpu
})
}
}