feat: add convert api (#142)

This commit is contained in:
leejet authored and GitHub committed 2024-01-14 11:43:24 +08:00
1 parent 2b6ec97fe2
commit 5c614e4bc2
5 files changed
+167 -25

No files matched your search

+3 -2
View File
@@ -4,9 +4,9 @@
#include <functional>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include <set>
#include "ggml/ggml-backend.h"
#include "ggml/ggml.h"
@@ -121,7 +121,8 @@ public:
bool load_tensors(std::map<std::string, struct ggml_tensor*>& tensors,
ggml_backend_t backend,
std::set<std::string> ignore_tensors = {});
int64_t cal_mem_size(ggml_backend_t backend);
bool save_to_gguf_file(const std::string& file_path, ggml_type type);
int64_t cal_mem_size(ggml_backend_t backend, ggml_type type = GGML_TYPE_COUNT);
~ModelLoader() = default;
};
#endif // __MODEL_H__