torch_dtype=torch.bfloat16, device_map="auto"

#2
by kanhatakeyama - opened

readmeのsample codeですが、一般的には、

・original
tokenizer = AutoTokenizer.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
model = AutoModelForCausalLM.from_pretrained(model_name)

・提案
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name,torch_dtype=torch.bfloat16, device_map="auto")

ではないかと思います!

Taishi-N324 changed discussion status to closed

Sign up or log in to comment