code: def create_peft_config(model, gradient_checkpointing=True):
      from peft import (
          get_peft_model,
          LoraConfig,
          TaskType,
          prepare_model_for_kbit_training,
      )
  
      peft_config = LoraConfig(
          r=64,
          lora_alpha=16,
          target_modules=[
              "query_key_value",
              "dense",
              "dense_h_to_4h",
              "dense_4h_to_h",
          ],
          lora_dropout=0.1,
          bias="none",
          task_type=TaskType.CAUSAL_LM,
      )
  
      # prepare int-4 model for training
      model = prepare_model_for_kbit_training(model)
      if gradient_checkpointing:
          model.gradient_checkpointing_enable()
      model = get_peft_model(model, peft_config)
      model.print_trainable_parameters()
      return model
  
file_path: hf-notebooks/sagemaker/28_train_llms_with_qlora/scripts/run_clm.py
imports: import os
  import argparse
  from transformers import AutoModelForCausalLM, AutoTokenizer, set_seed, default_data_collator, BitsAndBytesConfig, Trainer, TrainingArguments
  from datasets import load_from_disk
  import torch
  from peft import PeftConfig, PeftModel
label_desc: Use image node_id 2 for calling a global function with example usage: create_peft_config(model, gradient_checkpointing) and returns: model