Skip to content

Commit f5b575a

Browse files
committed
fix: adjust the default VRAM padding config to reserve enough memory for compute buffers
1 parent 4ef8cb5 commit f5b575a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/bindings/getLlama.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export type LlamaOptions = {
132132
* Recommended to ensure stability.
133133
* This only affects the calculations of `"auto"` in function options and is not reflected in the `getVramState` function.
134134
*
135-
* Defaults to `6%` of the total VRAM or 1GB, whichever is lower.
135+
* Defaults to `8%` of the total VRAM or 1.2GB, whichever is lower.
136136
* Set to `0` to disable.
137137
*/
138138
vramPadding?: number | ((totalVram: number) => number),
@@ -306,7 +306,7 @@ export type LastBuildOptions = {
306306

307307
export const getLlamaFunctionName = "getLlama";
308308

309-
export const defaultLlamaVramPadding = (totalVram: number) => Math.floor(Math.min(totalVram * 0.06, 1024 * 1024 * 1024));
309+
export const defaultLlamaVramPadding = (totalVram: number) => Math.floor(Math.min(totalVram * 0.08, 1.2 * Math.pow(1024, 3)));
310310
export const defaultLlamaRamPadding = (totalRam: number) => {
311311
const platform = getPlatform();
312312

0 commit comments

Comments
 (0)