WIP working on convrot offloading
This commit is contained in:
@@ -79,7 +79,12 @@ class LoConSpecialModule(ToolkitModuleMixin, LoConModule, ExtractableModuleMixin
|
||||
self.lora_up = nn.Linear(lora_dim, out_dim, bias=use_bias)
|
||||
else:
|
||||
raise NotImplementedError
|
||||
self.shape = org_module.weight.shape
|
||||
# avoid the weight property on quantized OstrisLinear: it dequantizes the
|
||||
# whole weight just to answer .shape
|
||||
if getattr(org_module, "is_ostris_quantized", False):
|
||||
self.shape = torch.Size((org_module.out_features, org_module.in_features))
|
||||
else:
|
||||
self.shape = org_module.weight.shape
|
||||
|
||||
if dropout:
|
||||
self.dropout = nn.Dropout(dropout)
|
||||
|
||||
Reference in New Issue
Block a user