🚀 [Feature Request] Add self-contained browsable examples/notebooks in the docs 
Author: patil-suraj
Pull request: no
Labels: name: wontfix

# 🚀 Feature request

<!-- A clear and concise description of the feature proposal.
     Please provide a link to the paper and code in case they exist. -->

## Motivation and feature request
Recently I'm seeing lots of beginner-level issues asking help on how to fine-tune a particular model for a particular task, how to use already trained model from the hub or how to do inference for certain task, what some parameters mean etc. See #4744, #4406, #4677, #4639

While the examples in the /examples directory are really awesome, it seems that they are bit hard to understand from a beginner's perspective. Also even though there is notebooks section, some people still seem to not find it. And as the library is getting very popular lots of students/beginners are starting their NLP journey with Transformers.

So IMO it would be really awesome if we have self-contained end-to-end browsable notebook examples with clear task and model descriptions  in the docs itself (like the ones in pytorch and keras docs)



<!-- Please outline the motivation for the proposal. Is your feature request
     related to a problem? e.g., I'm always frustrated when [...]. If this is related
     to another GitHub issue, please link here too. -->

## Your contribution
I have few notebooks in community notebooks section and I would be happy to contribute more examples with clear descriptions  for individual task with both fine-tuning and inference details.

@patrickvonplaten @julien-c 

Comments:
Good point! I think we could definitely give more links to the community notebooks and the docs in general to people so that users check the resources first before opening an issue...what are your thoughts on this @sgugger @julien-c @thomwolf ?

I agree we could add links to example notebooks in the docs, either community or from the notebooks folder in the repo. The same way there is a tips section, there could be a Getting started section with notebooks that illustrate one or several tasks the model is good at. 

Let me add something from a transformers-beginner's point of view: I read the example scripts and notebooks, and what makes them harder to understand, is that most of them use some kind of downloaded pre-made datasets like GLUE, with custom dataloaders and everything. Unless I'm missing something, it makes questions like "How to prepare my data for sequence classification fine-tuning with transformers.Trainer ?" hard to answer, and that might prevent many people from training their own models 

@klasocki,

Thanks, that's very valuable feedback! We are actually planning to replace all those custom data preprocessing steps with the `nlp` library which should be easier to understand. Here is an example how it can be used:

https://github.com/patrickvonplaten/notebooks/blob/master/How_to_evaluate_Longformer_on_TriviaQA_using_NLP.ipynb

Regarding the specific task of sequence classification, it would definitely be nice to have that in the examples as well! Also cc @julien-c and @thomwolf here 

@patrickvonplaten 
Thank you! But I think you forgot to attach the example, at least I can't see it 😄 

> @patrickvonplaten
> Thank you! But I think you forgot to attach the example, at least I can't see it

True, sorry :D Editing the comment above...

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.


Side note since this pops up in my notifications: all the tutorials in the doc now have associated notebooks.