* bump axolotl contribs for upstream main conflicts: * bump datasets, tokenizer, trl * remove log workarounds in trl * bump lm-eval * remove unsloth_ import from critical path * remove llama fa2 from conftest * unsloth breaks with latest upstream
21 lines
728 B
Python
21 lines
728 B
Python
"""Test module for checking whether the integration of Unsloth with Hugging Face Transformers is working as expected."""
|
|
import unittest
|
|
|
|
import pytest
|
|
|
|
from axolotl.monkeypatch.unsloth_ import check_self_attn_is_patchable
|
|
|
|
|
|
@pytest.mark.skip(
|
|
reason="Unsloth integration will be broken going into latest transformers"
|
|
)
|
|
class TestUnslothIntegration(unittest.TestCase):
|
|
"""Unsloth monkeypatch integration tests."""
|
|
|
|
def test_is_self_attn_patchable(self):
|
|
# ensures the current version of transformers has loss code that matches our patching code
|
|
self.assertTrue(
|
|
check_self_attn_is_patchable(),
|
|
"HF transformers self attention code has changed and isn't patchable",
|
|
)
|