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

feat: add quantize_model() fn & a MidnightRose70B #79

Merged
merged 13 commits into from
Mar 23, 2024
Merged

Conversation

sambarnes
Copy link
Collaborator

@sambarnes sambarnes commented Mar 15, 2024

Details

without a calibration dataset:
https://huggingface.co/sambarnes/Midnight-Rose-70B-v2.0.3-GPTQ-naive

with a calibration dataset (VMWare/open-instruct):
https://huggingface.co/sambarnes/Midnight-Rose-70B-v2.0.3-GPTQ

upon further testing: i couldnt actually notice a difference between the two, so gonna just use the not naive one

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I agree to license this contribution under the MIT LICENSE
  • I checked the current PR for duplication.

logger.info(f"Volume now contains {quantized_model_path}")


def load_open_instruct(tokenizer, n_samples=128):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this calibration dataset loading is mostly forked from the examples here:
https://github.com/AutoGPTQ/AutoGPTQ/blob/main/examples/quantization/quant_with_alpaca.py

where instead of reading from a json file, we sample from this dataset instead:
https://huggingface.co/datasets/VMware/open-instruct

only adjustments to the code were to limit number of samples & change column labels for the dataset

@sambarnes sambarnes marked this pull request as ready for review March 22, 2024 23:01
Copy link
Contributor

@louisgv louisgv left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@sambarnes sambarnes merged commit 1d737c4 into main Mar 23, 2024
3 checks passed
@sambarnes sambarnes deleted the quantizer branch March 23, 2024 00:21
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.

None yet

2 participants