mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-27 03:44:35 +00:00
2796953257
This reverts commit 32ebd525bf
.
17 lines
454 B
C++
17 lines
454 B
C++
#include "llama.h"
|
|
|
|
#include <cstdlib>
|
|
|
|
int main(void) {
|
|
llama_backend_init(false);
|
|
auto params = llama_model_params{};
|
|
params.use_mmap = false;
|
|
params.progress_callback = [](float progress, void * ctx){
|
|
(void) ctx;
|
|
return progress > 0.50;
|
|
};
|
|
auto * model = llama_load_model_from_file("models/7B/ggml-model-f16.gguf", params);
|
|
llama_backend_free();
|
|
return model == nullptr ? EXIT_SUCCESS : EXIT_FAILURE;
|
|
}
|