# Hugging Face

Hugging Face, Inc. is an American company incorporated under the Delaware General Corporation Law and based in New York City that develops computation tools for building applications using machine learning. It is most notable for its transformers library built for natural language processing applications and its platform that allows users to share machine learning models and datasets and showcase their work.

## History

The company was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf in New York City, originally as a company that developed a chatbot app targeted at teenagers. The company was named after the U+1F917 🤗 HUGGING FACE emoji. After open sourcing the model behind the chatbot, the company pivoted to focus on being a platform for machine learning.
In March 2021, Hugging Face raised US$40 million in a Series B funding round.
On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM, a multilingual large language model with 176 billion parameters.
In December 2022, the company acquired Gradio, an open source library built for developing machine learning applications in Python.
On May 5, 2022, the company announced its Series C funding round led by Coatue and Sequoia. The company received a $2 billion valuation.
On August 3, 2022, the company announced the Private Hub, an enterprise version of its public Hugging Face Hub that supports SaaS or on-premises deployment.
In February 2023, the company announced partnership with Amazon Web Services (AWS) which would allow Hugging Face's products available to AWS customers to use them as the building blocks for their custom applications. The company also said the next generation of BLOOM will be run on Trainium, a proprietary machine learning chip created by AWS.
In August 2023, the company announced that it raised $235 million in a Series D funding, at a $4.5 billion valuation. The funding was led by Salesforce, and notable participation came from Google, Amazon, Nvidia, AMD, Intel, IBM, and Qualcomm.
In June 2024, the company announced, along with Meta and Scaleway, their launch of a new AI accelerator program for European startups. This initiative aims to help startups integrate open foundation models into their products, accelerating the EU AI ecosystem. The program, based at STATION F in Paris, will run from September 2024 to February 2025. Selected startups will receive mentoring, access to AI models and tools, and Scaleway’s computing power.
On September 23, 2024, to further the International Decade of Indigenous Languages, Hugging Face teamed up with Meta and UNESCO to launch a new online language translator built on Meta's No Language Left Behind open-source AI model, enabling free text translation across 200 languages, including many low-resource languages.

## Services and technologies
### Transformers Library

The Transformers library is a Python package that contains open-source implementations of transformer models for text, image, and audio tasks. It is compatible with the PyTorch, TensorFlow and JAX deep learning libraries and includes implementations of notable models like BERT and GPT-2. The library was originally called "pytorch-pretrained-bert" which was then renamed to "pytorch-transformers" and finally "transformers."
A javascript version (transformers.js) have also been developed, allowing to run models directly in the browser.

### Hugging Face Hub

The Hugging Face Hub is a platform (centralized web service) for hosting:
* Git-based code repositories, including discussions and pull requests for projects.
* models, also with Git-based version control;
* datasets, mainly in text, images, and audio;
* web applications ("spaces" and "widgets"), intended for small-scale demos of machine learning applications.
There are numerous pre-trained models that support common tasks in different modalities, such as:
* Natural Language Processing: text classification, named entity recognition, question answering, language modeling, summarization, translation, multiple choice, and text generation.
* Computer Vision: image classification, object detection, and segmentation.
* Audio: automatic speech recognition and audio classification.

### Other libraries

In addition to Transformers and the Hugging Face Hub, the Hugging Face ecosystem contains libraries for other tasks, such as dataset processing ("Datasets"), model evaluation ("Evaluate"), and machine learning demos ("Gradio").

### Safetensors

The safetensors format was developed around 2021 to solve problems with the pickle format in python. It was designed for saving and loading tensors. Compared to pickle format, it allows lazy loading, and avoids security problems. After a security audit, it became the default format in 2023.
The file format:
* size of the header: 8 bytes, an unsigned little-endian 64-bit integer.
* header: JSON UTF-8 string, formatted as {"TENSOR_NAME": {“dtype”: “F16”, “shape”: [1, 16, 256], “data_offsets”: [BEGIN, END]}, "NEXT_TENSOR_NAME": {…}, …}.
* file: a byte buffer containing the tensors.