mirror of
https://github.com/RYDE-WORK/MiniCPM.git
synced 2026-01-19 12:53:36 +08:00
use default gpu 0
This commit is contained in:
parent
a5c9423f7e
commit
a77a34759f
@ -34,7 +34,7 @@ else:
|
||||
# init model and tokenizer
|
||||
path = args.model_path
|
||||
tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
|
||||
model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch_dtype, device_map="auto", trust_remote_code=True)
|
||||
model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch_dtype, device_map="cuda:0", trust_remote_code=True)
|
||||
|
||||
model_architectures = model.config.architectures[0]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user