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

Adding default cpu support. Removing max tokens for huggingface warnings #366

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

DhruvaBansal00
Copy link
Contributor

No description provided.

Copy link
Contributor

@nihit nihit left a comment

Choose a reason for hiding this comment

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

lgtm otherwise

@@ -38,7 +38,9 @@ def __init__(self, config: AutolabelConfig, cache: BaseCache = None) -> None:
# initialize HF pipeline
tokenizer = AutoTokenizer.from_pretrained(self.model_name)
quantize_bits = self.model_params["quantize"]
if quantize_bits == 8:
if not torch.cuda.is_available():
model = AutoModelForSeq2SeqLM.from_pretrained(self.model_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

is model quantization only respected for GPU inference? makes sense but just want to confirm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah bitsandbytes-foundation/bitsandbytes#40, quantization isn't really supported on cpu.

@DhruvaBansal00 DhruvaBansal00 merged commit 6e0bea4 into main Jun 22, 2023
@DhruvaBansal00 DhruvaBansal00 deleted the huggingface-local-cpu branch June 22, 2023 23:42
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