mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 02:16:36 +02:00
llama: remove model loading for grammar (#10096)
This commit is contained in:
parent
40b10eee6d
commit
a53d744b01
13 changed files with 521 additions and 107 deletions
8
llama/sampling_ext.h
vendored
8
llama/sampling_ext.h
vendored
|
@ -35,8 +35,12 @@ extern "C"
|
|||
|
||||
int schema_to_grammar(const char *json_schema, char *grammar, size_t max_len);
|
||||
|
||||
struct llama_vocab * llama_load_vocab_from_file(const char * fname);
|
||||
void llama_free_vocab(struct llama_vocab * vocab);
|
||||
|
||||
struct llama_grammar *grammar_init(char* grammar, uint32_t* tokens, size_t n_tokens, const char** pieces, uint32_t* eog_tokens, size_t n_eog_tokens);
|
||||
void grammar_free(struct llama_grammar *g);
|
||||
void grammar_apply(struct llama_grammar *g, struct llama_token_data_array *tokens);
|
||||
void grammar_accept(struct llama_grammar *g, llama_token id);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue