Jaren commited on
Commit
2e625dd
·
1 Parent(s): 12df99f

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -21
README.md DELETED
@@ -1,21 +0,0 @@
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
8
- from collections import OrderedDict
9
-
10
- model_path = 'Langboat/mengzi-t5-base'
11
- model = T5ForConditionalGeneration.from_pretrained(model_path)
12
- tokenizer = T5Tokenizer.from_pretrained(model_path)
13
-
14
- ckp_path = 'mengzi-t5-base-chinese-dialogue/pytorch_model.ckpt'
15
- ckpt = torch.load(ckp_path, map_location="cpu")
16
- 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)
21
- ```