Connect with us

Technology

Intel, Habana Labs and Hugging Face Advance Deep Learning Software

Over the past year, Intel, Habana Labs and Hugging Face have continued to improve efficiencies and lower barriers for adoption of artificial intelligence (AI) through open source projects, integrated developer experiences and scientific research. This work resulted in key advancements and efficiencies for building and training high-quality transformer models.

Transformer models deliver advanced performance on a wide range of machine and deep learning tasks like natural language processing (NLP), computer vision (CV), speech and others. Training these deep learning models at scale requires a large amount of computing power and can make the process time-consuming, complex and costly.

The focus of Intel’s ongoing work with Hugging Face through the Intel Disruptor Program, is to scale adoption of training and inference solutions optimized on latest Intel® Xeon® Scalable and Habana Gaudi® and Gaudi®2 processors. The collaboration brings the most advanced deep learning innovation from the Intel AI Toolkit to the Hugging Face open source ecosystem and informs innovation drivers in future Intel® architecture. Results of this work delivered advancements in distributed fine-tuning on Intel Xeon platforms, built-in optimizations, accelerated training with Habana Gaudi and few-shot learning.

Distributed Fine-Tuning on Intel Xeon Platform

When training on a single node CPU is too slow, data scientists rely on distributed training where clustered servers each keep a copy of the model, train it on a subset of the training dataset and exchange results across nodes via the Intel® oneAPI Collective Communications Library to converge to a final model faster. This feature is now natively supported by transformers and makes distributed fine-tuning easier for data scientists.

One example is to accelerate PyTorch training for transformer models on a distributed cluster of Intel Xeon Scalable processor servers. To leverage Intel® Advanced Matrix Extensions (Intel® AMX), AVX-512 and Intel Vector Neural Network Instructions (VNNI) in PyTorch, hardware features supported in the latest Intel Xeon Scalable processors, Intel has designed the Intel extension for PyTorch. This software library provides out-of-the-box speedup for training and inference.

In addition, Hugging Face transformers provide a Trainer API, making it easier to start training without manually writing a training loop. The Trainer provides API for hyperparameter search and currently supports multiple search backends including Intel’s SigOpt, a hosted hyperparameter optimization service. With this, data scientists can train and get the best model more efficiently.

More information can be found on the Hugging Face blog and documents, “Accelerating PyTorch Distributed Fine-tuning with Intel Technologies,” “Efficient Training on Multiple CPUs” and “Hyperparameter Search Using Trainer API.”

Optimum Developer Experience

Optimum is an open source library created by Hugging Face to simplify transformer acceleration across a growing range of training and inference devices. With built-in optimization techniques and ready-made scripts, beginners can use Optimum out of the box and experts can keep tweaking for maximum performance.

Optimum Intel is the interface between the transformers library and the different tools and libraries provided by Intel to accelerate end-to-end pipelines on Intel architectures. Built on top of the Intel® Neural Compressor, it delivers a unified experience across multiple deep learning frameworks for popular network compression technologies, like quantization, pruning and knowledge distillation. In addition, developers can more easily run post-training quantization on a transformer model using the Optimum Intel library to compare model metrics on evaluation datasets.

Optimum Intel also provides a simple interface to optimize transformer models, convert them to OpenVINO intermediate representation format and to run inference using OpenVINO.

More context can be found on GitHub’s Hugging Face Optimum Intel page and Hugging Face’s Optimum page.

Accelerated Training with Habana Gaudi

Habana Labs and Hugging Face are collaborating to make it easier and quicker to train large-scale, high-quality transformer models. The integration of Habana’s SynapseAI® software suite with the Hugging Face Optimum-Habana open source library enables data scientists and machine learning engineers to accelerate transformer deep learning training with Habana processors – Gaudi and Gaudi2 – with a few lines of code.

The Optimum-Habana library features support for a variety of computer vision, natural language and multimodal models. The supported and tested model architectures include BERT, AlBERT, DistilBERT, RoBERTa, Vision Transformer, swin, T5, GPT2, wav2vec2 and Stable-Diffusion. There are over 40,000 models based on these architectures that are currently available on the Hugging Face hub that developers can easily enable on Gaudi and Gaudi2 with Optimum-Habana.1

A key benefit of training on the Habana Gaudi solution, which powers Amazon’s EC2 DL1 instances, is cost efficiency – delivering up to 40% better price-to-performance than comparable training solutions, enabling customers to train more while spending less.2 Gaudi2, built on the same high-efficiency architecture as first-generation Gaudi, also promises to deliver great price performance.

Habana DeepSpeed is also integrated in the Optimum-Habana library and makes it easy to configure and train large language models at scale on Gaudi devices using DeepSpeed optimizations. You can learn more with the Optimum-Habana DeepSpeed usage guide.

The latest release of Optimum-Habana includes support for the Stable Diffusion pipeline from Hugging Face diffusers library, enabling the Hugging Face developer community with cost-efficient test-to-image generation on Habana Gaudi.

More context can be found on the Hugging Face blog “Habana Labs and Hugging Face Partner to Accelerate Transformer Model Training” and the Habana Labs blogs “Memory-Efficient Training on Habana(R) Gaudi(R) with DeepSpeed” and “Generation with PyTorch V-diffusion and Habana Gaudi” and the video “Julien Simon Video: Accelerate Transformer Training with Optimum Habana.”

Few-shot Learning in Production

Intel Labs, Hugging Face and UKP Lab recently introduced SetFit, an efficient framework for few-shot fine-tuning of Sentence Transformers. Few-shot learning with pretrained language models has emerged as a promising solution to a real data scientist challenge: dealing with data that has few to no labels.

