quantize: cap working memory size to avoid loading big tensors onto RAM (#27795)

This commit is contained in:
Xuan-Son Nguyen
2026-08-27 18:31:13 +02:00
committed by GitHub
parent cb300598d5
commit 732707dff2
5 changed files with 112 additions and 79 deletions
+3 -2
View File
@@ -204,8 +204,9 @@ struct llama_model_loader {
// release a weight's mmap pages
void unmap_weight(const llama_tensor_weight & w) const;
// for backwards compatibility, does not support ggml-backend
void load_data_for(struct ggml_tensor * cur) const;
// read a byte range of a weight's data
// with mmap, returns a pointer into the mapping, otherwise reads into buf and returns buf
const void * load_data_range(const llama_tensor_weight & w, size_t offs, size_t size, void * buf) const;
// Returns false if cancelled by progress_callback
bool load_all_data(