NVIDIA / NVIDIA/Megatron-LM

DeepSeek V4 FP8 training some parameters need keep bfloat16

Open
#5,267 2 comments 0 reactions 2 assignees Claimed by @hxbai View on GitHub
bug community-request module: moe waiting-on-maintainers
Dominant language
Python
Stars
17.9k
Forks
4.5k
Avg merge
4d 6h
Merged PRs (30d)
271

Description

**Describe the bug**

```
--fp8_recipe blockwise \
--fp8_format e4m3 \
--fp8_param_gather True \
```

Image

我们这边发现,FP8训练保存下来的模型。
- compressor 的 wgate wkv 也被量化训练了。但是官方ckpt是bf16
- 另外 ape 是fp32的,开启bf16的时候这部分的参数也变成fp32。官方ckpt是fp32

参考:https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-Base/tree/main?show_file_info=model-00004-of-00046.safetensors
Image

**Steps/Code to reproduce bug**

Please list *minimal* steps or code snippet for us to be able to reproduce the bug.

A helpful guide on on how to craft a minimal bug report http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports.

**Expected behavior**

A clear and concise description of what you expected to happen.

**Additional context**

Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.