WIP working on convrot offloading

This commit is contained in:
Jaret Burkett
2026-07-11 15:37:28 -06:00
parent 1d1e21177a
commit 4625406093
5 changed files with 176 additions and 12 deletions

View File

@@ -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)