Skip to content

Commit 4df8d49

Browse files
committed
Fix: Using tensor with dummy value rather than None for the temperature in the mlm case.
1 parent 684b89d commit 4df8d49

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,6 @@ wandb-debug.log
134134
wandb/
135135

136136
# hf
137-
cache-
138-
.lock
139-
.arrow
137+
*cache-*
138+
*.lock
139+
*.arrow

src/hf_trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def compute_loss(
119119
try:
120120
temp_coef = temp_coef_fn.get_temp_coef()
121121
except AttributeError:
122-
temp_coef = None
122+
temp_coef = torch.Tensor([0.0]).to(contrastive_loss.device)
123123

124124
return contrastive_loss, {
125125
"source_embedding": normalized_source_embedding,

0 commit comments

Comments
 (0)