Cleanup and refactor
| Author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-02-18 13:29:28 +0100 |
| Committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-02-18 13:29:28 +0100 |
| Commit | 128c209108b1178daeef48247ff55dcecc1c51fe (patch) |
|
| diff --git a/context.c b/context.c | |||
| ... | |||
| 10 | #include <string.h> |
10 | #include <string.h> |
| 11 | #include <getopt.h> |
11 | #include <getopt.h> |
| 12 | 12 | ||
| 13 | #define MAX_TOKENS 512 |
||
| 14 | #define MAX_TOKEN_LEN 32 |
||
| 15 | |||
| 16 | static void llama_log_callback(enum ggml_log_level level, const char *text, void *user_data) { |
13 | static void llama_log_callback(enum ggml_log_level level, const char *text, void *user_data) { |
| 17 | (void)level; |
14 | (void)level; |
| 18 | (void)user_data; |
15 | (void)user_data; |
| ... | |||
| diff --git a/npc.c b/npc.c | |||
| ... | |||
| 152 | batch = llama_batch_get_one(&decoder_start, 1); |
152 | batch = llama_batch_get_one(&decoder_start, 1); |
| 153 | } |
153 | } |
| 154 | 154 | ||
| 155 | printf("------------ Prompt: %s\n", prompt); |
155 | printf(">> Prompt: %s\n", prompt); |
| 156 | printf("------------ Response: "); |
156 | printf(">> Response: "); |
| 157 | fflush(stdout); |
157 | fflush(stdout); |
| 158 | 158 | ||
| 159 | int n_pos = 0; |
159 | int n_pos = 0; |
| ... | |||