code: def test_check_llm_text_encoder_is_not_used_with_ecd():
      config = {
          "input_features": [
              {
                  "name": "Question",
                  "type": "text",
                  "encoder": {
                      "type": "auto_transformer",
                      "pretrained_model_name_or_path": "meta-llama/Llama-2-7b-hf",
                      "trainable": False,
                  },
                  "preprocessing": {"cache_encoder_embeddings": True},
              }
          ],
          "output_features": [{"name": "Answer", "type": "text"}],
      }
  
      with pytest.raises(ConfigValidationError) as excinfo:
          ModelConfig.from_dict(config)
  
      assert (
          str(excinfo.value)
          == "Please use the `model_type: llm` for text-to-text models."
      )
  
imports: import contextlib
  from typing import Any, Dict, List, Optional
  import pytest
  import yaml
  from ludwig.constants import COMBINER, TYPE
  from ludwig.error import ConfigValidationError
  from ludwig.schema.model_types.base import ModelConfig
  from tests.integration_tests.utils import binary_feature, text_feature
label_desc: Use image node_id 20 for calling a global function with example usage: test_check_llm_text_encoder_is_not_used_with_ecd() without return types