code: def print_trainable_parameters(model):
      """
      Prints the number of trainable parameters in the model.
      """
      trainable_params = 0
      all_param = 0
      for _, param in model.named_parameters():
          all_param += param.numel()
          if param.requires_grad:
              trainable_params += param.numel()
      print(
          f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}"
      )
  
file_path: trl/examples/research_projects/stack_llama_2/scripts/sft_llama2.py
imports: import os
  from dataclasses import dataclass, field
  from typing import Optional
  import torch
  from accelerate import Accelerator
  from datasets import load_dataset
  from peft import AutoPeftModelForCausalLM, LoraConfig
  from tqdm import tqdm
  from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments
  from trl import SFTTrainer
  from trl.import_utils import is_npu_available, is_xpu_available
  from trl.trainer import ConstantLengthDataset
label_desc: Use image node_id 2 for calling a global function with example usage: print_trainable_parameters(model) without return types