[ZK Lab] #2: Platform - Hugging Face
Hugging Face
Goal
Hugging Face Hub is building the largest collection of models, datasets and metrics in order to democratize and advance AI for everyone.
Repository
The Hugging Face Hub hosts Git-based repositories which are storage spaces that can contain all your files.
The Hub currently hosts three different repo types:
- models
- datasets
- Spaces, which are ML demo apps
These repositories have multiple advantages over other hosting solutions:
- versioning
- commit history and diffs
- branches
On top of that, Hugging Face Hub repositories have many other advantages, for instance for models:
- Model repos provide useful metadata about their tasks, languages, metrics, etc.
- Anyone can play with the model directly in the browser!
- Training metrics charts are displayed if the repository contains TensorBoard traces.
- An API is provided to use the models in production settings.
- Over 10 frameworks such as Transformers, Asteroid and ESPnet support using models from the Hugging Face Hub.
widget
Many model repos have a widget that allows anyone to do inference directly in the browser.
Some examples:
- Named Entity Recognition using spaCy[https://spacy.io/].
- Image Classification using Transformers.
- Text to Speech using ESPnet.
- Sentence Similarity using Sentence Transformers.
You can try out all the widgets here.
Inference API
The Inference API allows you to send HTTP requests to models in the Hugging Face Hub. The Inference API is 2x to 10x faster than the widgets.
Explore Hugging Face Hub
Model’s Type of Inference API and Widget
pipeline_tag
: determine which pipeline and widget to displayconfig.json
: transformers