mirror of
https://github.com/iafiscal1212/diffuse-cpp.git
synced 2026-12-04 08:38:08 +00:00
Fix compute buffer sizing for 128+ token generation
Increase safety margin from 1.2x to 1.5x. The previous margin was too tight for 128 generated tokens (deficit of ~1.4 MB on a 2.76 GB buffer). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
00243730eb
commit
054a80afda
1 file changed
+1
-1
@@ -154,7 +154,7 @@ bool diffuse_forward(diffuse_context * ctx,
|
||||
size_t buf_size = per_layer * hp.n_layer;
|
||||
buf_size += (size_t)n_tokens * hp.n_vocab * sizeof(float) * 2; // logits
|
||||
buf_size += 256ull * 1024 * 1024; // graph nodes + execution plan overhead
|
||||
buf_size = (size_t)(buf_size * 1.2); // 20% safety margin
|
||||
buf_size = (size_t)(buf_size * 1.5); // 50% safety margin (handles 128+ tokens)
|
||||
|
||||
struct ggml_init_params cparams = {
|
||||
/*.mem_size = */ buf_size,
|
||||
|
||||
Reference in new issue
Block a user