Jingjing Zhai commited on
Commit
3d82951
1 Parent(s): 35fa607

Update README

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -17,7 +17,7 @@ from transformers import AutoModel, AutoModelForMaskedLM, AutoTokenizer
17
  import torch
18
  model_path = 'kuleshov-group/PlantCaduceus_l32'
19
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
20
- model = AutoModelForMaskedLM.from_pretrained(model_path, trust_remote_code=True).to(device)
21
  model.eval()
22
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
23
 
 
17
  import torch
18
  model_path = 'kuleshov-group/PlantCaduceus_l32'
19
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
20
+ model = AutoModelForMaskedLM.from_pretrained(model_path, trust_remote_code=True, device_map=device)
21
  model.eval()
22
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
23