CodeBench: num_ctx 16384 — rajoita konteksti-ikkuna VRAM-säästöksi

256K konteksti varaa ~15 GB KV-cachea vaikka benchmark käyttää ~3K.
16K riittää hyvin ja säästää merkittävästi VRAM:ia.
This commit is contained in:
2026-04-14 09:49:30 +03:00
parent f50dc884a3
commit 8ba9ef83a3

View File

@@ -104,7 +104,7 @@ async function ollamaChat(model, prompt, systemPrompt, maxTokens = 2048) {
messages,
stream: false,
think: false,
options: { num_predict: maxTokens, temperature: 0.7, top_k: 40, repeat_penalty: 1.15 },
options: { num_predict: maxTokens, num_ctx: 16384, temperature: 0.7, top_k: 40, repeat_penalty: 1.15 },
}),
});
if (!resp.ok) throw new Error(`Ollama HTTP ${resp.status}: ${await resp.text()}`);