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
0ed23fab59
commit
bab5eb41bf
Binary file not shown.
@ -138,11 +138,10 @@ class LoRAHook():
|
||||
lora_alpha=1.0,
|
||||
)
|
||||
def hook_fn(self, module, input, output):
|
||||
print(input)
|
||||
lora_out = self.lora(input)
|
||||
output += lora_out
|
||||
|
||||
print(lora_out, output)
|
||||
|
||||
def save_checkpoint(self, i, iter_, save_dir):
|
||||
torch.save(self.lora.state_dict(), f"{save_dir}/lora_{iter_}_{i}.pt")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user