Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
215c5a2
Unsloth Zoo
danielhanchen Oct 14, 2024
df547b7
Update trainer.py
danielhanchen Oct 14, 2024
3dffe28
Update trainer.py
danielhanchen Oct 14, 2024
4e5bcbb
Update cross_entropy_loss.py
danielhanchen Oct 14, 2024
beed284
n_items
danielhanchen Oct 14, 2024
ffffa96
Update llama.py
danielhanchen Oct 14, 2024
6d89eb4
kwargs
danielhanchen Oct 14, 2024
3131ed5
Remove extraneous f prefixes (#1133)
esadek Oct 15, 2024
36bdd40
Update __init__.py
danielhanchen Oct 15, 2024
3397c66
Merge branch 'nightly' of https://github.com/unslothai/unsloth into n…
danielhanchen Oct 15, 2024
4458930
Merge branch 'main' into nightly
danielhanchen Oct 17, 2024
189f815
kwargs
danielhanchen Oct 17, 2024
634db32
Update trainer.py
danielhanchen Oct 17, 2024
80acdcc
Update trainer.py
danielhanchen Oct 17, 2024
a4885ec
Update trainer.py
danielhanchen Oct 17, 2024
5bd0adb
Fix GA
danielhanchen Oct 17, 2024
3778e1e
Update _utils.py
danielhanchen Oct 17, 2024
32002ed
Update llama.py
danielhanchen Oct 17, 2024
43247df
Update tokenizer_utils.py
danielhanchen Oct 17, 2024
037d90d
Warn on old versions
danielhanchen Oct 18, 2024
742a4de
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
b187e3d
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
b1feb5b
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
e6dc6ee
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
3dfa0ea
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
76e165d
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
73307e3
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
314ac87
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
fc6eb1f
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
aba1d4b
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
30d929d
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
c00e3e8
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
624dd2b
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
3f52a5d
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
6771ab5
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
6f703fe
Update tokenizer_utils.py
danielhanchen Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
kwargs
  • Loading branch information
danielhanchen committed Oct 14, 2024
commit 6d89eb4e8ff84a8ddf033e55e08c7d358f0859ea
2 changes: 1 addition & 1 deletion unsloth/kernels/cross_entropy_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def fast_cross_entropy_loss(
labels = shift_labels,
logit_softcapping = logit_softcapping,
logit_scaling = logit_scaling,
n_items = getattr(kwargs, "n_items", None),
n_items = kwargs.get("n_items", None),
)
else:
if logit_scaling != 0:
Expand Down
3 changes: 1 addition & 2 deletions unsloth/models/llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,14 +976,13 @@ def _CausalLM_fast_forward(
self.extra_ignored_labels = torch.full((self.max_seq_length, 1), -100, device = "cuda:0")
pass

print(getattr(kwargs, "n_items", None))
shift_labels = torch.hstack((labels[..., 1:], self.extra_ignored_labels[:labels.shape[0]]))
loss = fast_cross_entropy_loss(
logits = shift_logits,
labels = shift_labels,
logit_softcapping = logit_softcapping,
logit_scaling = logit_scaling,
n_items = getattr(kwargs, "n_items", None),
n_items = kwargs.get("n_items", None),
)
else:
if logit_scaling != 0:
Expand Down