Regarding GPU use for LM
# ❓ Questions & Help

<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,
     new models and benchmarks, and migration questions. For all other questions,
     we direct you to the Hugging Face forum: https://discuss.huggingface.co/ .
     You can also try Stack Overflow (SO) where a whole community of PyTorch and
     Tensorflow enthusiast can help you out. In this case, make sure to tag your
     question with the right deep learning framework as well as the
     huggingface-transformers tag: 
     https://stackoverflow.com/questions/tagged/huggingface-transformers 
     -->

## Details
<!-- Hi,
I am running example given in README.md of language_modeling using following command:
export TRAIN_FILE=/path/to/dataset/wiki.train.raw
export TEST_FILE=/path/to/dataset/wiki.test.raw

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

It has started training but it is not using GPU (TITAN X) at all, when I see throug nvidia-smi command 
I am new to this So Can you please let me know if I'm missing anything here.

Thanks.-->

<!-- You should first ask your question on the forum or SO, and only if
     you didn't get an answer ask it here on GitHub. -->
**A link to original question on the forum/Stack Overflow**:
 Hi,
I am running example given in README.md of language_modeling using following command:
export TRAIN_FILE=/path/to/dataset/wiki.train.raw
export TEST_FILE=/path/to/dataset/wiki.test.raw

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

It has started training but it is not using GPU (TITAN X) at all, when I see throug nvidia-smi command 
I am new to this So Can you please let me know if I'm missing anything here.

Thanks.<|||||>This is probably because torch doesn't detect that you have a GPU. Can you try launching a python console and running the following?

```py
import torch
print(torch.cuda.is_available())
```<|||||>Yeah, I also found out about it later after posting this issue.
I had to install cuda 9.1 and reboot the server then it worked.
Thank You for your reply :)