# Data dtype using for Alphagenome

**URL:** <https://www.alphagenomecommunity.com/t/data-dtype-using-for-alphagenome/656>\
**Category:** Community\
**Created:** [September 14, 2025, 12:32pm UTC](https://www.alphagenomecommunity.com/t/data-dtype-using-for-alphagenome/656 "2025-09-14T12:32:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wildest](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/wildest/32/555_2.png) [@Wildest](https://www.alphagenomecommunity.com/u/Wildest)\
**Post date:** [September 14, 2025, 12:32pm UTC](https://www.alphagenomecommunity.com/t/data-dtype-using-for-alphagenome/656/1 "2025-09-14T12:32:03Z")

</div>

Hi All, thanks for your wonderful work!

I notice that in Alphagenome paper, your team using brain floating point (bfloat16) to store track data, I wondering when you training the model, the dtype for the model is what? Float32 or bfloat16 or float16? Waiting for your answer, thx!

---

<div class="post-metadata">

**Author:** ![tward](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/tward/32/17_2.png) [@tward](https://www.alphagenomecommunity.com/u/tward)\
**Post date:** [September 15, 2025, 6:25pm UTC](https://www.alphagenomecommunity.com/t/data-dtype-using-for-alphagenome/656/2 "2025-09-15T18:25:08Z")

</div>

Hello @Wildest, welcome to the forum!

Yes we use `bfloat16` targets during training, typically normalized using the track’s mean of non-zero values.

---

<div class="post-metadata">

**Author:** ![Wildest](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/wildest/32/555_2.png) [@Wildest](https://www.alphagenomecommunity.com/u/Wildest)\
**Post date:** [September 16, 2025, 8:13am UTC](https://www.alphagenomecommunity.com/t/data-dtype-using-for-alphagenome/656/3 "2025-09-16T08:13:08Z")

</div>

Thx for your reply!

I also wonder do you use mixed-precision or not while training .

If the original target is 2 (2 different experiments) by 3 (signals at 3 base pair) matrix,  
6, 3, 9 (in this track, the mean of non-zero values is 6)  
2, 0, 2 (in this track, the mean of non-zero values is 2)  
So I need normalized the target into  
1, 0.5, 1.5  
1, 0, 1  
Right?

---

<div class="post-metadata">

**Author:** ![Guido\_Novati](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/guido_novati/32/223_2.png) [@Guido\_Novati](https://www.alphagenomecommunity.com/u/Guido_Novati)\
**Post date:** [September 16, 2025, 3:01pm UTC](https://www.alphagenomecommunity.com/t/data-dtype-using-for-alphagenome/656/4 "2025-09-16T15:01:43Z")

</div>

Hi!

We do use Jax mixed precision. I’m not aware if it differs from the implementation of other frameworks. For example, in Jax if `x` is a BF16 array and we do `jax.numpy.sum(x)` then the accumulation is carried out in FP32, but the result is cast back as BF16. This affects, for example, the normalization statistics.

We explicitly perform the losses in FP32 and, as is common practice, we cast the attention logits before the Softmax to FP32 and after the Softmax to BF16.

Your math on the non-zero mean scaling is correct 🙂  
Note that the AlphaGenome API returns unscaled predictions.
