Skip to content

Commit dc60af2

Browse files
committed
256 candidates (1024 with Grammar)
1 parent d822995 commit dc60af2

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
@@ -1758,15 +1758,15 @@ const std::vector<samplers> & sampler_order, llama_grammar * grammar, float dyna
17581758
bool use_grammar = grammar != nullptr;
17591759
std::vector<llama_token_data> precache = (use_grammar ? std::vector<llama_token_data>(candidates) : std::vector<llama_token_data>(0));
17601760

1761-
sample_top_k(&candidates_p, 3000);
1761+
sample_top_k(&candidates_p, 256);
17621762

17631763
if (use_grammar) {
17641764
sample_grammar(file_format, n_vocab, &candidates_p, grammar);
1765-
// if top_k 3000 doesn't contain a valid candidate for this grammar, try again pre-cull
1765+
// if top_k 3000 (1024 for Croco) doesn't contain a valid candidate for this grammar, try again pre-cull
17661766
if (candidates_p.size <= 0) {
17671767
candidates_p = { precache.data(), precache.size(), false };
17681768
sample_grammar(file_format, n_vocab, &candidates_p, grammar);
1769-
sample_top_k(&candidates_p, 3000);
1769+
sample_top_k(&candidates_p, 1024);
17701770
}
17711771
}
17721772

0 commit comments

Comments
 (0)