mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-09-10 10:43:48 +00:00
Incorporate some fixes and updates for GGML
This commit is contained in:
parent
b31ba86ace
commit
d9e27203d4
2 changed files with 24 additions and 0 deletions
6
third_party/ggml/main.cc
vendored
6
third_party/ggml/main.cc
vendored
|
@ -52,6 +52,7 @@ asm(".include \"libc/disclaimer.inc\"");
|
|||
static console_state con_st;
|
||||
static llama_context ** g_ctx;
|
||||
|
||||
static int g_verbose;
|
||||
static bool is_interacting = false;
|
||||
|
||||
#define EPHEMERAL(fmt) "\r\e[K\033[1;35m" fmt " \033[0m"
|
||||
|
@ -64,6 +65,9 @@ void sigint_handler(int signo) {
|
|||
if (!is_interacting) {
|
||||
is_interacting=true;
|
||||
} else {
|
||||
if (g_verbose) {
|
||||
llama_print_timings(*g_ctx);
|
||||
}
|
||||
_exit(128 + signo);
|
||||
}
|
||||
}
|
||||
|
@ -108,6 +112,8 @@ int main(int argc, char ** argv) {
|
|||
win32_console_init(params.use_color);
|
||||
#endif
|
||||
|
||||
g_verbose = params.verbose;
|
||||
|
||||
if (params.perplexity) {
|
||||
printf("\n************\n");
|
||||
printf("%s: please use the 'perplexity' tool for perplexity calculations\n", __func__);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue