Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/Robbyant/lingbot-world
/ half
Function
half
wan/modules/attention.py:58–59 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
56
b, lq, lk, out_dtype = q.size(0), q.size(1), k.size(1), q.dtype
57
58
def
half(x):
59
return
x
if
x.dtype in half_dtypes
else
x.to(dtype)
60
61
# preprocess query
62
if
q_lens is None:
Callers
1
flash_attention
Function · 0.70
Calls
1
to
Method · 0.80
Tested by
no test coverage detected