Skip to content

Commit 8a56275

Browse files
authored
support glm edge (#1089)
* add support glm-egde models * update models list
1 parent 48e72ef commit 8a56275

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

docs/source/openvino/models.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Here is the list of the supported architectures :
4949
- Falcon
5050
- Flaubert
5151
- GLM-4
52+
- GLM-Edge
5253
- GPT-2
5354
- GPT-BigCode
5455
- GPT-J

optimum/exporters/openvino/model_configs.py

+15
Original file line numberDiff line numberDiff line change
@@ -2519,3 +2519,18 @@ def outputs(self) -> Dict[str, Dict[int, str]]:
25192519
if self._behavior in [Qwen2VLConfigBehavior.VISION_EMBEDDINGS, Qwen2VLConfigBehavior.VISION_EMBEDDINGS_MERGER]:
25202520
return {"last_hidden_state": {0: "seq_len"}}
25212521
return {}
2522+
2523+
2524+
@register_in_tasks_manager(
2525+
"glm",
2526+
*[
2527+
"feature-extraction",
2528+
"feature-extraction-with-past",
2529+
"text-generation",
2530+
"text-generation-with-past",
2531+
"text-classification",
2532+
],
2533+
library_name="transformers",
2534+
)
2535+
class GLMOpenVINOConfig(LlamaOpenVINOConfig):
2536+
MIN_TRANSFORMERS_VERSION = "4.46.0"

tests/openvino/test_modeling.py

+1
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
915915
"exaone",
916916
"mistral-nemo",
917917
"minicpm3",
918+
"glm",
918919
)
919920

920921
# gptq and awq install disabled for windows test environment

tests/openvino/utils_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@
160160
"xglm": "hf-internal-testing/tiny-random-XGLMForCausalLM",
161161
"xverse": "katuni4ka/tiny-random-xverse",
162162
"glm4": "katuni4ka/tiny-random-glm4",
163+
"glm": "katuni4ka/tiny-random-glm-edge",
163164
"open-clip": "hf-internal-testing/tiny-open-clip-model",
164165
"open-clip-ov": "zofinka/tiny-open-clip-model",
165166
"st-bert": "sentence-transformers/all-MiniLM-L6-v2",

0 commit comments

Comments
 (0)