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

add more examples[support dynamic, static and aware_training quantization] #30

Merged
merged 28 commits into from
Nov 25, 2021

Conversation

xin3he
Copy link
Contributor

@xin3he xin3he commented Oct 21, 2021

What does this PR do?

This PR will provide more available tasks for user to apply. Tasks can be apply with dynamic, static or aware_training quantization with INC.

Task includes:

  • [multiple-choice] Done
  • [summarization] Done
  • [language-modeling] CLM Done, MLM&PLM Done.
    • limitation: a seed set in MLM&PLM take_eval_step to ensure verify loading success.
  • [translation] Done.
    issues#14268, PR#14276 fixed the issue.

@xin3he xin3he changed the title add multi-choice and summarization tasks[support dynamic, static and aware_training quantization] add more tasks[support dynamic, static and aware_training quantization] Oct 21, 2021
@xin3he xin3he changed the title add more tasks[support dynamic, static and aware_training quantization] add more examples[support dynamic, static and aware_training quantization] Oct 21, 2021
@xin3he
Copy link
Contributor Author

xin3he commented Oct 21, 2021

Is there a test for examples to trigger?
What should I do to make it happen?
Could you provide a template for readme.MD?
BTW, [language-modeling] and [translation] are not ready yet. Please wait, thanks.

@xin3he
Copy link
Contributor Author

xin3he commented Oct 22, 2021

According to our local test, we should upgrade the minimum version of transformers to 4.10.0 to avoid some errors in fx mode.
FX submodule naming fix

@xin3he
Copy link
Contributor Author

xin3he commented Oct 22, 2021

UT failed because PyTorch1.10 is released now. Transformers requires PyTorch 1.9.

@echarlaix
Copy link
Collaborator

Thanks for the new examples @xin3he, I am currently looking at adding other examples on my side as well (question-answering, token-classification). For the README.md, we are going to follow something close to what was done in transformers such as done for question-answering or summarization. Finally concerning tests for examples, it was not planned initially but we can definitely add it, would you like to discuss it in our next meeting ? If you prefer to have an example before that I can of course create one.

@xin3he
Copy link
Contributor Author

xin3he commented Oct 23, 2021

Hi, @echarlaix, an example of tests will be better for our discussion, thank you. We can discuss it in our next meeting.

@changwangss
Copy link
Contributor

MLM/PLM verifiy_loading failed due to different accuracy between quantization and reloading, which is caused by plm/mlm_probablity leading to different input in reloading.

examples/pytorch/language-modeling/run_clm.py Outdated Show resolved Hide resolved
examples/pytorch/multiple-choice/run_swag.py Outdated Show resolved Hide resolved
examples/pytorch/summarization/run_summarization.py Outdated Show resolved Hide resolved
examples/pytorch/text-classification/run_glue.py Outdated Show resolved Hide resolved
examples/pytorch/translation/run_translation.py Outdated Show resolved Hide resolved
examples/pytorch/translation/run_translation.py Outdated Show resolved Hide resolved
examples/pytorch/summarization/run_summarization.py Outdated Show resolved Hide resolved
examples/pytorch/language-modeling/run_clm.py Outdated Show resolved Hide resolved
examples/pytorch/multiple-choice/run_swag.py Outdated Show resolved Hide resolved
examples/pytorch/translation/run_translation.py Outdated Show resolved Hide resolved
@PenghuiCheng PenghuiCheng force-pushed the add_inc_examples branch 3 times, most recently from bfe1763 to ac1b328 Compare November 5, 2021 16:18
@changwangss changwangss force-pushed the add_inc_examples branch 2 times, most recently from ac1b328 to 25f2ef7 Compare November 8, 2021 08:55
examples/pytorch/multiple-choice/run_swag.py Outdated Show resolved Hide resolved
examples/pytorch/summarization/README.md Outdated Show resolved Hide resolved
examples/pytorch/summarization/run_summarization.py Outdated Show resolved Hide resolved
examples/pytorch/summarization/run_summarization.py Outdated Show resolved Hide resolved
examples/pytorch/translation/run_translation.py Outdated Show resolved Hide resolved
examples/pytorch/language-modeling/README.md Show resolved Hide resolved
examples/pytorch/language-modeling/run_mlm.py Outdated Show resolved Hide resolved
examples/pytorch/language-modeling/run_mlm.py Outdated Show resolved Hide resolved
examples/pytorch/language-modeling/run_plm.py Outdated Show resolved Hide resolved
examples/pytorch/language-modeling/run_plm.py Outdated Show resolved Hide resolved
@changwangss changwangss force-pushed the add_inc_examples branch 4 times, most recently from 8c0041c to 2b6bbbc Compare November 22, 2021 05:27
@echarlaix echarlaix merged commit e8739dc into main Nov 25, 2021
@echarlaix echarlaix deleted the add_inc_examples branch November 25, 2021 14:36
@echarlaix echarlaix restored the add_inc_examples branch November 25, 2021 15:57
@echarlaix echarlaix deleted the add_inc_examples branch November 26, 2021 11:12
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.

4 participants