|
37 | 37 | HeliumOnnxConfig, |
38 | 38 | InternLM2OnnxConfig, |
39 | 39 | MPTOnnxConfig, |
| 40 | + NemotronOnnxConfig, |
40 | 41 | Olmo2OnnxConfig, |
41 | 42 | OlmoOnnxConfig, |
42 | 43 | OPTOnnxConfig, |
@@ -109,6 +110,8 @@ class ORTModelForCausalLMIntegrationTest(ORTModelTestMixin): |
109 | 110 | SUPPORTED_ARCHITECTURES.append("gemma") |
110 | 111 | if is_transformers_version(">=", str(MPTOnnxConfig.MIN_TRANSFORMERS_VERSION)): |
111 | 112 | SUPPORTED_ARCHITECTURES.append("mpt") |
| 113 | + if is_transformers_version(">=", str(NemotronOnnxConfig.MIN_TRANSFORMERS_VERSION)): |
| 114 | + SUPPORTED_ARCHITECTURES.append("nemotron") |
112 | 115 | if is_transformers_version(">=", str(GraniteOnnxConfig.MIN_TRANSFORMERS_VERSION)): |
113 | 116 | SUPPORTED_ARCHITECTURES.append("granite") |
114 | 117 | if is_transformers_version(">=", str(HeliumOnnxConfig.MIN_TRANSFORMERS_VERSION)): |
@@ -199,6 +202,15 @@ def test_find_untested_architectures(self): |
199 | 202 | transformers_architectures = set(CONFIG_MAPPING_NAMES.keys()) |
200 | 203 | onnx_architectures = set(TasksManager.get_supported_model_type_for_task(task=self.TASK, exporter="onnx")) |
201 | 204 | supported_architectures = onnx_architectures & transformers_architectures |
| 205 | + |
| 206 | + if "nemotron" in supported_architectures and is_transformers_version( |
| 207 | + "<=", str(NemotronOnnxConfig.MIN_TRANSFORMERS_VERSION) |
| 208 | + ): |
| 209 | + # Nemotron was introduced in Transformers 4.44.0, but it has some issues. Specifically, it did not properly handle legacy cache formats (Lists/Cache), and it also did not return past_key_values when use_cache=True. |
| 210 | + # We are using its 4.48.0 version, which is more stable. |
| 211 | + # So we remove it from the list of supported architectures in the versions before 4.48.0. |
| 212 | + supported_architectures.remove("nemotron") |
| 213 | + |
202 | 214 | untested_architectures = supported_architectures - tested_architectures |
203 | 215 |
|
204 | 216 | if len(untested_architectures) > 0: |
|
0 commit comments