RuntimeError: CUDA out of memory. 
I'm trying to run run_language_modeling.py and fine-tune the GPT-2 model with my own text dataset with the following command:
%%bash
export TRAIN_FILE=Models/Data/train.txt
export TEST_FILE=Models/Data/valid.txt
export MODEL_NAME=gpt2
export OUTPUT_DIR=output

python run_language_modeling.py \
    --output_dir=output \
    --model_type=gpt2 \
    --model_name_or_path=gpt2 \
    --do_train \
    --train_data_file=$TRAIN_FILE \
    --do_eval \
    --eval_data_file=$TEST_FILE \
    --cache_dir=None


I am currently using the Colab environment to run the script on GPU but encountered the following error:
RuntimeError: CUDA out of memory. Tried to allocate 384.00 MiB (GPU 0; 15.90 GiB total capacity; 14.75 GiB already allocated; 225.81 MiB free; 14.81 GiB reserved in total by PyTorch)

I noticed that it might be possible to resolve this issue by changing the batch but am unsure how I can do this?
Would love any pointers available (  --train_batch_size 16  wasn't an option with this file)!
Thank you so much!
Found solution:
    --per_gpu_train_batch_size=1 \
I will be closing this issue now, thank you so much!
Sorry for the trouble!