code: def print_trainable_parameters(model):
      trainable_params = 0
      all_param = 0
      for _, param in model.named_parameters():
          num_params = param.numel()
          if num_params == 0 and hasattr(param, "ds_numel"):
              num_params = param.ds_numel
  
          all_param += num_params
          if param.requires_grad:
              trainable_params += num_params
      print(
          f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}"
      )
  
file_path: DeepKE/example/llm/InstructKGC/src/finetuning_pt.py
imports: import argparse
  import os
  from shutil import copy
  import json
  import torch
  from torch.nn.utils.rnn import pad_sequence
  from torch.utils.data import Dataset, RandomSampler, DataLoader
  import deepspeed
  from transformers import AutoConfig, AutoTokenizer, AutoModel
label_desc: Use image node_id 2 for calling a global function with example usage: print_trainable_parameters(model) without return types