Storage¶
ffp.storage
|
Load any storage from a finalfusion file. |
|
Load an array chunk from the given file. |
|
Array storage. |
Load a quantized array chunk from the given file. |
|
QuantizedArray storage. |
|
|
Product Quantizer |
-
ffp.storage.
load_storage
(file: Union[str, bytes, int, os.PathLike], mmap: bool = False) → ffp.storage.storage.Storage[source]¶ Load any storage from a finalfusion file.
Loads the first known storage from a finalfusion file.
- Parameters
file (str) – Path to file containing a finalfusion storage chunk.
mmap (bool) – Toggles memory mapping the storage buffer as read-only.
- Returns
vocab – First storage in the file.
- Return type
Union[ffp.storage.NdArray, ffp.storage.QuantizedArray]
- Raises
ValueError – If the file did not contain a storage.