Skip to content

Enabled BnB NF4 inference on Gaudi #1457

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

Draft
wants to merge 2 commits into
base: habana_main
Choose a base branch
from
Draft

Enabled BnB NF4 inference on Gaudi #1457

wants to merge 2 commits into from

Conversation

rsshaik1
Copy link

@rsshaik1 rsshaik1 commented Jun 19, 2025

This PR adds inference tests for bitsandbytes NF4 quantization on Gaudi, supporting both pre-quantized models and models that are quantized at runtime.

@rsshaik1 rsshaik1 force-pushed the tests_bnb branch 2 times, most recently from 2cc1fdb to aac9d3f Compare June 23, 2025 05:19
@rsshaik1 rsshaik1 changed the title supports bnb 4-bit quantization for llama Enabled BnB NF4 inference on Gaudi Jun 23, 2025
Copy link

@vivekgoe vivekgoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also modify CI file to add the 2 tests that are passing?

models_pre_quant_4bit_to_test = [("hugging-quants/Meta-Llama-3.1-8B-BNB-NF4",
"read_pre-quantized_4-bit_NF4_opt_model")]

models_pre_quant_8bit_to_test = [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are not testing for 8-bit quant support for now, therefore we can remove these lines.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

model_name, True)


@pytest.mark.skipif(torch.cuda.device_count() < 2,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for Gaudi?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

)


@pytest.mark.skipif(torch.cuda.device_count() < 2,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for Gaudi?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants