peft微调Bloom时报错
报错如下:
peft报错
RuntimeError: self and mat2 must have the same dtype
明确禁用下8bit训练即可
model = AutoModelForCausalLM.from_pretrained(
base_model,
load_in_8bit=False,
torch_dtype=torch.float16,
device_map=device_map,
)
model.is_loaded_in_8bit = False #明确一下,不使用8bit进行训练,因为huggingface的8bit训练不支持
model = prepare_model_for_int8_training(model)
peft微调Bloom时报错
https://johnson7788.github.io/2023/04/18/peft%E5%BE%AE%E8%B0%83Bloom%E6%97%B6%E6%8A%A5%E9%94%99/