Current techniques for few-shot fine-tuning require handcrafted prompts or verbalizers to convert examples into a format that’s suitable for the underlying language model. SetFit dispenses with prompts by generating rich embeddings directly from a small number of labeled text examples.

Researchers designed SetFit to be used with any Sentence Transformer on the Hugging Face Hub, allowing text to be classified in multiple languages by fine-tuning a multilingual checkpoint.

SetFit’s two-stage training process

SetFit’s two-stage training process (Credit: Intel Corporation)

SetFit doesn’t require large-scale models like T5 or GPT-3 to achieve high accuracy. It is significantly more sample-efficient and robust-to-noise than standard fine-tuning. For example, with only eight labeled examples per class on an example sentiment dataset, SetFit was competitive with fine-tuning RoBERTa Large on the full training set of 3,000 examples. Hugging Face found SetFit also achieves comparable results to T-Few 3B, despite being prompt-free and 27 times smaller, making it fast to train and at a much lower cost.3

More context can be found on the Hugging Face blog, “SetFit: Efficient Few-Shot Learning Without Prompts.” Register here to hear directly from Hugging Face and Intel about few-shot production and SetFit inference on CPU on Dec. 14.

Open source projects, integrated developer experiences and scientific research are just some of the ways Intel engages with the ecosystem and contributes to reducing the cost of AI. Tools and software accelerate the developer journey to build applications and unleash processor performance. Intel is on a mission to make it easier to build and deploy AI anywhere, enabling data scientists and machine learning practitioners to apply the latest optimization techniques.

The Small Print:

1  Based on Hugging Face search query: https://huggingface.co/models?other=or:bert,stable-diffusion-diffusers,albert,wav2vec2,vit,swin,t5,distilbert,roberta,gpt2. This query filters all Hugging Face models that have been tested, validated & supported in optimum-habana.     

Based on AWS calculation of price and performance relative to comparable GPU-based AWS instances. See Amazon press announcement for more information: https://press.aboutamazon.com/2021/10/aws-announces-general-availability-of-amazon-ec2-dl1-instances

3 See full paper at https://arxiv.org/abs/2209.11055 and blog post at https://huggingface.co/blog/setfit for details on performance claims.

About Intel

Intel (Nasdaq: INTC) is an industry leader, creating world-changing technology that enables global progress and enriches lives. Inspired by Moore’s Law, we continuously work to advance the design and manufacturing of semiconductors to help address our customers’ greatest challenges. By embedding intelligence in the cloud, network, edge and every kind of computing device, we unleash the potential of data to transform business and society for the better. To learn more about Intel’s innovations, go to newsroom.intel.com and intel.com.

© Intel Corporation. Intel, the Intel logo and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.

Source – Intel

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Trending

Elon Musk Elon Musk
Profile1 month ago

Elon Musk: Business Leader Behind Tesla, SpaceX, and xAI

Quick Facts Field Details Full Name Elon Reeve Musk Born June 28, 1971 Birthplace Pretoria, South Africa Nationality South African,...

Travel1 month ago

Best Places to Visit in Vietnam – Complete Travel Guide

Vietnam is one of the most rewarding destinations in Southeast Asia. It’s a country where emerald bays meet towering limestone...

Best iPhones to Buy in 2026 Best iPhones to Buy in 2026
Technology2 months ago

Best iPhones to Buy in 2026: Top 7 Models Compared with Features, Prices, and Expert Advice

Choosing the best iPhone to buy in 2026 is not simply about picking the newest release. With several generations still...

gold and silver gold and silver
Finance2 months ago

Why Gold and Silver Are Rising: What’s Driving Precious Metals’ Strong Momentum

Gold and silver are gaining strength as investors seek safe-haven assets amid global economic and geopolitical uncertainty. Silver is outperforming...

Best Hospitals in India for Heart Surgery Best Hospitals in India for Heart Surgery
Health2 months ago

Best Hospitals in India for Heart Surgery – Top Cardiac Care Centers in 2026

Heart disease is a significant health challenge in India and worldwide. With rising incidence of coronary artery disease, heart attacks,...

Best Airline Loyalty Programs 2026 Best Airline Loyalty Programs 2026
Travel2 months ago

Best Airline Loyalty Programs in 2026: Which Frequent Flyer Programs Are Really Worth It?

Spend enough time in airports and you’ll notice something interesting. Some travelers move effortlessly — priority check-in, lounge access, early...

Best Medical Schools in the US Best Medical Schools in the US
Education2 months ago

Best Medical Schools in the US in 2026: A Complete and Easy Guide for Future Doctors

Choosing from the best medical schools in the US is one of the most important decisions in a future doctor’s...

Cars Below 15 Lakhs in India Cars Below 15 Lakhs in India
Auto2 months ago

Cars Below 15 Lakhs in India: The Complete Buyer’s Guide for 2026

The Indian automobile market in 2026 has entered a value-driven era. Buyers no longer need to exceed their budget to...

Cuisine of the Middle East Cuisine of the Middle East
Food and Beverage2 months ago

Cuisine of the Middle East: Flavours That Carry History on Every Plate

There’s a reason people speak of the cuisine of the Middle East with a certain reverence. It isn’t simply about...

Credit Card With Benefits Best Credit Card With Benefits Best
Finance2 months ago

Credit Card With Benefits Best: How to Maximize Value

Credit cards have become part of everyday life — from paying utility bills to booking travel online. But today, a...

Translate »