Huggingface.js documentation
Interface: SafetensorsIndexJson
Interface: SafetensorsIndexJson
Properties
dtype
• Optional dtype: string
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:172
metadata
• Optional metadata: { total_parameters?: string | number } & Record<string, string>
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:174
weight _ map
• Optional weight_map: Record<string, string>
Mapping of tensor name -> shard filename.
Omitted when the index holds more than MAX_WEIGHT_MAP_ENTRIES tensors: such indexes are
consumed in streaming mode and the map is never materialized, so that memory stays bounded
(see parse-safetensors-index.ts). Every model below that threshold — i.e. all of them bar a
couple of huge MoEs, which previously failed to parse outright — is unaffected.
If you only need the shard list, use filepaths on the parse result instead.
Defined in
packages/hub/src/lib/parse-safetensors-metadata.ts:186
Update on GitHub