chunk_content: adds a forward hook to the input embedding layer to calculate the gradients of the input hidden states
  enables gradient checkpointing for more memory-efficient training
  
  
  	Copied
  from peft import prepare_model_for_int8_training
  
  model = prepare_model_for_int8_training(model)
  Let’s also apply LoRA to the training to make it even more efficient. Load a LoraConfig and configure the following parameters:
  r, the dimension of the low-rank matrices
  lo