torch num_samples=0 error on XLMnet @ run_language_modeling.py
# 🐛 Bug
While finetuning a language model on an XLNET:

```
python transformers/examples/run_language_modeling.py \
    --output_dir=lms/xlnet_custom \
    --model_type=xlnet \
    --model_name_or_path=xlnet-base-cased \
    --do_train \
    --train_data_file=$TRAIN_FILE \
    --per_gpu_train_batch_size 1 \
```

at the step after the features are produced, I get the error:

```
Traceback (most recent call last):
  File "transformers/examples/run_language_modeling.py", line 284, in <module>
    main()
  File "transformers/examples/run_language_modeling.py", line 254, in main
    trainer.train(model_path=model_path)
  File "/home/ysig/miniconda3/envs/hug/lib/python3.7/site-packages/transformers/trainer.py", line 218, in train
    train_dataloader = self.get_train_dataloader()
  File "/home/ysig/miniconda3/envs/hug/lib/python3.7/site-packages/transformers/trainer.py", line 160, in get_train_dataloader
    RandomSampler(self.train_dataset) if self.args.local_rank == -1 else DistributedSampler(self.train_dataset)
  File "/home/ysig/miniconda3/envs/hug/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 94, in __init__
    "value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0

```

My text is a raw text of the size of MBs.

I am running this on a CUDA 10.2 in a python 3.7.6 conda environment with a torch version of 1.5.0.

Is there something I am possibly doing wrong?

Hi! Are you using a multi-GPU setup ?<|||||>No I am running it on a single GPU.<|||||>Several other threads discuss this issue: 
 - Either your datasets are too small:  https://github.com/kaushaltrivedi/fast-bert/issues/181#issuecomment-596462172 
 - Or you haven't set `--block_size`:  https://github.com/huggingface/transformers/issues/2380#issuecomment-572762207 <|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
