Update README.md
Browse files
README.md
CHANGED
@@ -28,7 +28,7 @@ You can use the model directly with a pipeline for text2text generation:
|
|
28 |
>>> model = T5ForConditionalGeneration.from_pretrained("uer/t5-small-chinese-cluecorpussmall")
|
29 |
>>> text2text_generator = Text2TextGenerationPipeline(model, tokenizer)
|
30 |
>>> text2text_generator("中国的首都是extra0京", max_length=50, do_sample=False)
|
31 |
-
|
32 |
```
|
33 |
|
34 |
|
@@ -98,7 +98,7 @@ Finally, we convert the pre-trained model into Huggingface's format:
|
|
98 |
```
|
99 |
python3 scripts/convert_t5_from_uer_to_huggingface.py --input_model_path cluecorpussmall_t5_seq512_model.bin-250000 \
|
100 |
--output_model_path pytorch_model.bin \
|
101 |
-
--layers_num
|
102 |
--type t5
|
103 |
```
|
104 |
|
|
|
28 |
>>> model = T5ForConditionalGeneration.from_pretrained("uer/t5-small-chinese-cluecorpussmall")
|
29 |
>>> text2text_generator = Text2TextGenerationPipeline(model, tokenizer)
|
30 |
>>> text2text_generator("中国的首都是extra0京", max_length=50, do_sample=False)
|
31 |
+
[{'generated_text': 'extra0 北 extra1 extra2 extra3 extra4 extra5'}]
|
32 |
```
|
33 |
|
34 |
|
|
|
98 |
```
|
99 |
python3 scripts/convert_t5_from_uer_to_huggingface.py --input_model_path cluecorpussmall_t5_seq512_model.bin-250000 \
|
100 |
--output_model_path pytorch_model.bin \
|
101 |
+
--layers_num 6 \
|
102 |
--type t5
|
103 |
```
|
104 |
|