float16专题

transformers 不同精度float16、bfloat16、float32加载模型对比

参考: https://github.com/chunhuizhang/pytorch_distribute_tutorials/blob/main/tutorials/amp_autocast_mixed_precision_training.ipynb from transformers import AutoModelForCausalLM, AutoTokenizerdevice =