Enable input grad for gradient checkpointing in `train_lora`
diff --git a/fastchat/train/train_lora.py b/fastchat/train/train_lora.py
index ac52f81dc0..978ca4ec3d 100644
--- a/fastchat/train/train_lora.py
+++ b/fastchat/train/train_lora.py
@@ -116,12 +116,7 @@ def train():
         model.print_trainable_parameters()
 
     if training_args.gradient_checkpointing:
-        logging.warning(
-            "gradient checkpointing with lora makes requires_grad "
-            "incorrect and needs a monkey patch in Trainer or the "
-            "wrapped model's forward. ref: "
-            "https://github.com/lm-sys/FastChat/pull/138#issuecomment-1509172198"
-        )
+        model.enable_input_require_grads()
 
     tokenizer = transformers.AutoTokenizer.from_pretrained(
         model_args.model_name_or_path,

## Why are these changes needed?
Adds the monkey patch needed to run gradient checkpointing with LoRA. More info about the function can be found [here](https://github.com/huggingface/transformers/blob/f67dac97bdc63874f2288546b3fa87e69d2ea1c8/src/transformers/modeling_utils.py#L1186)

## Related issue number (if applicable)

Fixes #581 

## Checks

- [x] I've run `format.sh` to lint the changes in this PR.
- [x] I've included any doc changes needed.
- [ ] I've made sure the relevant tests are passing (if applicable).
