1
1
<img align =" center " src =" data/st5.png " alt =" simpleT5 " >
2
2
3
3
<p align =" center " >
4
- <b >Quickly train T5 models in just 3 lines of code with ONNX inference
4
+ <b >Quickly train T5/mT5/byT5 models in just 3 lines of code
5
5
</b >
6
6
</p >
7
-
8
7
<p align =" center " >
9
8
<a href =" https://badge.fury.io/py/simplet5 " ><img src =" https://badge.fury.io/py/simplet5.svg " alt =" PyPI version " height =" 18 " ></a >
10
9
11
10
<a href =" https://badge.fury.io/py/simplet5 " >
12
11
<img alt="Stars" src="https://img.shields.io/github/stars/Shivanandroy/simpleT5?color=blue">
13
12
</a>
14
13
<a href =" https://pepy.tech/project/simplet5 " >
15
- <img alt="Stats" src="https://static.pepy.tech/personalized-badge/simplet5?period=month &units=international_system&left_color=black&right_color=orange &left_text=downloads/month ">
14
+ <img alt="Stats" src="https://static.pepy.tech/personalized-badge/simplet5?period=total &units=international_system&left_color=black&right_color=brightgreen &left_text=Downloads ">
16
15
</a>
17
16
<a href =" https://opensource.org/licenses/MIT " >
18
17
<img alt="License" src="https://img.shields.io/badge/License-MIT-yellow.svg">
@@ -41,7 +40,7 @@ from simplet5 import SimpleT5
41
40
# instantiate
42
41
model = SimpleT5()
43
42
44
- # load (supports t5, mt5 models)
43
+ # load (supports t5, mt5, byT5 models)
45
44
model.from_pretrained(" t5" ," t5-base" )
46
45
47
46
# train
@@ -63,10 +62,6 @@ model.load_model("t5","path/to/trained/model/directory", use_gpu=False)
63
62
# predict
64
63
model.predict(" input text for prediction" )
65
64
66
- # need faster inference on CPU, get ONNX support
67
- model.convert_and_load_onnx_model(" path/to/T5 model/directory" )
68
- model.onnx_predict(" input text for prediction" )
69
-
70
65
```
71
66
## Articles
72
67
- [ Geek Culture: simpleT5 — Train T5 Models in Just 3 Lines of Code] ( https://medium.com/geekculture/simplet5-train-t5-models-in-just-3-lines-of-code-by-shivanand-roy-2021-354df5ae46ba )
0 commit comments