Hugging Face Summer 2021 Update

TL;DR

Hugging Face expanded its ecosystem in Summer 2021 by introducing Spaces for hosting ML demos, integrating TensorBoard and evaluation metrics into the Hub, and launching the Optimum library for hardware acceleration. These updates, alongside expanded support for JAX/Flax and new tokenizer-free models, aim to lower the barrier for deploying and sharing state-of-the-art machine learning models.

Hub Feature Enhancements

Spaces Beta

Spaces provides a free solution for hosting Machine Learning demo applications directly on user or organization profiles. It supports the Gradio and Streamlit SDKs, allowing users to deploy Python-based apps in minutes. Key capabilities include:

  • Secret management for secure deployments.
  • Custom requirements for dependency handling.
  • Direct management via GitHub repositories.

Model Visibility and Tracking

  • TensorBoard Integration: The Hub now automatically launches free TensorBoard instances for any repository containing TensorBoard traces, supporting both public and private repos.
  • Evaluation Metrics: Users can now list evaluation metrics in model cards under the model-index section. These metrics are automatically linked to the corresponding Papers With Code leaderboards for side-by-side community comparison.
  • Social Features: A "like" system has been implemented for models, datasets, and Spaces to facilitate community discovery.

Interactive Browser Widgets

There are now 18 widgets allowing users to test models in-browser. Recent additions include:

  • Sentence Transformers: Feature extraction and sentence similarity widgets.
  • Audio Classification: Support for language identification, street sound detection, command recognition, and speaker identification.
  • Computer Vision: Text-to-image, image classification, and object detection widgets (e.g., supporting Google's ViT and Facebook AI's DETR).
  • Structured Data: Early demo for Scikit-learn classification.

Open Source Library Updates

Transformers

The Transformers library reached 50,000 stars and 30 million downloads. Key updates include:

  • Framework Support: JAX/Flax is now the third supported framework with over 5,000 models on the Hub. TensorFlow examples have been reworked for better robustness and idiomatic usage.
  • Model Additions:
    • DETR: End-to-end object detection and image segmentation.
    • ByT5 and CANINE: Tokenizer-free models that operate directly on bytes or characters.
    • HuBERT: Advanced audio task performance for emotion and command recognition.
    • LayoutLMv2 and LayoutXLM: Models that parse document images by combining text, layout, and visual data.
    • BEiT: Self-supervised Vision Transformers.
    • RemBERT: A large multilingual Transformer outperforming XLM-R in zero-shot transfer.
    • Splinter: A few-shot QA model reaching ~73% F1 on SQuAD with only 128 examples.
  • Hub Integration: The Trainer API can now push configuration, model, and tokenizer files directly to the Hub during checkpoint saving. A new transformers.onnx module improves model exporting to ONNX.

Datasets

The Dataset Hub now hosts 1,400 public datasets. New highlights include Microsoft CodeXGlue for coding tasks, and large-scale datasets such as C4 and MC4. The library now supports JAX, parquet files, remote files, and expanded domains like Automatic Speech Recognition.

Ecosystem Integration

The Hub has expanded its partnership with other ML libraries via the huggingface_hub library:

  • spaCy: All canonical pipelines are available in the official spaCy organization and can be shared via a single command.
  • Sentence Transformers: Over 200 models are now available in the Hub.
  • Other Libraries: Integration for Adapter Transformers and Speechbrain models.

Enterprise and Production Solutions

Hardware Acceleration and Optimum

Hugging Face partnered with Intel, Qualcomm, and GraphCore to launch Optimum, an open-source ML optimization toolkit designed for production performance.

Deployment and Inference

  • Inference on SageMaker: A new integration with AWS allows users to deploy Transformers models in SageMaker using code snippets found directly on the Hub model pages.
  • AutoNLP: A no-code web interface now allows users to train, evaluate, and deploy Transformers models on their own data directly from a browser.
  • Inference API: New integrations include a VSCode extension for Python code comments, a Zapier connection for app automation (e.g., Slack alerts for Twitter mentions), and Google Sheets scripts for zero-shot classification.
  • Infinity: A coming-soon solution designed for high-efficiency deployment in private infrastructure, claiming 1ms latency for BERT-like models on GPU and 4-10ms on CPU.

Research and Community Initiatives

BigScience and Collaborative Training

  • BigScience: Completed the first large-scale training of a 13B English-only decoder model on Jean Zay, with a requested budget of 2.5 million GPU hours for the second phase.
  • DeDLOC: A collaborative training method developed with Yandex research that allows training large networks across accessible resources (e.g., Colab, Kaggle) without an HPC cluster. This was used to train sahajBERT, a Bengali language model.

Academic Contributions

  • NAACL Best Paper: The paper "How Many Data Points is a Prompt Worth?" received a Best Paper award, demonstrating that human-written prompts can replace thousands of supervised data points.
  • EMNLP Papers: Four papers were accepted, covering the Datasets community library, prompt-based finetuning heuristics, and block pruning for faster Transformers (yielding models 2.4x faster and 74% smaller than BERT on SQuAD).

Education

  • Hugging Face Course: Launched a free online course covering Transformers, Tokenizers, Datasets, Accelerate, and the Hub.
  • JAX/FLAX Sprint: A community event with 800 participants that produced over 170 models, 22 datasets, and 38 Spaces demos, including Dall-e mini, DietNerf, and CLIP RSIC.

Sources