feat: support safetensors index loading (#1769)

This commit is contained in:
leejet authored and GitHub committed 2026-07-10 23:23:21 +08:00
1 parent ead6bf521b
commit 1b042838d9
4 files changed
+84

No files matched your search

+3
View File
@@ -11,6 +11,9 @@ bool is_safetensors_file(const std::string& file_path);
bool read_safetensors_file(const std::string& file_path,
std::vector<TensorStorage>& tensor_storages,
std::string* error = nullptr);
bool read_safetensors_index_file(const std::string& file_path,
std::vector<std::string>& shard_paths,
std::string* error = nullptr);
bool write_safetensors_file(const std::string& file_path,
const std::vector<TensorWriteInfo>& tensors,
std::string* error = nullptr);