MCPcopy 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
16def 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
23class Init(object):

Callers 2

test_modelMethod · 0.90
_model_initMethod · 0.85

Calls 1

init_loraMethod · 0.80

Tested by 1

test_modelMethod · 0.72