Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 0 additions & 16 deletions tests/test_dpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,14 +733,6 @@ def test_train_dense_with_peft_config_lora(self):
assert not torch.equal(param, new_param), f"Parameter {n} has not changed."

@require_peft
@pytest.mark.xfail(
is_peft_available() and Version(peft.__version__).is_devrelease,
reason=(
"peft's LoRA parametrization for MoE expert parameters returns bf16 under autocast, which "
"`register_parametrization` rejects (see #6914)."
),
strict=True,
)
def test_train_moe_with_peft_config(self):
model_id = "trl-internal-testing/tiny-GptOssForCausalLM"
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="float32")
Expand Down Expand Up @@ -809,14 +801,6 @@ def test_train_peft_model(self):
assert not torch.equal(param, new_param), f"Parameter {n} has not changed."

@require_peft
@pytest.mark.xfail(
is_peft_available() and Version(peft.__version__).is_devrelease,
reason=(
"peft's LoRA parametrization for MoE expert parameters returns bf16 under autocast, which "
"`register_parametrization` rejects (see #6914)."
),
strict=True,
)
def test_train_moe_peft_model(self):
# Regression test for https://github.com/huggingface/trl/issues/5222. Before PEFT 0.20.0, only one adapter per
# model was supported when the LoRA config uses `target_parameters` (see peft#3340, fixed in peft#3350), so no
Expand Down
8 changes: 0 additions & 8 deletions tests/test_grpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,14 +930,6 @@ def test_train_peft_model(self):
assert not torch.equal(param, new_param), f"Parameter {n} has not changed."

@require_peft
@pytest.mark.xfail(
is_peft_available() and Version(peft.__version__).is_devrelease,
reason=(
"peft's LoRA parametrization for MoE expert parameters returns bf16 under autocast, which "
"`register_parametrization` rejects (see #6914)."
),
strict=True,
)
def test_train_moe_peft_model(self):
# Regression test for https://github.com/huggingface/trl/issues/5222. Before PEFT 0.20.0, only one adapter per
# model was supported when the LoRA config uses `target_parameters` (see peft#3340, fixed in peft#3350), so no
Expand Down
8 changes: 0 additions & 8 deletions tests/test_kto_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,14 +813,6 @@ def test_train_peft_model(self):
assert not torch.equal(param, new_param), f"Parameter {n} has not changed."

@require_peft
@pytest.mark.xfail(
is_peft_available() and Version(peft.__version__).is_devrelease,
reason=(
"peft's LoRA parametrization for MoE expert parameters returns bf16 under autocast, which "
"`register_parametrization` rejects (see #6914)."
),
strict=True,
)
def test_train_moe_peft_model(self):
# Regression test for https://github.com/huggingface/trl/issues/5222. Before PEFT 0.20.0, only one adapter per
# model was supported when the LoRA config uses `target_parameters` (see peft#3340, fixed in peft#3350), so no
Expand Down
10 changes: 0 additions & 10 deletions tests/test_reward_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import pytest
import torch
from datasets import DatasetDict, IterableDatasetDict, load_dataset
from packaging.version import Version
from transformers import AutoModelForSequenceClassification, AutoTokenizer
from transformers.utils import is_peft_available

Expand All @@ -29,7 +28,6 @@


if is_peft_available():
import peft
from peft import LoraConfig, get_peft_model


Expand Down Expand Up @@ -344,14 +342,6 @@ def test_train_dense_with_peft_config(self):
assert not torch.equal(param, new_param), f"Parameter {n} has not changed."

@require_peft
@pytest.mark.xfail(
is_peft_available() and Version(peft.__version__).is_devrelease,
reason=(
"peft's LoRA parametrization for MoE expert parameters returns bf16 under autocast, which "
"`register_parametrization` rejects (see #6914)."
),
strict=True,
)
def test_train_moe_with_peft_config(self):
model_id = "trl-internal-testing/tiny-Qwen3MoeForCausalLM"
model = AutoModelForSequenceClassification.from_pretrained(model_id, dtype="float32")
Expand Down
8 changes: 0 additions & 8 deletions tests/test_rloo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,6 @@ def test_train_peft_model(self):
assert not torch.equal(param, new_param), f"Parameter {n} has not changed."

@require_peft
@pytest.mark.xfail(
is_peft_available() and Version(peft.__version__).is_devrelease,
reason=(
"peft's LoRA parametrization for MoE expert parameters returns bf16 under autocast, which "
"`register_parametrization` rejects (see #6914)."
),
strict=True,
)
def test_train_moe_peft_model(self):
# Regression test for https://github.com/huggingface/trl/issues/5222. Before PEFT 0.20.0, only one adapter per
# model was supported when the LoRA config uses `target_parameters` (see peft#3340, fixed in peft#3350), so no
Expand Down
8 changes: 0 additions & 8 deletions tests/test_sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,14 +753,6 @@ def test_train_with_peft_config_prompt_tuning(self, peft_type):
assert not torch.equal(param, new_param), f"Parameter {n} has not changed."

@require_peft
@pytest.mark.xfail(
is_peft_available() and Version(peft.__version__).is_devrelease,
reason=(
"peft's LoRA parametrization for MoE expert parameters returns bf16 under autocast, which "
"`register_parametrization` rejects (see #6914)."
),
strict=True,
)
def test_train_moe_with_peft_config(self):
model_id = "trl-internal-testing/tiny-GptOssForCausalLM"
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="float32")
Expand Down
Loading