fixes for dpo and orpo template loading (#1424)
This commit is contained in:
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python_version: ["3.10", "3.11"]
|
python_version: ["3.10", "3.11"]
|
||||||
timeout-minutes: 10
|
timeout-minutes: 20
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ from functools import partial
|
|||||||
|
|
||||||
from ..base import load as load_base
|
from ..base import load as load_base
|
||||||
|
|
||||||
load = partial(load_base, module="axolotl.prompt_strategies.dpo")
|
load = partial(load_base, module_base="axolotl.prompt_strategies.dpo")
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ def load(
|
|||||||
chat_template = chat_templates(chat_template)
|
chat_template = chat_templates(chat_template)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
tokenizer.chat_template = chat_template
|
||||||
|
|
||||||
return ORPOTokenizingStrategy(
|
return ORPOTokenizingStrategy(
|
||||||
ORPOPrompter(chat_template, tokenizer),
|
ORPOPrompter(chat_template, tokenizer),
|
||||||
|
|||||||
Reference in New Issue
Block a user