Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bitsandbytes-foundation/bitsandbytes
/ torch_save_to_buffer
Function
torch_save_to_buffer
tests/helpers.py:53–57 ·
view source on GitHub ↗
(obj)
Source
from the content-addressed store, hash-verified
51
52
53
def
torch_save_to_buffer(obj):
54
buffer = BytesIO()
55
torch.save(obj, buffer)
56
buffer.seek(0)
57
return
buffer
58
59
60
def
torch_load_from_buffer(buffer):
Callers
2
test_linear_serialization
Function · 0.90
test_linear_serialization
Function · 0.90
Calls
no outgoing calls
Tested by
2
test_linear_serialization
Function · 0.72
test_linear_serialization
Function · 0.72