mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-04-28 18:32:04 +00:00
spec : add self speculative decoding, ngram and refactor (#1261)
* spec : add self speculative decoding and ngram-mod and refactor common : use common_ prefix for common library function llama : use LLAMA_TOKEN_NULL spec : add self speculative decoding (no draft model required) + refactor spec : add ngram-mod spec : various improvements ton ngram-map + docs spec : fix the check-rate logic of ngram-simple common : add common_speculative_is_compat() spec : simplify time measurement using common_time_meas refactor common_sampler_init refactor common_token_to_piece refactor and fix cur_p bug clean up * spec : remove check rate * spec: show warnings instead of abort --------- Co-authored-by: firecoperana <firecoperana> Co-authored-by: Sascha Rogmann <59577610+srogmann@users.noreply.github.com>
This commit is contained in:
@@ -3579,6 +3579,10 @@ int32_t llama_vocab_n_tokens(const struct llama_vocab * vocab) {
|
||||
return vocab->n_tokens();
|
||||
}
|
||||
|
||||
const char * llama_vocab_get_text(const struct llama_vocab * vocab, llama_token token) {
|
||||
return vocab->token_get_text(token);
|
||||
}
|
||||
|
||||
bool llama_vocab_is_eog(const struct llama_vocab * vocab, llama_token token) {
|
||||
return vocab->is_eog(token);
|
||||
}
|
||||
@@ -3629,7 +3633,7 @@ int32_t llama_vocab_tokenize(
|
||||
return vocab->tokenize(text, text_len, tokens, n_tokens_max, add_special, parse_special);
|
||||
}
|
||||
|
||||
int32_t llama_vocab_token_to_piece(
|
||||
int32_t llama_token_to_piece_vocab(
|
||||
const struct llama_vocab * vocab,
|
||||
llama_token token,
|
||||
char * buf,
|
||||
|
||||
Reference in New Issue
Block a user