Skip to content

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

Performance engineering Remove topic Performance engineering Clear all 93 posts RSS

November 2026

Hugging Face

Hill-climbing Inkling 2 Mini inference on one RTX PRO 6000

Case study 9 min +90 XP

Agent-driven tuning of Inkling 2 Mini, a looped 26B-total/3B-active MoE, on a single RTX PRO 6000 raised single-user decode from 136 to 190.6 tok/s (+40%) and 8-user throughput from ~570 to 716 tok/s by switching from SGLang to vLLM nightly and enabling DSpark speculative decoding with 7 drafts and probabilistic draft sampling.

Hugging Face

180B Parameters, 32GB of RAM: Pushing MoE Inference to the Limit with Transformers

Case study 11 min +110 XP

Streaming MoE experts from SSD through a bounded device-side slot pool lets Transformers run Qwen3.8-Flash-Next (121 GB of experts) on a 32 GB MacBook M5 at ~13.9 tok/s, within 6% of the specialized Strata engine on decode and slightly faster on prefill.

October 2026

September 2026

August 2026

Hugging Face

Making Knowledge Distillation Cheap Enough to Run at Scale

Research 8 min +80 XP

Two systems changes make LLM knowledge distillation far cheaper: caching the teacher's top-100 logits offline so the teacher never shares memory with the student, and a fused chunked KL loss that folds the output projection into the loss and recomputes chunks in the backward pass, so the full vocabulary × sequence logits grid is never materialized.

July 2026

June 2026

May 2026

February 2026

Hugging Face

Mixture of Experts (MoEs) in Transformers

Deep dive 10 min +100 XP

Hugging Face transformers v5 reworks its internals to treat Mixture of Experts models as first-class: a WeightConverter pipeline packs per-expert checkpoint tensors into contiguous runtime tensors with async, lazy materialization, cutting Qwen1.5-110B load time from ~66s to ~21s (10s with tensor parallelism) on an A100.

Hugging Face

Custom Kernels for All from Codex and Claude

How-to 9 min +90 XP

Hugging Face packaged CUDA kernel expertise (GPU architecture guides for H100/A100/T4, diffusers and transformers integration patterns, vectorized kernel templates, benchmark scripts) into an agent skill that lets Claude and Codex generate complete kernel-builder projects with PyTorch bindings.

November 2025

October 2025

September 2025

August 2025

July 2025

June 2025

Hugging Face

No GPU left behind: Unlocking Efficiency with Co-located vLLM in TRL

Case study 22 min +220 XP

TRL v0.18.0 can run vLLM co-located with the training job on the same GPUs. vLLM's external_launcher executor puts it inside the torch.distributed process group, replacing the separate HTTP server that left training and inference GPUs idle in turn during GRPO's frequent generation steps.

May 2025

April 2025

March 2025

February 2025

January 2025

Hugging Face

State of open video generation models in Diffusers

Deep dive 16 min +160 XP

Open video generation models such as HunyuanVideo, CogVideoX, LTX-Video, Mochi-1 and Allegro share a common architecture: T5-style text encoders, a DiT-based denoiser over 3D spatio-temporal tokens, a spatially and temporally compressing VAE, and a scheduler.

Hugging Face

Train 400x faster Static Embedding Models with Sentence Transformers

Research 39 min +390 XP

Static embedding models, which replace the attention-based encoder with a token embedding lookup plus mean pooling (an EmbeddingBag), can be trained with modern contrastive losses and Matryoshka Representation Learning to run 100x to 400x faster on CPU than models like all-mpnet-base-v2 and multilingual-e5-small, while keeping at least 85% of their benchmark quality.

December 2024

Hugging Face

Benchmarking Language Model Performance on 5th Gen Xeon at GCP

Research 6 min +60 XP

On Google Cloud, C4 instances (5th Gen Xeon Emerald Rapids with AMX) deliver 10x–24x higher throughput than N2 instances (3rd Gen Ice Lake, AVX-512 only) for text embedding with UAE-Large-V1, and 2.3x–3.6x higher throughput for Llama 3.2 3B text generation.

November 2024

October 2024

August 2024

Hugging Face

Improving Hugging Face Training Efficiency Through Packing with Flash Attention 2

How-to 5 min +50 XP

Hugging Face Transformers now supports padding-free packing of instruction-tuning examples with Flash Attention 2 via the new DataCollatorWithFlattening, which concatenates sequences and passes position_ids so flash_attn_varlen_func respects example boundaries and avoids cross-example attention.

July 2024

May 2024

April 2024

March 2024

January 2024

December 2023

Hugging Face

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

Announcement 7 min +70 XP

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.

November 2023

October 2023

September 2023

Hugging Face

Overview of natively supported quantization schemes in 🤗 Transformers

Research 9 min +90 XP

bitsandbytes and GPTQ (via auto-gptq), the two quantization schemes built into Transformers, trade off differently. bitsandbytes needs no calibration data, works on any model with nn.Linear layers across modalities, and lets LoRA adapters merge without degradation.

August 2023

June 2023

May 2023

April 2023

Hugging Face

Accelerating Hugging Face Transformers with AWS Inferentia2

Announcement 5 min +50 XP

Hugging Face benchmarked popular Transformer models on AWS Inferentia2 (inf2.xlarge) against Inferentia1 (inf1.2xlarge) and an NVIDIA A10G GPU (g5.2xlarge), running 144 p95-latency experiments at batch size 1 across six architectures and sequence lengths from 8 to 512.

March 2023

February 2023

Hugging Face

Accelerating PyTorch Transformers with Intel Sapphire Rapids - part 2

Research 6 min +60 XP

Intel Sapphire Rapids CPUs with AMX instructions, combined with Hugging Face Optimum Intel running in bfloat16 with JIT compilation, cut p99 inference latency for DistilBERT, BERT and RoBERTa text classification by roughly 3x compared with vanilla Transformers on Ice Lake.

January 2023

October 2022

September 2022

July 2022

June 2022

Hugging Face

Intel and Hugging Face Partner to Democratize Machine Learning Hardware Acceleration

Announcement 7 min +70 XP

Intel has joined Hugging Face's Hardware Partner Program, and the two are collaborating on Optimum Intel, an open-source library built on Intel Neural Compressor that applies quantization, pruning and distillation to Transformer models on Xeon CPUs.

May 2022

November 2021

April 2021

March 2021

The quest for software engineering knowledge.

Look:
Layout: