Loading…

Hugging Face
AI platform and community providing machine learning models, datasets, libraries, and tools for building AI applications.
- 317 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
Announcing Evaluation on the Hub
Hugging Face introduced Evaluation on the Hub, a no-code tool designed to streamline the evaluation of machine learning models across diverse datasets. Traditional evaluation approaches often suffer from reproducibility issues, implementation inconsistencies, and cumbersome workflows across varied metrics and datasets. Powered by AutoTrain and Hugging Face Spaces, the service allows users to configure tasks, map dataset columns, select evaluation metrics, and run tests directly from dataset pages. Completed evaluations automatically open pull requests on the respective model cards to encode standardized verification metadata and update public dataset leaderboards. This system establishes consistent benchmarking pipelines across tasks like image classification, text summarization, and named entity recognition without requiring local code execution.
Getting Started With Embeddings
Embeddings represent unstructured information such as text and images as numerical vectors in a shared semantic space. To demonstrate their utility, a simple semantic search engine is built over US Social Security Medicare frequently asked questions. The system generates 384-dimensional vector representations for thirteen FAQ entries by dispatching POST requests to the Hugging Face Inference API using the sentence-transformers/all-MiniLM-L6-v2 model. Incoming user queries are converted into matching vector representations and evaluated against stored dataset vectors using the util.semantic_search function from the Sentence Transformers library. By calculating cosine similarity scores, the system retrieves and ranks the five most semantically relevant questions without requiring custom keyword rules or massive labeled training sets.
Convert Transformers to ONNX with Hugging Face Optimum
Exporting Hugging Face Transformers models to the ONNX format can be accomplished through three different abstraction levels. The low-level approach utilizes torch.onnx.export, requiring manual specification of dummy inputs, input names, output names, opset versions, and dynamic axes configurations. At the intermediate level, the transformers.onnx package simplifies the conversion process by relying on FeaturesManager and prebuilt configuration objects to handle dynamic axis definitions automatically. The high-level method uses Hugging Face Optimum classes such as ORTModelForSequenceClassification by setting the from_transformers flag to True inside from_pretrained. This Optimum export leverages transformers.onnx internally and produces a model ready for immediate inference execution or integration into pipelines.
Intel and Hugging Face Partner to Democratize Machine Learning Hardware Acceleration
Intel has joined Hugging Face's Hardware Partner Program to accelerate Transformer training, fine-tuning, and inference on Intel platforms. Large Transformer models introduce latency bottlenecks in production workloads like search and chatbots, where hardware-level optimization typically requires tedious trial and error. To streamline model optimization, the collaboration introduces Optimum Intel, an open-source library integrating the Intel Neural Compressor for automated quantization, pruning, and distillation. A demonstration applies post-training dynamic quantization to a fine-tuned DistilBERT classification model using a CPU-only PyTorch setup. The quantized model converted 38 Linear and 2 Embedding operators to 8-bit integers, reducing evaluation duration by 1.34x while keeping the accuracy drop within a 5% threshold.
Director of Machine Learning Insights [Part 3: Finance Edition]
Machine learning leaders in financial institutions face significant operational hurdles when integrating automated models into production environments. Practitioners must navigate complex legacy architectures, strict regulatory oversight, and privacy mandates tied to personally identifiable financial records. Integrating models often fails when organizations lack clear communication buffers, deploy models using improper prediction windows, or treat systems as opaque black boxes without verifying underlying mechanics. Despite these challenges, financial applications increasingly rely on machine learning for anti-money laundering compliance, automated fraud screening, and loan underwriting. Success in this regulated sector demands comprehensive evaluation across representative input spaces, robust ongoing model monitoring, and explainable decision outputs.
The Annotated Diffusion Model
Denoising Diffusion Probabilistic Models generate data samples by learning to reverse a discrete-time forward diffusion process that incrementally adds Gaussian noise to inputs. The forward process adds noise across a predefined schedule of variance parameters up to a fixed number of steps, transforming data into an isotropic Gaussian distribution. Because the true reverse conditional probability distribution is intractable, a neural network optimizes the variational lower bound to approximate the distribution mean at each step while keeping the variance fixed. Sampling subsequently proceeds by iteratively denoising pure Gaussian noise through successive network evaluations to reconstruct a clean data sample. Although diffusion models demonstrate high generation quality, their primary drawback remains the requirement of multiple forward passes during inference compared to models like generative adversarial networks.
Deep Q-Learning with Space Invaders
Tabular Q-learning fails to scale to complex environments like Atari games due to massive observation spaces that make maintaining discrete state-action tables impractical. Deep Q-learning addresses this limitation by using a neural network to approximate Q-values for each possible action from input states. To process visual inputs effectively and capture temporal motion, raw game screens are grayscaled, resized to 84x84 pixels, and stacked in groups of four consecutive frames before passing through convolutional and fully connected layers. The training process stabilizes learning through experience replay buffers, fixed target networks that update periodically, and Double DQN architectures that decouple action selection from target evaluation. Agents can then be trained on environments like Space Invaders using frameworks such as RL-Zoo without tabular memory constraints.
Graphcore and Hugging Face Launch New Lineup of IPU-Ready Transformers
Graphcore and Hugging Face expanded the range of machine learning modalities and tasks available in Hugging Face Optimum. Developers can now access ten transformer models optimized for Graphcore IPUs across natural language processing, speech, and computer vision. The available architectures include BERT, ViT, GPT-2, RoBERTa, DeBERTa, BART, LXMERT, T5, HuBERT, and Wav2Vec2, complete with IPU configuration files and ready-to-use pre-trained or fine-tuned weights. The integration supports the Bow IPU processor, which uses 3D Wafer-on-Wafer stacking to achieve up to 350 teraFLOPS of AI compute. Optimum also integrates with the Poplar SDK 2.5, enabling compatibility with frameworks such as PyTorch, TensorFlow, Docker, and Kubernetes.
Introducing Pull Requests and Discussions 🥳
Hugging Face Hub released pull requests and discussions under a new community tab for all repository types, including models, datasets, and Spaces. This feature enables community members and repository owners to interact directly, propose model card updates, report biased generations, and contribute files. The pull request implementation departs from traditional Git hosting platforms by avoiding forks and standard branches. Instead, contributors push to custom ref branches stored directly on the source repository to bypass creating heavy forks for large machine learning artifacts. Furthermore, the Hub treats discussions and pull requests without hard distinctions, listing them together to streamline collaboration across machine learning assets.
Efficient Table Pre-training without Real Data: An Introduction to TAPEX
Conventional language model pre-training relies on massive natural text corpora and general-purpose objectives like masked language modeling, leaving a substantial gap when applied to structured table tasks. To bridge this gap efficiently, TAPEX (Table Pre-training via Execution) pre-trains a language model, such as BART, by learning a neural SQL executor over a synthetic corpus. The system pairs web tables with systematically sampled executable SQL queries and gathers target execution outputs via an off-the-shelf SQL engine. During downstream fine-tuning, the model consumes natural language questions and flattened tables to predict answers. TAPEX achieved new state-of-the-art results across four benchmark datasets, including WikiTableQuestions and TabFact, while achieving a pre-training speedup of nearly 50 times over TaBERT.
An Introduction to Q-Learning Part 2/2
Q-Learning serves as a foundational off-policy reinforcement learning method for finding optimal action-value functions before advancing to deep reinforcement learning. The approach employs a tabular Q-function that updates state-action pairs at each step using temporal difference learning. Action selection balances exploration and exploitation via an epsilon-greedy strategy, where epsilon progressively decays as training proceeds. Updates compute a temporal difference target combining the immediate reward and the discounted maximum value of the subsequent state under a greedy policy. This discrepancy between the exploratory acting policy and the greedy updating policy classifies Q-Learning as an off-policy algorithm, enabling agents to learn optimal policies in environments like Frozen Lake and autonomous taxi navigation.
How Sempre Health is leveraging the Expert Acceleration Program to accelerate their ML roadmap
Sempre Health handles thousands of inbound patient text messages daily to manage medication adherence and prescription discounts. Although an existing rule-based system caught around 80% of inbound texts, the team required statistical machine learning to improve message parsing and reduce manual workload. Collaborating with Hugging Face through the Expert Acceleration Program, the engineers received guidance on labeling strategies, problem formulation, and model selection. They deployed a natural language processing pipeline into production to automatically classify and respond to incoming messages or initiate automated actions like refill requests. Since deployment, the new NLP system automatically handles nearly 20% of incoming messages that previously required operational support tickets.
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.
Topics they write about
All topics →Weekly digest
The best engineering reads, once a week.