Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/ModelTC/LightLLM
/ bytes2tensor
Function
bytes2tensor
lightllm/server/embed_cache/utils.py:23–25 ·
view source on GitHub ↗
(b)
Source
from the content-addressed store, hash-verified
21
22
23
def
bytes2tensor(b):
24
# return torch.from_numpy(np.frombuffer(b, dtype=np.float16)).cuda()
25
return
torch.load(BytesIO(b), weights_only=False)
26
27
28
def
create_shm(name, data):
Callers
2
context_forward
Method · 0.90
context_forward
Method · 0.90
Calls
1
load
Method · 0.80
Tested by
no test coverage detected