Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix final failing slow tests #609

Merged
merged 1 commit into from
Jun 20, 2023
Merged
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
7 changes: 6 additions & 1 deletion tests/test_common_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def tearDown(self):
gc.collect()

@require_bitsandbytes
@pytest.mark.multi_gpu_tests
@pytest.mark.single_gpu_tests
def test_lora_bnb_8bit_quantization(self):
r"""
Test that tests if the 8bit quantization using LoRA works as expected
Expand Down Expand Up @@ -104,6 +106,7 @@ def test_lora_bnb_8bit_quantization(self):

@require_bitsandbytes
@pytest.mark.multi_gpu_tests
@pytest.mark.single_gpu_tests
def test_lora_bnb_4bit_quantization_from_pretrained_safetensors(self):
r"""
Test that tests if the 4bit quantization using LoRA works as expected with safetensors weights.
Expand All @@ -114,9 +117,11 @@ def test_lora_bnb_4bit_quantization_from_pretrained_safetensors(self):
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", load_in_4bit=True)
model = PeftModel.from_pretrained(model, peft_model_id)

_ = model.generate(torch.LongTensor([[0, 2, 3, 1]]).to(0))
_ = model.generate(input_ids=torch.LongTensor([[0, 2, 3, 1]]).to(0))

@require_bitsandbytes
@pytest.mark.multi_gpu_tests
@pytest.mark.single_gpu_tests
def test_lora_bnb_4bit_quantization(self):
r"""
Test that tests if the 4bit quantization using LoRA works as expected
Expand Down