optimum-intel icon indicating copy to clipboard operation
optimum-intel copied to clipboard

[draft]Enable Qwen3 and Qwen3-MOE for OpenVINO

Open openvino-dev-samples opened this issue 9 months ago • 1 comments

https://github.com/huggingface/transformers/pull/36878

openvino-dev-samples avatar Mar 25 '25 02:03 openvino-dev-samples

@eaidova

openvino-dev-samples avatar Mar 25 '25 02:03 openvino-dev-samples

can you please run make style

IlyasMoutawwakil avatar Apr 03 '25 10:04 IlyasMoutawwakil

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Please rebase this branch and add tests.

IlyasMoutawwakil avatar Apr 24 '25 13:04 IlyasMoutawwakil

Please rebase this branch and add tests.

hi, test case shall be added when model officially released

openvino-dev-samples avatar Apr 27 '25 01:04 openvino-dev-samples

the official model release only concerns pretrained weights (which we don't use for testing), model configuration and implementation should be enough to create a tiny random qwen3 for testing.

IlyasMoutawwakil avatar Apr 27 '25 11:04 IlyasMoutawwakil

hi how to retrigger the CI, I just updated remote tiny model, and passed my local test cases. @IlyasMoutawwakil @echarlaix

openvino-dev-samples avatar Apr 29 '25 10:04 openvino-dev-samples

@openvino-dev-samples looks like you need to add qwen3 and qwen3-moe to EXPECTED_NUM_SDPA https://github.com/huggingface/optimum-intel/blob/f53b878b98f7680902e83f869767dc62d69038ac/tests/openvino/test_modeling.py#L1153 to give the expected number of SDPA to fix the following tests :

FAILED tests/openvino/test_modeling.py::OVModelForCausalLMIntegrationTest::test_compare_to_transformers_61_qwen3 - AssertionError: 0 != 2 : Expected number of SDPA 0, while model contains 2
FAILED tests/openvino/test_modeling.py::OVModelForCausalLMIntegrationTest::test_compare_to_transformers_62_qwen3_moe - AssertionError: 0 != 2 : Expected number of SDPA 0, while model contains 2

echarlaix avatar Apr 29 '25 14:04 echarlaix

@openvino-dev-samples looks like you need to add qwen3 and qwen3-moe to EXPECTED_NUM_SDPA

https://github.com/huggingface/optimum-intel/blob/f53b878b98f7680902e83f869767dc62d69038ac/tests/openvino/test_modeling.py#L1153

to give the expected number of SDPA to fix the following tests :

FAILED tests/openvino/test_modeling.py::OVModelForCausalLMIntegrationTest::test_compare_to_transformers_61_qwen3 - AssertionError: 0 != 2 : Expected number of SDPA 0, while model contains 2
FAILED tests/openvino/test_modeling.py::OVModelForCausalLMIntegrationTest::test_compare_to_transformers_62_qwen3_moe - AssertionError: 0 != 2 : Expected number of SDPA 0, while model contains 2

done

openvino-dev-samples avatar Apr 29 '25 15:04 openvino-dev-samples

thanks! will merge once the tests pass

echarlaix avatar Apr 29 '25 15:04 echarlaix