创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

Databricks:Qwen 27B 微调提速 6 倍

AI 总结

Databricks 博客介绍了在 AI Runtime 上对 Qwen 3.8 27B 进行监督微调的系统性性能优化,在固定数据集上把训练时间从 7 小时 44 分缩短到 1 小时 17 分,约为 6 倍加速。作者指出,98% 的 GPU 利用率只反映 GPU 是否在忙,并不代表真实计算效率,因此团队用 torch trace 定位耗时热点。优化还包括启用 flash-linear-attention 与 causal-conv1d 融合内核,以及改进批次打包,后者单独带来 1.6 倍提升(2 小时 5 分降至 1 小时 17 分)。示例代码已随 AI Runtime cookbook 发布。

深度见解

该案例说明高 GPU 利用率可能掩盖训练瓶颈,内核融合与数据打包等工程手段仍能在利用率接近饱和时带来明显的吞吐提升。

Training or finetuning a multi-billion parameter foundation model requires significant compute, often spanning hundreds to thousands of hours of GPU training. But tuning training performance for an LLM is challenging, and high level metrics, such as GPU utilization may not be showing your actual utilization. In this blog post, we show how to cut through the layers of abstraction, and speed up fine-tuning of the latest Qwen 3.8 27B model on AI Runtime by 6x. Through systematic performance optimization, even with GPU utilization already at 98%, we go from 7 hours 44 minutes to 1 hour 17 minutes fine tuning a fixed dataset.

We will provide a deep dive into the techniques behind these improvements, from how to measure what matters, implementation details, and design trade-offs involved in each optimization.

If you want to get started right away, jump directly to the example code on AI Runtime and give it a try!

Model setup

We start with a standard training loop for Qwen 3.8 27B using the transformers library and the SFT training dataset HuggingFaceH4/ultrachat_200k.

  • We apply FSDP2, the latest model sharding technique from torch. This is required to fit the model weights and optimizer state onto the GPUs. A pure distributed data parallel approach would fail to fit the model weights, at this size, on a single GPU.
  • We also enable activation checkpointing, a technique which trades memory space for compute in the backwards pass to allow for a larger batch size per GPU.
  • The dataloader is packing 2D batches with a maximum tokens per batch of 8192, padding to the maximum size of the batches example.

#Databricks#AI Runtime#Qwen 3.8 27B#transformers#Flash Linear Attention#causal-conv1d#PyTorch FSDP2#HuggingFaceH4/ultrachat_200k

原文约 9 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。