This commit is contained in:
Daniel Han 2024-12-20 03:07:04 -08:00
commit 934e39b999
2 changed files with 2 additions and 3 deletions

View file

@ -36,7 +36,7 @@ huggingface = [
"unsloth_zoo>=2024.11.8",
"packaging",
"tyro",
"transformers>=4.46.1",
"transformers>=4.46.1,<=4.46.3",
"datasets>=2.16.0",
"sentencepiece>=0.2.0",
"tqdm",
@ -247,7 +247,7 @@ colab-new = [
"unsloth_zoo>=2024.11.8",
"packaging",
"tyro",
"transformers>=4.46.1",
"transformers>=4.46.1,<=4.46.3",
"datasets>=2.16.0",
"sentencepiece>=0.2.0",
"tqdm",

View file

@ -1054,7 +1054,6 @@ def CausalLM_fast_forward(fast_forward_inference):
self.extra_ignored_labels = torch.full((self.max_seq_length, 1), -100, device = "cuda:0")
pass
shift_labels = torch.hstack((labels[..., 1:], self.extra_ignored_labels[:labels.shape[0]]))
print(kwargs.get("num_items_in_batch", None) or kwargs.get("n_items", None))
loss = fast_cross_entropy_loss(
logits = shift_logits,
labels = shift_labels,