Skip to content

Commit

Permalink
Update NNCF commit; tweak number of FQ for albert
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-savelyevv committed Sep 24, 2024
1 parent da2211b commit 62eb21f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test_openvino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
pip install .[openvino,openvino-tokenizers,tests,diffusers] onnxruntime
pip install transformers==${{ matrix.transformers-version }}
pip install -U --pre openvino==2024.5.0.dev20240923 openvino-tokenizers==2024.5.0.dev20240923 --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly/
pip install git+https://github.com/openvinotoolkit/nncf.git@2efda7dd16276c8d8f70fabfb9a94b4bcd7af08f
- name: Test with Pytest
env:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@

EXTRAS_REQUIRE = {
"neural-compressor": ["neural-compressor[pt]>3.0", "accelerate", "transformers<=4.43.2"],
"openvino": ["openvino-nightly==2024.5.0.dev20240923", "nncf@git+https://github.com/openvinotoolkit/nncf.git@2efda7dd16276c8d8f70fabfb9a94b4bcd7af08f", "openvino-tokenizers[transformers]"],
"nncf": ["nncf@git+https://github.com/openvinotoolkit/nncf.git@2efda7dd16276c8d8f70fabfb9a94b4bcd7af08f"],
"openvino": ["openvino-nightly==2024.5.0.dev20240923", "nncf@git+https://github.com/nikita-savelyevv/nncf.git@release_2_13_1", "openvino-tokenizers[transformers]"],
"nncf": ["nncf@git+https://github.com/nikita-savelyevv/nncf.git@release_2_13_1"],
"ipex": ["intel-extension-for-pytorch", "transformers>=4.39,<4.45"],
"diffusers": ["diffusers"],
"quality": QUALITY_REQUIRE,
Expand Down
4 changes: 3 additions & 1 deletion tests/openvino/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ def test_ovmodel_4bit_auto_compression_with_config(
with tempfile.TemporaryDirectory() as tmp_dir:
quantization_config = OVWeightQuantizationConfig.from_dict(quantization_config)
model = model_cls.from_pretrained(model_id, export=True, quantization_config=quantization_config)
import openvino
openvino.save_model(model.model, "test_opt/nncf_213/compressed.xml")
if quantization_config.quant_method.lower() == "awq" or quantization_config.scale_estimation:
# TODO: Check that AWQ and SE was actually applied
pass
Expand Down Expand Up @@ -745,7 +747,7 @@ def preprocess_function(examples, tokenizer):


class OVTrainerTest(unittest.TestCase):
SUPPORTED_ARCHITECTURES_WITH_EXPECTED_QUANTIZED_MATMULS = (("albert", 64, 39),)
SUPPORTED_ARCHITECTURES_WITH_EXPECTED_QUANTIZED_MATMULS = (("albert", 63, 39),)

@parameterized.expand(SUPPORTED_ARCHITECTURES_WITH_EXPECTED_QUANTIZED_MATMULS)
def test_aware_training_quantization(self, model_name, expected_fake_quantize, expected_int8):
Expand Down

0 comments on commit 62eb21f

Please sign in to comment.