deepspeedai / deepspeedai/DeepSpeedExamples

The example of bert compression did not change line 383 in modeling_bert.py?

Open
#203 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

https://github.com/microsoft/DeepSpeedExamples/blob/e7c8cb767acddba8ad5d2c41fe18e30de7870d30/model_compression/bert/huggingface_transformer/modeling_bert.py#L383

In example of model compression, it says only change is line 383 "where we output attention_scores instead of attention_prob.". But this line is the same as hugging face and I think it does not output attention_scores. Am i wrong or is there a typo?

By the way if only one line need to be changed, is it possible to apply deepspeed compression on deberta v2(hugging face https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta_v2/modeling_deberta_v2.py)?

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

Open model_compression/bert/huggingface_transformer/modeling_bert.py at line 383 and compare it with the referenced Hugging Face implementation. Verify whether the example actually outputs attention_scores, then check the referenced DeBERTa v2 modeling file for the corresponding behavior. Done means correcting the example or documenting the discrepancy and clarifying whether the compression approach applies.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.