diff --git a/docs/source/openvino/models.mdx b/docs/source/openvino/models.mdx index 6b73b7bde..b9fb24840 100644 --- a/docs/source/openvino/models.mdx +++ b/docs/source/openvino/models.mdx @@ -49,6 +49,7 @@ Here is the list of the supported architectures : - Falcon - Flaubert - GLM-4 +- GLM-Edge - GPT-2 - GPT-BigCode - GPT-J diff --git a/optimum/exporters/openvino/model_configs.py b/optimum/exporters/openvino/model_configs.py index aca235986..e52d4a3de 100644 --- a/optimum/exporters/openvino/model_configs.py +++ b/optimum/exporters/openvino/model_configs.py @@ -2519,3 +2519,18 @@ def outputs(self) -> Dict[str, Dict[int, str]]: if self._behavior in [Qwen2VLConfigBehavior.VISION_EMBEDDINGS, Qwen2VLConfigBehavior.VISION_EMBEDDINGS_MERGER]: return {"last_hidden_state": {0: "seq_len"}} return {} + + +@register_in_tasks_manager( + "glm", + *[ + "feature-extraction", + "feature-extraction-with-past", + "text-generation", + "text-generation-with-past", + "text-classification", + ], + library_name="transformers", +) +class GLMOpenVINOConfig(LlamaOpenVINOConfig): + MIN_TRANSFORMERS_VERSION = "4.46.0" diff --git a/tests/openvino/test_modeling.py b/tests/openvino/test_modeling.py index 0f166a635..f9235baae 100644 --- a/tests/openvino/test_modeling.py +++ b/tests/openvino/test_modeling.py @@ -915,6 +915,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase): "exaone", "mistral-nemo", "minicpm3", + "glm", ) # gptq and awq install disabled for windows test environment diff --git a/tests/openvino/utils_tests.py b/tests/openvino/utils_tests.py index 2011e11f0..02b81bfdc 100644 --- a/tests/openvino/utils_tests.py +++ b/tests/openvino/utils_tests.py @@ -160,6 +160,7 @@ "xglm": "hf-internal-testing/tiny-random-XGLMForCausalLM", "xverse": "katuni4ka/tiny-random-xverse", "glm4": "katuni4ka/tiny-random-glm4", + "glm": "katuni4ka/tiny-random-glm-edge", "open-clip": "hf-internal-testing/tiny-open-clip-model", "open-clip-ov": "zofinka/tiny-open-clip-model", "st-bert": "sentence-transformers/all-MiniLM-L6-v2",