Skip to content

Commit 8a6da33

Browse files
Feat/kto (#1316)
* Add PatchKTOTrainer and update model imports * Update dpo.py * Update __init__.py * Delete unsloth/models/kto.py --------- Co-authored-by: Daniel Han <danielhanchen@gmail.com>
1 parent 8bf0404 commit 8a6da33

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

unsloth/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
from .llama import FastLlamaModel
1717
from .mistral import FastMistralModel
1818
from .qwen2 import FastQwen2Model
19-
from .dpo import PatchDPOTrainer
19+
from .dpo import PatchDPOTrainer, PatchKTOTrainer
2020
from ._utils import is_bfloat16_supported

unsloth/models/dpo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
__all__ = [
1616
"PatchDPOTrainer",
17+
"PatchKTOTrainer",
1718
]
1819

1920
try:
@@ -127,4 +128,4 @@ def PatchDPOTrainer():
127128
pass
128129
pass
129130
pass
130-
131+
PatchKTOTrainer = PatchDPOTrainer

0 commit comments

Comments
 (0)