THUDM / THUDM/slime

[Question] 关于FP8训练的问题

Open
#1,618 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
8.5k
Forks
1.3k
Avg merge
5h 36m
Merged PRs (30d)
22

Description

Your Question

我参照 https://thudm.github.io/slime/zh/advanced/low-precision.html 文档中例子做了FP8训练,TransformerEngine最终存了FP16的torch_dist权重,在转成HF格式后,再从FP16转到FP8是不是无损的呢?如果还是会有训推不一致的问题,怎么和TransformerEngine训练时的FP8保持对齐?

目前FP16转FP8用的是slime中提供的工具:tools/convert_hf_to_fp8.py

What I've Tried

I have tried the fp8 training.

Environment (if relevant)
  • slime version:
  • Python version:
  • PyTorch version:
  • CUDA/ROCm version:
  • GPU type and count:
  • OS:
Additional Context

No response

Pre-submission Checklist

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the low-precision training documentation at thudm.github.io/slime/zh/advanced/low-precision.html and inspect tools/convert_hf_to_fp8.py. Compare the TransformerEngine FP8 training checkpoint behavior with the FP16 torch_dist-to-HF conversion path. Done means documenting whether the conversion is lossless and how inference can remain aligned with TransformerEngine training.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.