Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenSparseLLMs/Linear-MoE
/ is_power_of_2
Function
is_power_of_2
linear_moe/model/common_modules/feature_map.py:34–35 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
32
33
34
def
is_power_of_2(n):
35
return
(n & (n - 1) == 0) and n != 0
36
37
38
class
HedgehogFeatureMap(nn.Module):
Callers
1
__init__
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected