Loading…

Hugging Face
AI platform and community providing machine learning models, datasets, libraries, and tools for building AI applications.
- 325 posts summarised
- latest
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
From their blog
Latest articles
Putting ethical principles at the core of the research lifecycle
Machine learning research risks introducing algorithmic biases, privacy violations, and malicious applications when ethical considerations are omitted from project lifecycles. To address these challenges, Hugging Face's multimodal learning group established an ethical charter at the inception of their multimodal project with input from ethics and governance experts. The charter defines content policies barring detrimental activities, the generation of personally identifiable information, and incautious applications in high-risk fields like medicine, law, and finance. Guiding values emphasize transparency, fairness through data and model bias reviews, self-critical curation, open reproducibility, and proper licensing attribution. Because ethical values like open data sharing and personal privacy can conflict, the team plans to iteratively evaluate trade-offs and track document revisions on GitHub.
An Introduction to Q-Learning Part 1
Value-based reinforcement learning centers on finding optimal policies indirectly through value functions. In these methods, practitioners define policy behavior manually, such as using greedy or epsilon-greedy policies, rather than training the policy directly. Value estimation relies on two primary formulations: the state-value function, which outputs expected returns from a state, and the action-value function, which evaluates state-action pairs. Because summing all future rewards across an entire trajectory is computationally demanding, algorithms adopt the Bellman equation alongside learning strategies like Monte Carlo or Temporal Difference (TD) learning. Monte Carlo updates value functions only after complete episodes using actual returns, whereas one-step TD learning bootstraps updates at each individual step using immediate rewards and discounted estimates of subsequent states.
Machine Learning Experts - Sasha Luccioni
Research scientist Sasha Luccioni discusses her work on evaluating the environmental, societal, and ethical impacts of machine learning models. Her research includes measuring and reducing artificial intelligence emissions through initiatives such as CodeCarbon, regional grid selection, and the BigScience carbon footprint working group. BigScience aims to make large language models transparent by curating multilingual datasets, assessing manufacturing and compute costs, and analyzing participant workloads. Luccioni also emphasizes expanding model evaluation criteria beyond standard accuracy metrics to encompass efficiency, emissions, and subset-level fairness across demographics and data features. Overall, these efforts aim to democratize artificial intelligence and encourage deliberate trade-offs between model performance and computational resource demands.
Announcing the Hugging Face Fellowship Program
Hugging Face announced the launch of the Hugging Face Fellowship Program to support and empower prominent contributors across the open-source machine learning ecosystem. The initiative provides selected fellows with personalized resources according to their project goals, including computing power, merchandise, and official recognition from Hugging Face. Candidate selection operates on an ongoing basis through nominations made by Hugging Face team members or existing fellows, evaluated primarily on past contributions toward democratizing machine learning. Eligible open-source activities span model releases on the Hub, documentation translations, library tooling improvements for frameworks like TensorFlow and Keras, and community hackathons. Participation does not constitute employment with Hugging Face, though the program serves as a platform to scale grassroots community impact across diverse machine learning domains.
Gradio 3.0 is Out!
Gradio 3.0 introduces a ground-up redesign of the Gradio library to improve machine learning demo development and browser performance. The frontend has been rebuilt using modern technologies such as Svelte, resulting in smaller payloads, faster page load times, and cleaner visual designs suitable for embedding in blog posts. Component updates include revamping the Dataframe component to support CSV drag-and-drop, introducing new UI elements like Gallery, and adding the TabbedInterface class to group demos under distinct tabs. Developers also gain access to Gradio Blocks, a low-level Python API enabling custom layouts, multi-step interfaces, dynamic component property modifications, and complex data flows. A competition called the Gradio Blocks Party has been organized through the end of May to encourage community adoption.
Director of Machine Learning Insights [Part 2: SaaS Edition]
Engineering directors across SaaS organizations share operational experiences regarding the integration, maintenance, and impact of machine learning systems. Deploying production ML introduces significant operational overhead beyond initial modeling, requiring teams to manage data drift, resolve siloed data sources, and adapt to vertical-specific domain shifts. Leaders emphasize that integrating ML effectively often requires prioritizing core business requirements and traditional ML techniques over newly released, complex algorithms. Allowing end users to incorporate domain knowledge and business controls directly into model interactions remains critical for trust and usability. Looking forward, these leaders anticipate substantial ML-driven operational improvements across enterprise workflows, cybersecurity threat detection, and connected healthcare infrastructure.
Student Ambassador Program’s call for applications is open!
Hugging Face launched its inaugural Student Ambassador Program to advance its mission of democratizing machine learning globally. The initiative aligns with the organization's overarching goal to teach machine learning to 5 million people by 2023. Selected student ambassadors will receive dedicated workshops, direct team support, access to a peer network, merchandise, and updates on upcoming projects and features. Applicants must be enrolled in an accredited higher education institution, have completed at least one machine learning or data science course, and already use the Hugging Face Hub or libraries. The application window closed on June 13, 2022, with the program operating from June 30, 2022, through December 31, 2022.
Accelerated Inference with Optimum and Transformers Pipelines
Transformer-based models are moving into production for large-scale workloads, but default implementations remain slow and resource-intensive compared to traditional machine learning algorithms. Hugging Face Optimum addresses this issue by integrating performance optimization tools and accelerated runtimes like ONNX Runtime directly into standard Transformers pipelines. Developers replace standard model classes with Optimum equivalents to convert models to ONNX, run graph optimizations such as operator fusion, and apply quantization. In an evaluation on an AWS EC2 m5.xlarge CPU instance, optimizing and quantizing a RoBERTa question-answering model cut average latency from 117.61 ms to 64.94 ms while retaining 99.61 percent accuracy. Known limitations include a 2GB remote model size limit, lack of seq2seq support, omitted past key values in causal language models, and no local caching for optimized ONNX models.
We Raised $100 Million for Open & Collaborative Machine Learning 🚀
Hugging Face announced a 100 million dollar Series C funding round led by Lux Capital, alongside participants including Sequoia, Coatue, and several angel investors. The platform hosts over 100,000 pre-trained models and 10,000 datasets spanning natural language processing, computer vision, speech, and other scientific domains for more than 10,000 customer organizations. The company plans to use the capital to expand research, open-source initiatives, tooling, and efforts focused on mitigating machine learning limitations like biases, privacy risks, and energy consumption. In addition, the organization is directing the BigScience research workshop with over 1,000 participants to train a massive open-source multilingual language model. Following organizational growth from 30 to more than 120 employees in twelve months, the remote-friendly company is actively hiring across all positions and seniority levels.
Welcome fastai to the Hugging Face Hub
Hugging Face Hub has integrated with the fastai deep learning library, allowing practitioners to upload and download models directly through the huggingface_hub Python client. Fastai Learner objects, which bundle model architectures, data loaders, and loss functions, can be published to a designated repository namespace using push_to_hub_fastai. Uploaded models automatically receive Git-based version control, Git LFS support for large files, and generated model cards. Practitioners can retrieve and instantiate published models locally for inference or transfer learning via from_pretrained_fastai. The integration also supports Blurr, an ecosystem library that combines fastai with Hugging Face Transformers for sequence classification and related text modeling tasks.
An Introduction to Deep Reinforcement Learning
This introductory chapter presents deep reinforcement learning as a machine-learning approach in which an agent learns by interacting with an environment, taking actions, and receiving positive or negative rewards. It establishes the reinforcement-learning framework through the loop of state, action, reward, and next state, and explains the reward hypothesis, expected return, Markov property, observations, states, and action spaces. The chapter then introduces policies as the agent’s decision-making mechanism and contrasts policy-based methods with value-based methods, including the use of neural networks to estimate policies or state values in deep RL. It concludes by preparing learners to train a lander agent, share it on the Hugging Face Hub, and continue with Q-Learning and value-based methods.
Accelerate Large Model Training using PyTorch Fully Sharded Data Parallel
Increasing parameter counts in modern machine learning models make loading and training them prohibitive on standard hardware. While Distributed Data Parallel replicates the entire model across GPUs, PyTorch Fully Sharded Data Parallel shards optimizer states, gradients, and parameters across data-parallel workers. Benchmarks on causal language modeling using GPT-2 Large and XL across Titan RTX GPUs demonstrate that FSDP increases allowable batch sizes and prevents out-of-memory errors encountered in standard DDP. Integrating FSDP through Hugging Face Accelerate enables these capabilities alongside CPU offloading to run models exceeding GPU memory limits. However, Accelerate requires preparing models before creating optimizers when using multiple models and notes that mixed precision support with FSDP currently has transformer compatibility issues.
Opinion Classification with Kili and HuggingFace AutoTrain
Understanding mobile application user feedback often requires expensive and labor-intensive manual analysis. To streamline this process, an active learning pipeline was constructed using Kili for data annotation alongside HuggingFace AutoTrain and standard transformers for text classification. The workflow utilized approximately 40,000 Medium reviews collected from the Google Play Store, classifying content into categories such as Subscription, Content, Interface, and User Experience. Hyperparameter searches with Ray backend were compared against AutoTrain, which automated training within 30 minutes. Subsequent sentiment analysis of the categorized reviews revealed that while overall sentiment remained positive, subscription and interface categories contained predominantly negative feedback, especially in application version 4.5.
Director of Machine Learning Insights
Directors of machine learning must balance complex mathematical modeling, system design, and sector-specific business operations across diverse industries. In digital media, practitioners leverage deep learning and Bayesian techniques to power assistive content creation tools and short-term interest recommendations while maintaining user privacy. Pharmaceutical teams employ natural language understanding, computer vision, and reinforcement learning across research and manufacturing, requiring strict GxP validation to navigate regulatory compliance and dataset diversity challenges. In the utility and energy sector, machine learning bridges disparate relational billing records, spatial GIS feeds, and physical grid machinery data to generate operational insights. Across these domains, leaders emphasize that successful integration depends on data quality validation, model monitoring safeguards, and assistive human-in-the-loop collaboration.
Getting Started with Transformers on Habana Gaudi
Habana Labs and Hugging Face partnered to accelerate Transformer model training using Habana Gaudi accelerators, which offer up to 40% better price performance than recent GPU-based Amazon EC2 instances. Setting up the environment requires launching an Amazon EC2 dl1.24xlarge instance using the Habana Deep Learning Base AMI on Ubuntu 20.04. Inside an interactive PyTorch Docker container configured for Habana runtimes, users install the Optimum Habana package from source along with necessary dependencies. Fine-tuning the bert-large-uncased-whole-word-masking model on the GLUE MRPC task completes in 2 minutes and 12 seconds with an F1 score of 0.9181. Utilizing EC2 Spot Instances reduces the hourly compute cost by 70%, from $13.11 down to $3.93.
Introducing Hugging Face for Education 🤗
Hugging Face established an initiative to teach machine learning to 5 million people by the end of 2023. As machine learning expands across software development and impacts non-technical users, adapting workforce skills and assisting educators with ethical considerations become critical challenges. The educational framework provides browser-based model testing widgets, documentation on model biases, and free courses covering Natural Language Processing, Deep Reinforcement Learning, and interactive demo creation. Instructors receive free infrastructure to create Hub classrooms, alongside a multilingual toolkit spanning topics like Transformers and Gradio. Through ongoing global tours and free compute events, the organization supports collaborative machine learning education across diverse experience levels.
Supercharged Customer Service with Machine Learning
Customer support teams often receive high volumes of messages that cannot all be answered manually. To prioritize urgent inquiries, support workflows can be modeled as a text classification task to identify the most unsatisfied customers. Using the Hugging Face ecosystem, an NLP pipeline is established by selecting the Amazon reviews multi dataset and fine-tuning a DeBERTa model for sentiment classification across five granular categories. Evaluation on test data shows that the model identifies roughly 95% of unsatisfied messages with an 11.7% false-positive rate on satisfied messages, potentially reducing human triage workload by 83%. For production deployment, performance can be optimized through hardware acceleration, lower precision arithmetic, open-source libraries like Optimum and ONNX Runtime, and inference servers.
CO2 Emissions and the 🤗 Hub: Leading the Charge
Training and deploying machine learning models produces greenhouse gas emissions determined by infrastructure runtime, hardware type, and energy grid carbon intensity. Hugging Face introduced mechanisms to measure, report, and filter models based on their carbon footprint to improve ecological transparency. Using the huggingface_hub library, practitioners can query HfApi.list_models with an emissions_thresholds parameter to filter models by maximum or minimum carbon emissions measured in grams. In addition, installing the codecarbon package enables the Transformers Trainer to automatically attach CodeCarbonCallback and log training emissions to an emissions.csv file. Users can then publish these measured values directly into model card metadata under co2_eq_emissions for public tracking.
Machine Learning Experts - Lewis Tunstall
In this interview with Britney Muller, Hugging Face machine learning engineer Lewis Tunstall discusses his background, his book Natural Language Processing with Transformers, and tooling optimizations for deploying transformer models. Tunstall notes that large model parameter sizes often lead to high latency, making off-the-shelf transformers impractical for responsive applications like chatbots. To resolve this issue, he developed single-line export tooling within the transformers library to convert models into the ONNX format. This conversion enables engineers to run PyTorch models in TensorFlow or on specialized hardware, achieving faster latency and higher throughput. Tunstall also recounts co-authoring the O'Reilly book with Leandro von Werra and Thom Wolf, collaborating on the Hugging Face Course, and training a GPT-2 model named code parrot on Python code.
Habana Labs and Hugging Face Partner to Accelerate Transformer Model Training
Training transformer models across computer vision, speech, and natural language processing tasks at scale often demands heavy compute resources, incurring significant time and financial expense. To address these bottlenecks, Habana Labs and Hugging Face partnered to integrate the SynapseAI software suite into the Hugging Face Optimum open-source library. This integration allows machine learning practitioners to accelerate transformer training workflows on Habana Gaudi processors using minimal code adjustments. Habana Gaudi hardware, featured in Amazon EC2 DL1 instances and Supermicro X12 servers, incorporates ten 100 Gigabit Ethernet ports per processor to scale from single units to thousands of chips. The combined hardware and software architecture supports TensorFlow and PyTorch while delivering price and performance metrics up to 40% lower than comparable training alternatives.
Topics they write about
All topics →Weekly digest
The best engineering reads, once a week.