code: def test_neftune_is_disabled_in_inference():
      device = torch.device(
          "cuda" if torch.cuda.is_available() else "cpu"
      )
      cfg = ConfigProblemBase(
          llm_backbone="MaxJeblick/llama2-0b-unit-test"
      )
      cfg.architecture.backbone_dtype = "float32"
      model = Model(cfg).eval().to(device)
  
      input_batch = {
          "input_ids": torch.randint(
              0,
              1000,
              (1, 10),
          ).to(device),
          "attention_mask": torch.ones(1, 10).to(device),
      }
  
      with torch.no_grad():
          outputs = model.backbone(**input_batch)
  
      activate_neftune(model, neftune_noise_alpha=10)
      assert (
          model.backbone.get_input_embeddings().neftune_noise_alpha
          == 10
      )
  
      with torch.no_grad():
          outputs_after_neftune = model.backbone(**input_batch)
  
      assert torch.allclose(
          outputs["logits"], outputs_after_neftune["logits"]
      )
  
      # state dict does not contain neftune noise
      assert [
          key for key in model.state_dict() if "neftune" in key
      ] == []
  
imports: import torch
  from llm_studio.python_configs.text_causal_language_modeling_config import ConfigProblemBase
  from llm_studio.src.models.text_causal_language_modeling_model import Model
  from llm_studio.src.utils.modeling_utils import TokenStoppingCriteria, activate_neftune
label_desc: Use image node_id 2 for calling a global function with example usage: test_neftune_is_disabled_in_inference() without return types