Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/arg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
[](common_params &) {
fprintf(stderr, "version: %d (%s)\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT);
fprintf(stderr, "built with %s for %s\n", LLAMA_COMPILER, LLAMA_BUILD_TARGET);
fprintf(stderr, "ggml version: %s\n", llama_ggml_version());
exit(0);
}
));
Expand Down
3 changes: 3 additions & 0 deletions include/llama.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ extern "C" {
// lora adapter
struct llama_adapter_lora;

LLAMA_API const char * llama_ggml_version(void);
LLAMA_API const char * llama_ggml_commit(void);

// Helpers for getting default parameters
// TODO: update API to start accepting pointers to params structs (https://github.com/ggml-org/llama.cpp/discussions/9172)
LLAMA_API struct llama_model_params llama_model_default_params(void);
Expand Down
8 changes: 8 additions & 0 deletions src/llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,11 @@ const char * llama_print_system_info(void) {
return s.c_str();
}

const char * llama_ggml_version(void) {
return ggml_version();
}

const char * llama_ggml_commit(void) {
return ggml_commit();
}

Loading