MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / torch_load_from_buffer

Function torch_load_from_buffer

tests/helpers.py:60–64  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

58
59
60def torch_load_from_buffer(buffer):
61 buffer.seek(0)
62 obj = torch.load(buffer, weights_only=False)
63 buffer.seek(0)
64 return obj
65
66
67def get_test_dims(min: int, max: int, *, n: int) -> list[int]:

Callers 2

Calls

no outgoing calls

Tested by 2