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

Default quantization- True or false in SparseGPT #2357

Open
sriyachakravarthy opened this issue Oct 3, 2024 · 6 comments
Open

Default quantization- True or false in SparseGPT #2357

sriyachakravarthy opened this issue Oct 3, 2024 · 6 comments
Assignees

Comments

@sriyachakravarthy
Copy link

Hi! in the recipe, if i do not want to quantize and perform structured pruning, is it okk to give quantize:false like below and do not provide QuantizationModifier in the recipe?

SparseGPTModifier:
  sparsity: 0.5
  block_size: 128
  sequential_update: true
  quantize: false
  percdamp: 0.01
  mask_structure: "16:32"
  targets: ["re:model.layers.\\d+$"]
@rahul-tuli
Copy link
Member

Hi @sriyachakravarthy,

Thank you for reaching out and opening an issue on SparseML!

The SparseGPTModifier no longer accepts a quantize argument, so you can safely remove it from your recipe. This will ensure that your model remains unquantized without affecting the pruning process.

Additionally, I’d recommend considering our latest framework, LLMCompressor, which offers enhanced capabilities for model compression. If you're open to using it, the recipe would look slightly different:

oneshot_stage:
  pruning_modifiers:
    SparseGPTModifier:
      sparsity: 0.5
      block_size: 128
      sequential_update: true
      percdamp: 0.01
      mask_structure: "16:32"
      targets: ["re:model.layers.\\d+$"]

@rahul-tuli rahul-tuli self-assigned this Oct 3, 2024
@sriyachakravarthy
Copy link
Author

Thank you, @rahul-tuli , will try

@sriyachakravarthy
Copy link
Author

Also, will the llm-compressor run on an AMD machine?

@markurtz
Copy link
Member

markurtz commented Oct 3, 2024

Hi @sriyachakravarthy, I'd like to clarify a bit more about this. Our LLM Compressor flows are currently for vLLM / our compression pathways for GPUs and specifically for Transformers models. SparseML is still used to create compressed ONNX models that can run in DeepSparse and ONNX Runtime for NLP, NLG, and CV models.

For AMD, SparseML will work for AMD CPUs, and LLM Compressor will work for AMD GPUs.

Hope this helps!

@sriyachakravarthy
Copy link
Author

Yes, Thanks!!

@sriyachakravarthy
Copy link
Author

sriyachakravarthy commented Oct 4, 2024

Hi! I do not see model size reduction after pruning using llmpcompressor framework. Kindly help

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

No branches or pull requests

3 participants