Custom errors and BatchSizeError
# What does this PR do?
The PR addresses the issue #12789.
I have added a file `custom_exceptions.py` holding a class instance to be used by `modeling_gpt2.py` to replace the assert based error with suitable exception based error.
We can add other errors as well to address the type of error happening.

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/master/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/master/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?
- @willfrey 
- @sgugger 
- Anyone in the community is free to review the PR once the tests have passed.
Just adding a best practice note: You want to inherit from `Exception` and not `BaseException`.

https://docs.python.org/3/library/exceptions.html
> The built-in exception classes can be subclassed to define new exceptions; programmers are encouraged to derive new exceptions from the Exception class or one of its subclasses, and not from BaseException. More information on defining exceptions is available in the Python Tutorial under User-defined Exceptions.

IMO, I'd say that this could be a [ValueError](https://docs.python.org/3/library/exceptions.html#ValueError)

But that's just my opinion. If the core team has an opinion on the matter, listen to them :)<|||||>> Just adding a best practice note: You want to inherit from `Exception` and not `BaseException`.
> 
> https://docs.python.org/3/library/exceptions.html
> 
> > The built-in exception classes can be subclassed to define new exceptions; programmers are encouraged to derive new exceptions from the Exception class or one of its subclasses, and not from BaseException. More information on defining exceptions is available in the Python Tutorial under User-defined Exceptions.
> 
> IMO, I'd say that this could be a [ValueError](https://docs.python.org/3/library/exceptions.html#ValueError)
> 
> But that's just my opinion. If the core team has an opinion on the matter, listen to them :)

The reason behind using Custom Exception is to help users know what's the error from their side is, BatchSizeError sounds more clear and directly addresses that the problem is with the batch size.<|||||>You should still inherit from `Exception` and not `BaseException`, per the official Python docs

https://docs.python.org/3/library/exceptions.html#BaseException
>The base class for all built-in exceptions. It is not meant to be directly inherited by user-defined classes (for that, use Exception). If str() is called on an instance of this class, the representation of the argument(s) to the instance are returned, or the empty string when there were no arguments.

Inheriting from BaseException can cause problems with having KeyboardInterrupt exceptions getting clobbered and having programs hang.<|||||>> You should still inherit from `Exception` and not `BaseException`, per the official Python docs
> 
> https://docs.python.org/3/library/exceptions.html#BaseException
> 
> > The base class for all built-in exceptions. It is not meant to be directly inherited by user-defined classes (for that, use Exception). If str() is called on an instance of this class, the representation of the argument(s) to the instance are returned, or the empty string when there were no arguments.
> 
> Inheriting from BaseException can cause problems with having KeyboardInterrupt exceptions getting clobbered and having programs hang.

Yes, I have changed that. 🤝
`BaseException` -> `Exception`
<|||||>Ok, I am using `ValueError` and made all other changes as well. Please go through it and let me know if there's anything else that is needed. @LysandreJik <|||||>Thanks, @LysandreJik. :)