Skip to content

Commit

Permalink
support glm edge (#1089)
Browse files Browse the repository at this point in the history
* add support glm-egde models

* update models list
  • Loading branch information
eaidova authored Dec 26, 2024
1 parent 48e72ef commit 8a56275
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/openvino/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Here is the list of the supported architectures :
- Falcon
- Flaubert
- GLM-4
- GLM-Edge
- GPT-2
- GPT-BigCode
- GPT-J
Expand Down
15 changes: 15 additions & 0 deletions optimum/exporters/openvino/model_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions tests/openvino/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
"exaone",
"mistral-nemo",
"minicpm3",
"glm",
)

# gptq and awq install disabled for windows test environment
Expand Down
1 change: 1 addition & 0 deletions tests/openvino/utils_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8a56275

Please sign in to comment.