Skip to content

Commit

Permalink
Automated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca committed Feb 6, 2024
1 parent b8032e8 commit c77408e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion finetune/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ def get_lr_scheduler(optimizer, warmup_steps: int, max_steps: int):
return torch.optim.lr_scheduler.SequentialLR(optimizer, [scheduler1, scheduler2], milestones=[warmup_steps])



def get_longest_seq_length(data: List[Dict]) -> Tuple[int, int]:
# find out the minimum max_seq_length required during fine-tuning (saves memory!)
lengths = [len(d["input_ids"]) for d in data]
Expand Down
1 change: 1 addition & 0 deletions tests/test_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def test_lora_mqa_gqa():
assert torch.count_nonzero(out[:, :, lora_ind]) == bsz * ctx_len * len(lora_ind)
assert torch.count_nonzero(out[:, :, non_lora_ind]) == 0


def test_lora_filter(tmp_path):
from lit_gpt.lora import GPT, lora_filter

Expand Down

0 comments on commit c77408e

Please sign in to comment.