proteinglm commited on
Commit
460242b
·
verified ·
1 Parent(s): 3730041

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -30,8 +30,8 @@ We evaluated the ProteinPGLM-MLM (PGLM) and ProteinPGLM-INT4(100B) models on two
30
  from transformers import AutoModelForMaskedLM, AutoModelForSequenceClassification, AutoModelForTokenClassification, AutoTokenizer, AutoConfig
31
  import torch
32
 
33
- tokenizer = AutoTokenizer.from_pretrained("Bo1015/proteinglm-1b-mlm", trust_remote_code=True, use_fast=True)
34
- model = AutoModelForMaskedLM.from_pretrained("Bo1015/proteinglm-1b-mlm", trust_remote_code=True, torch_dtype=torch.bfloat16)
35
  if torch.cuda.is_available():
36
  model = model.cuda()
37
  model.eval()
@@ -44,10 +44,10 @@ with torch.inference_mode():
44
 
45
 
46
  # model for the sequence-level tasks
47
- model = AutoModelForSequenceClassification.from_pretrained("Bo1015/proteinglm-10b-mlm", trust_remote_code=True, torch_dtype=torch.bfloat16)
48
 
49
  # model for the token-level tasks
50
- model = AutoModelForTokenClassification.from_pretrained("Bo1015/proteinglm-10b-mlm", trust_remote_code=True, torch_dtype=torch.bfloat16)
51
 
52
  ```
53
 
 
30
  from transformers import AutoModelForMaskedLM, AutoModelForSequenceClassification, AutoModelForTokenClassification, AutoTokenizer, AutoConfig
31
  import torch
32
 
33
+ tokenizer = AutoTokenizer.from_pretrained("proteinglm/proteinglm-1b-mlm", trust_remote_code=True, use_fast=True)
34
+ model = AutoModelForMaskedLM.from_pretrained("proteinglm/proteinglm-1b-mlm", trust_remote_code=True, torch_dtype=torch.bfloat16)
35
  if torch.cuda.is_available():
36
  model = model.cuda()
37
  model.eval()
 
44
 
45
 
46
  # model for the sequence-level tasks
47
+ model = AutoModelForSequenceClassification.from_pretrained("proteinglm/proteinglm-10b-mlm", trust_remote_code=True, torch_dtype=torch.bfloat16)
48
 
49
  # model for the token-level tasks
50
+ model = AutoModelForTokenClassification.from_pretrained("proteinglm/proteinglm-10b-mlm", trust_remote_code=True, torch_dtype=torch.bfloat16)
51
 
52
  ```
53