Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Cheat sheet · Specialise

Hugging Face cheat sheet

Opens with credits

A quick-revision book on the Hugging Face ecosystem for engineers who use open models from Python. It moves from finding a model on the Hub to running it, preparing data, fine-tuning it cheaply, evaluating it, serving it and sharing the result.

Curated by Tauseef Fayyaz8 chapters51 concepts75 glossary terms

Chapters

8 chapters · 51 concepts

  1. 1The HubThe shared home for models, datasets and demo apps, and the account and tooling you need to use it from code.7 concepts
  2. 2Running models with transformersThe transformers library: from a one-line pipeline to loading the tokeniser and model yourself and generating text.7 concepts
  3. TokenisersHow text becomes the integer ids a model reads, and the settings that matter when you batch it.6 conceptsOpens with credits
  4. DatasetsThe datasets library loads data from the Hub or local files into fast, memory-mapped tables and transforms it in batches.7 conceptsOpens with credits
  5. Fine-tuning with TrainerTraining a pretrained model further on your own labelled data with the high-level Trainer API.6 conceptsOpens with credits
  6. LoRA, quantisation and accelerateFitting fine-tuning and inference of large models onto modest hardware, and scaling the same code up.6 conceptsOpens with credits
  7. Evaluation and embeddingsMeasuring whether a model is good enough, and turning text into vectors for search and similarity.6 conceptsOpens with credits
  8. Inference and sharingRunning models without managing GPUs, serving them yourself, and publishing what you trained.6 conceptsOpens with credits
  9. 9Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.75 terms

About this sheet

The Hub, transformers, tokenisers, datasets, fine-tuning, LoRA, quantisation, inference and embeddings with the Hugging Face libraries.

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com