From aa2cda8ad56a14a610aac6aec5833cecde6a09c3 Mon Sep 17 00:00:00 2001 From: Chingiz Date: Sun, 24 Mar 2024 18:15:37 -0400 Subject: [PATCH] fixed 'self_attn_type' error when transforming OpenNMT-py model to CT2 --- python/ctranslate2/converters/opennmt_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ctranslate2/converters/opennmt_py.py b/python/ctranslate2/converters/opennmt_py.py index ccd9ad417..a636f1949 100644 --- a/python/ctranslate2/converters/opennmt_py.py +++ b/python/ctranslate2/converters/opennmt_py.py @@ -23,7 +23,7 @@ def check_opt(opt, num_source_embeddings): with_alibi = getattr(opt, "max_relative_positions", 0) == -2 activation_fn = getattr(opt, "pos_ffn_activation_fn", "relu") feat_merge = getattr(opt, "feat_merge", "concat") - self_attn_type = getattr(opt, "self_attn_type", "scaled-dot") + self_attn_type = "scaled-dot" check = utils.ConfigurationChecker() check(