Skip to content

Commit b375a5c

Browse files
committed
merge main in branch
2 parents 5f9b1c4 + 079d4b4 commit b375a5c

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

optimum/intel/openvino/modeling_decoder.py

-21
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,6 @@
7070
```
7171
"""
7272

73-
_SUPPORTED_ARCHITECTURES = {
74-
"bart",
75-
"blenderbot",
76-
"blenderbot-small",
77-
"bloom",
78-
"codegen",
79-
"gpt2",
80-
"gpt-bigcode",
81-
"gpt-neo",
82-
"gpt-neox",
83-
"llama",
84-
"marian",
85-
"opt",
86-
"pegasus",
87-
}
88-
8973

9074
@add_start_docstrings(
9175
"""
@@ -247,11 +231,6 @@ def _from_transformers(
247231
quantization_config: Optional[Union[OVWeightQuantizationConfig, Dict]] = None,
248232
**kwargs,
249233
):
250-
if config.model_type.replace("_", "-") not in _SUPPORTED_ARCHITECTURES:
251-
logger.warning(
252-
f"This architecture : {config.model_type} was not validated, only :{', '.join(_SUPPORTED_ARCHITECTURES)} architectures were "
253-
"validated, use at your own risk."
254-
)
255234
save_dir = TemporaryDirectory()
256235
save_dir_path = Path(save_dir.name)
257236

tests/openvino/test_modeling.py

+2
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
502502
"qwen2",
503503
"stablelm",
504504
"starcoder2",
505+
"phi",
505506
)
506507
GENERATION_LENGTH = 100
507508
IS_SUPPORT_STATEFUL = is_openvino_version(">=", "2023.3")
@@ -532,6 +533,7 @@ def test_compare_to_transformers(self, model_arch):
532533
self.assertEqual(
533534
ov_model.stateful, self.IS_SUPPORT_STATEFUL and ov_model.config.model_type not in not_stateful
534535
)
536+
set_seed(SEED)
535537
transformers_model = AutoModelForCausalLM.from_pretrained(model_id, **model_kwargs)
536538
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=model_arch in self.REMOTE_CODE_MODELS)
537539
if model_arch == "qwen":

tests/openvino/utils_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"nystromformer": "hf-internal-testing/tiny-random-NystromformerModel",
7171
"pegasus": "hf-internal-testing/tiny-random-pegasus",
7272
"pix2struct": "fxmarty/pix2struct-tiny-random",
73+
"phi": "hf-internal-testing/tiny-random-PhiForCausalLM",
7374
"poolformer": "hf-internal-testing/tiny-random-PoolFormerModel",
7475
"qwen": "katuni4ka/tiny-random-qwen",
7576
"qwen2": "Qwen/Qwen1.5-0.5B",

0 commit comments

Comments
 (0)