Something went wrong. Try again.
llama.cpp fork for Ternary Bonsai 2 27B: MTP speculation, suffix cache reuse (SCR), q8 KV, two-slot fairness, fused DeltaNet kernels
Something went wrong. Try again.
783 B · 27 lines
C++
at main
12345678910111213141516171819202122232425262728#include "llama.h"#include "common.h"
#include <cstdlib>
int main(int argc, char *argv[] ) { auto * model_path = common_get_model_or_exit(argc, argv); auto * file = fopen(model_path, "r"); if (file == nullptr) { fprintf(stderr, "no model at '%s' found\n", model_path); return EXIT_FAILURE; }
fprintf(stderr, "using '%s'\n", model_path); fclose(file);
llama_backend_init(); auto params = llama_model_params{}; params.load_mode = LLAMA_LOAD_MODE_NONE; params.progress_callback = [](float progress, void * ctx){ (void) ctx; return progress > 0.50; }; auto * model = llama_model_load_from_file(model_path, params); llama_backend_free(); return model == nullptr ? EXIT_SUCCESS : EXIT_FAILURE;}