mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
edb017e7cd
commit
520eb2f93f
Binary file not shown.
Binary file not shown.
@ -142,6 +142,9 @@ class LoRAHook():
|
|||||||
lora_out = self.lora(input)
|
lora_out = self.lora(input)
|
||||||
output = input + lora_out
|
output = input + lora_out
|
||||||
|
|
||||||
|
def save_checkpoint(self, i, save_dir):
|
||||||
|
torch.save(self.lora.state_dict(), f"{save_dir}/lora_{i}.pt")
|
||||||
|
|
||||||
|
|
||||||
def set_batch_count(model: Union[nn.Module, DDP], batch_count: float) -> None:
|
def set_batch_count(model: Union[nn.Module, DDP], batch_count: float) -> None:
|
||||||
if isinstance(model, DDP):
|
if isinstance(model, DDP):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user