Skip to content

Commit 30e6b03

Browse files
committed
candidates_p 128
1 parent 135132e commit 30e6b03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gpttype_adapter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,15 +1753,15 @@ const std::vector<samplers> & sampler_order, llama_grammar * grammar, float dyna
17531753
bool use_grammar = grammar != nullptr;
17541754
std::vector<llama_token_data> precache = (use_grammar ? std::vector<llama_token_data>(candidates) : std::vector<llama_token_data>(0));
17551755

1756-
sample_top_k(&candidates_p, 512);
1756+
sample_top_k(&candidates_p, 128);
17571757

17581758
if (use_grammar) {
17591759
sample_grammar(file_format, n_vocab, &candidates_p, grammar);
1760-
// if top_k 3000 doesn't contain a valid candidate for this grammar, try again pre-cull
1760+
// if top_k 3000/256 doesn't contain a valid candidate for this grammar, try again pre-cull
17611761
if (candidates_p.size <= 0) {
17621762
candidates_p = { precache.data(), precache.size(), false };
17631763
sample_grammar(file_format, n_vocab, &candidates_p, grammar);
1764-
sample_top_k(&candidates_p, 3000);
1764+
sample_top_k(&candidates_p, 128);
17651765
}
17661766
}
17671767

0 commit comments

Comments
 (0)