mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-21 20:38:07 +08:00
more cleanup
This commit is contained in:
parent
d3b1bea251
commit
c043d27682
@ -1057,7 +1057,7 @@ array dequantize(
|
||||
int bits = 4,
|
||||
StreamOrDevice s = {});
|
||||
|
||||
/** Load array from .safetensor file format */
|
||||
/** Load array map from .safetensor file format */
|
||||
std::unordered_map<std::string, array> load_safetensor(
|
||||
std::shared_ptr<io::Reader> in_stream,
|
||||
StreamOrDevice s = {});
|
||||
|
@ -85,7 +85,6 @@ std::unordered_map<std::string, array> load_safetensor(
|
||||
char rawJson[jsonHeaderLength];
|
||||
in_stream->read(rawJson, jsonHeaderLength);
|
||||
auto metadata = json::parse(rawJson, rawJson + jsonHeaderLength);
|
||||
// auto metadata = io::jsonDeserialize(json, jsonHeaderLength);
|
||||
// Should always be an object on the top-level
|
||||
if (!metadata.is_object()) {
|
||||
throw std::runtime_error(
|
||||
|
Loading…
Reference in New Issue
Block a user