llama: print memory breakdown on exit (#15860)

* llama: print memory breakdown on exit
This commit is contained in:
Johannes Gäßler
2025-09-24 16:53:48 +02:00
committed by GitHub
parent f2a789e334
commit e789095502
18 changed files with 243 additions and 12 deletions

View File

@@ -7,6 +7,7 @@
#include "llama-memory.h"
#include "llama-vocab.h"
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
@@ -453,10 +454,12 @@ struct llama_model {
std::string desc() const;
size_t size() const;
size_t size() const; // file size
size_t n_tensors() const;
size_t n_devices() const;
std::map<ggml_backend_buffer_type_t, size_t> memory_breakdown() const;
// total number of parameters in the model
uint64_t n_elements() const;