Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

OV POT integration for QuestionAnswering task #4

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

karkadad
Copy link
Collaborator

What does this PR do?

This PR includes an implementation to integrate OpenVINO POT APIs for the QuestionAnswering task for 8-bit post-training quantization.

@dkurt Please review.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

tests/pot/config.yml Outdated Show resolved Hide resolved
task: squad
batch_size : 1
max_length : 384
calib_size: 50
Copy link
Owner

Choose a reason for hiding this comment

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

Is that parameter regulates a number of samples in dataset? BTW, should we specify stat_subset_size as well to specify a number of samples for quantization.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, actually, stat_subset_size can be specified through the config file as well..I will remove the calib_size parameter since its redundant

@@ -0,0 +1,14 @@
model:
model_ir_path : 'model_ir'
Copy link
Owner

Choose a reason for hiding this comment

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

I'm wondering if we can use cache directory to store IR files. Let me check and add update here.

@dkurt
Copy link
Owner

dkurt commented Jan 25, 2022

There is an error on CI:

AssertionError: Operation Sqrt not found in MO operations, please check it!

Please workaround it by

torch.sqrt = lambda x: torch.pow(x, 0.5)

runs-on: ubuntu-18.04
strategy:
matrix:
transformers-version: [4.9.1, 4.11.0, latest]
Copy link
Owner

Choose a reason for hiding this comment

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

Let's test only 4.11.0:

python -m pip install transformers==4.11.0 torch==1.9.1

@dkurt
Copy link
Owner

dkurt commented Feb 21, 2022

Hi, @karkadad! Do you mind if I push to this branch to resolve CI issues?

@karkadad
Copy link
Collaborator Author

@dkurt Please go ahead, thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants