Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 3 min read Research easyNovice

Accelerating Protein Language Model ProtST on Intel Gaudi 2

ProtST, a multi-modal protein language model from MILA and Intel Labs, runs faster on Intel Gaudi 2 than on an NVIDIA A100 80GB using the Optimum for Intel Gaudi library with minimal code changes. In bfloat16 at batch size 1, subcellular localization inference on 2,772 sequences reaches identical accuracy (0.44) with a 1.76x speedup on Gaudi 2. Fine-tuning ProtST-ESM-1b for binary membrane/soluble localization matches the paper's ~92.5% accuracy, runs 2.92x faster on a single Gaudi 2, and scales near-linearly to 4 and 8 accelerators.

Assumes: Hugging Face transformersmodel fine-tuning basics

Related posts

  • Fast Inference on Large Language Models: BLOOMZ on Habana Gaudi2 Accelerator

    Hugging Face mediumAdept

    BLOOMZ (176B parameters, 352 GB in 16-bit) runs inference on a single 8-HPU Habana Gaudi2 server using Optimum Habana with Habana's DeepSpeed-inference fork, HPU graphs and a KV cache. In batch-1 greedy generation of 100 tokens, Gaudi2 is 1.42x faster than an 8x A100 80GB setup on the 176B model (3.1 s vs 4.4 s) and 2.89x faster on BLOOMZ-7B. Unlike A100, Gaudi2 benefits from model parallelism on the 7B model. First-gen Gaudi (AWS DL1, about $13/hr) offers better price-performance than A100 for the 7B checkpoint, and the post includes commands to reproduce the benchmark or run generation over any Hugging Face dataset.

  • Blazing Fast SetFit Inference with 🤗 Optimum Intel on Xeon

    Hugging Face mediumAdept

    Post-training static int8 quantization of a SetFit model body with Optimum Intel and Intel Neural Compressor speeds up inference on Xeon CPUs by up to 7.8x in throughput with negligible accuracy loss. The walkthrough calibrates on 100 rotten_tomatoes samples, quantizes a bge-small SetFit model with the IPEX backend, and benchmarks it against fp32 Transformers and IPEX bf16 with TorchScript. At batch size 1, latency drops from 15.69 ms to 4.55 ms (3.45x), model size shrinks from 127 MB to 45 MB, and sst2 accuracy moves only from 88.4% to 88.1%.

  • AMD + 🤗: Large Language Models Out-of-the-Box Acceleration with AMD GPU

    Hugging Face easyNovice

    Hugging Face Transformers now runs all models and tasks on AMD Instinct GPUs with no code changes versus NVIDIA, backed by ROCm support for Flash Attention v2, vLLM Paged Attention, DeepSpeed, GPTQ via AutoGPTQ, ONNX Runtime's ROCMExecutionProvider, and Optimum-Benchmark. Text Generation Inference gains initial MI210/MI250 support through a ROCm Docker image, with GeMM kernel tuning to reach performance parity. Benchmarks show one MI250 (two 64 GB ROCm devices) delivering over 2.33x the decode throughput and half the prefill latency of an A100 at large batch sizes. Its 128 GB memory also fits Llama 70B workloads that run out of memory on two A100-80GBs.

  • Hugging Face on AMD Instinct MI300 GPU

    Hugging Face easyNovice

    Hugging Face's transformers and text-generation-inference (TGI) now run on AMD Instinct MI300X GPUs with no code changes, backed by a Kubernetes-scheduled CI pipeline that runs tens of thousands of unit tests on MI250 and MI300 hardware. TGI optimizations for MI300 include Flash Attention v2, Paged Attention, GPTQ/AWQ kernels, fused kernels, and PyTorch's ROCm TunableOp. TunableOp tunes GEMMs during server warmup and gives an 8-10% decode latency gain on small inputs. On Llama 3 70B, MI300X on Azure delivers 2-3x faster time to first token and 2x faster decoding than MI250, and roughly 2x faster LoRA fine-tuning. Its 192 GB HBM3 also fits the full ~140 GB fp16 model on a single GPU.

  • Accelerating Vision-Language Models: BridgeTower on Habana Gaudi2

    Hugging Face mediumAdept

    Fine-tuning the 866M-parameter BridgeTower vision-language model with Optimum Habana on Gaudi2 reaches 847.7 samples/s, about 1.4x faster than H100 and 2.45x faster than A100 80GB, mostly because image data loading is the bottleneck. Raising Transformers' dataloader_num_workers from 0 to 1 or 2 gives easy speedups: 1.28x on Gaudi2, 1.79x on H100 and 1.52x on A100. Gaudi2's media pipeline (--mediapipe_dataloader) adds about 1.10x more by sending encoded images to the device for decoding and augmentation. The tradeoff is higher device memory use, and there is no gain if the accelerators are already saturated. Full reproduction commands are provided.

The quest for software engineering knowledge.

Look:
Layout: