Skip to content

Commit

Permalink
versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
yannikkellerde committed Mar 30, 2024
1 parent 97d43f6 commit 8af1ad7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion transformer_heads/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
load_lora_with_heads,
)

__version__ = "0.0.5"
__version__ = "0.0.6"
8 changes: 8 additions & 0 deletions transformer_heads/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@ def forward(
-1, head_config.num_outputs or self.config.vocab_size
)
use_labels = use_labels.to(use_logits.device)
print(
use_labels.shape,
use_logits.shape,
torch.min(use_labels),
torch.max(use_labels),
torch.min(use_logits),
torch.max(use_logits),
)
loss_by_head[head_config.name] = loss_fct(use_logits, use_labels)
loss = (
loss + loss_by_head[head_config.name] * head_config.loss_weight
Expand Down

0 comments on commit 8af1ad7

Please sign in to comment.