#1242·litgpt

False positive warning about mixed precision in `merge_lora.py`

Author: awaelchliCreated Apr 3, 2024Updated Sep 7, 2026

If the user finetunes LoRA with 16-mixed, we will reinstantiate Fabric with this precision when merging LoRA weights:

https://github.com/Lightning-AI/litgpt/blob/c32eddbfeaee264a6201e050c11213bd442838b5/litgpt/scripts/merge_lora.py#L40-L43

However, 16-mixed is not supported on CPU, and Fabric will automatically emit a warning and switch to bf16-mixed:

 You passed `Fabric(accelerator='cpu', precision='16-mixed')` but AMP with fp16 is not supported on CPU. Using `precision='bf16-mixed'` instead.

We should avoid/suppress this warning because it is a false positive and doesn't matter, since all we care about here is the weights. It could confuse users who configure Fabric in their training script and don't know what we are doing under the hood in merge_lora.py.

https://discord.com/channels/1077906959069626439/1105501395207065802/1225101652563066922