Skip to main content

NLP tasks

Task guides show end-to-end fine-tuning recipes for classic NLP.

Adapted for this playbook from the 🤗 Transformers documentation by Hugging Face. Official page: https://huggingface.co/docs/transformers/tasks/sequence_classification. Images © Hugging Face (documentation-images) unless noted. This is not a substitute for the upstream docs — verify against the current version.

Covers Hugging Face pages: tasks/sequence_classification, token_classification, question_answering, language_modeling, masked_language_modeling, translation, summarization, multiple_choice, prompting

Task guide imagery (beignets example) — Source: Hugging Face

Source: Hugging Face documentation images.

TaskOfficial guide
Text classificationsequence_classification
Token classificationtoken_classification
Question answeringquestion_answering
Causal LMlanguage_modeling
Masked LMmasked_language_modeling
Translationtranslation
Summarisationsummarization
Multiple choicemultiple_choice
Promptingprompting

Pattern shared by guides​

  1. Load dataset → tokenize
  2. Load AutoModelFor… with correct head
  3. Train with Trainer
  4. Evaluate with task metrics
  5. Push to Hub

Try BERT for encoder tasks and T5 for seq2seq.

Discussion

Comments​

Share feedback or questions about this page. No account required.

Loading comments…