deepspeedai / deepspeedai/DeepSpeedExamples

[QUESTION]I have a question about deepspeed compression on weight quantization and activation quantization

Open
#716 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.8k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
1

Description

when I use examples such as weight quantization , activation quantization and ZeroQuant, the model size do not change.

https://github.com/microsoft/DeepSpeedExamples/blob/master/compression/bert/bash_script/quant_weight.sh
https://github.com/microsoft/DeepSpeedExamples/blob/master/compression/bert/bash_script/quant_activation.sh
https://github.com/microsoft/DeepSpeedExamples/blob/master/compression/gpt2/bash_script/run_zero_quant.sh

I think the size of 32fp model should be reduced by a quarter when I use quantization config like 8bit, but it didn't happen.

my environment is :
Python=3.8.10
PyTorch=1.12.1
DeepSpeed=0.10.1
Cuda=10.2

### Tasks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with compression/bert/bash_script/quant_weight.sh and quant_activation.sh, then inspect compression/gpt2/bash_script/run_zero_quant.sh and the corresponding example code. Reproduce the reported model-size comparison with the stated Python, PyTorch, DeepSpeed, and CUDA versions, and determine whether the quantized checkpoint or only runtime representations are being measured. Done means documenting the cause and a verified expected size or behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.