Skip to content

Commit 8e44646

Browse files
committed
xglm
1 parent 9c94e92 commit 8e44646

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

optimum/exporters/openvino/model_configs.py

+10
Original file line numberDiff line numberDiff line change
@@ -639,3 +639,13 @@ class GPTNeoxJapaneseOpenVINOConfig(TextDecoderOnnxConfig):
639639
)
640640
class CohereOpenVINOConfig(LlamaOpenVINOConfig):
641641
pass
642+
643+
644+
@register_in_tasks_manager(
645+
"xglm",
646+
*["text-generation", "text-generation-with-past"],
647+
library_name="transformers"
648+
)
649+
class XGLMConfig(TextDecoderWithPositionIdsOnnxConfig):
650+
DEFAULT_ONNX_OPSET = 13
651+
NORMALIZED_CONFIG_CLASS = NormalizedTextConfig.with_args(num_attention_heads="attention_heads", hidden_size="d_model")

tests/openvino/test_modeling.py

+1
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ class OVModelForCausalLMIntegrationTest(unittest.TestCase):
556556
"biogpt",
557557
"gpt_neox_japanese",
558558
"cohere",
559+
"xglm"
559560
)
560561
GENERATION_LENGTH = 100
561562
REMOTE_CODE_MODELS = (

tests/openvino/utils_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"whisper": "openai/whisper-tiny.en",
120120
"xlm": "hf-internal-testing/tiny-random-xlm",
121121
"xlm_roberta": "hf-internal-testing/tiny-xlm-roberta",
122+
"xglm": "hf-internal-testing/tiny-random-XGLMForCausalLM"
122123
}
123124

124125

0 commit comments

Comments
 (0)