code: def create_peft_config(model):
      from peft import (
          get_peft_model,
          LoraConfig,
          TaskType,
          prepare_model_for_int8_training,
      )
  
      peft_config = LoraConfig(
          task_type=TaskType.CAUSAL_LM,
          inference_mode=False,
          r=8,
          lora_alpha=32,
          lora_dropout=0.05,
          target_modules=["query_key_value"],
      )
  
      # prepare int-8 model for training
      model = prepare_model_for_int8_training(model)
      model = get_peft_model(model, peft_config)
      model.print_trainable_parameters()
      return model
  
file_path: hf-notebooks/sagemaker/24_train_bloom_peft_lora/scripts/run_clm.py
imports: import os
  import argparse
  from transformers import AutoModelForCausalLM, AutoTokenizer, set_seed, default_data_collator
  from datasets import load_from_disk
  import torch
  from transformers import Trainer, TrainingArguments
  from peft import PeftConfig, PeftModel
  import shutil
label_desc: Use image node_id 2 for calling a global function with example usage: create_peft_config(model) and returns: model