File size: 493 Bytes
140387c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef __LLAMA2_H__
#define __LLAMA2_H__
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

void *llama2_init(char *model_path, char *tokenizer_path);

void llama2_free(void *ctx);

int llama2_generate(void *ctx, char *prompt, int steps, float temperature, float topp, int seed);

char *llama2_get_last(void *ctx);

void llama2_tokenize(void *ctx, char *text, int8_t bos, int8_t eos, int *tokens, int *n_tokens);

#ifdef __cplusplus
}
#endif  // __cplusplus

#endif  // __LLAMA2_H__