Jaren commited on
Commit
30caebd
1 Parent(s): afa4c05

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -1,7 +1,7 @@
1
  This model is based on Langboat/mengzi-t5-base and pre-trained on 11 Chinese dialogue datasets. It is trained on 8 Tesla A100 for 2 days.
2
 
3
  To load this model:
4
-
5
  import torch
6
  from transformers import T5Tokenizer
7
  from transformers import T5ForConditionalGeneration
@@ -17,4 +17,5 @@ old_state_dict = ckpt['state_dict']
17
  new_state_dict = OrderedDict()
18
  for k, v in old_state_dict.items() :
19
  new_state_dict[k.replace('model.', '')] = v
20
- model.load_state_dict(new_state_dict, strict=False)
 
 
1
  This model is based on Langboat/mengzi-t5-base and pre-trained on 11 Chinese dialogue datasets. It is trained on 8 Tesla A100 for 2 days.
2
 
3
  To load this model:
4
+ ```python
5
  import torch
6
  from transformers import T5Tokenizer
7
  from transformers import T5ForConditionalGeneration
 
17
  new_state_dict = OrderedDict()
18
  for k, v in old_state_dict.items() :
19
  new_state_dict[k.replace('model.', '')] = v
20
+ model.load_state_dict(new_state_dict, strict=False)
21
+ ```