Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ init_lora
Function
init_lora
deepspeed/linear/context_manager.py:16–20 ·
view source on GitHub ↗
(model)
Source
from the content-addressed store, hash-verified
14
15
16
def
init_lora(model):
17
model.requires_grad_(False)
18
for
m in model.modules():
19
if
isinstance(m, LoRAOptimizedLinear):
20
m.init_lora()
21
22
23
class
Init(object):
Callers
2
test_model
Method · 0.90
_model_init
Method · 0.85
Calls
1
init_lora
Method · 0.80
Tested by
1
test_model
Method · 0.72