add python model, readme
Browse files- README.md +75 -0
- config.json +1 -1
- pytorch_model.bin +3 -0
README.md
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- af
|
5 |
+
- az
|
6 |
+
- be
|
7 |
+
- bg
|
8 |
+
- bn
|
9 |
+
- ca
|
10 |
+
- cs
|
11 |
+
- cy
|
12 |
+
- da
|
13 |
+
- de
|
14 |
+
- el
|
15 |
+
- en
|
16 |
+
- eo
|
17 |
+
- es
|
18 |
+
- et
|
19 |
+
- eu
|
20 |
+
- fa
|
21 |
+
- fi
|
22 |
+
- fr
|
23 |
+
- fy
|
24 |
+
- ga
|
25 |
+
- gl
|
26 |
+
- gu
|
27 |
+
- he
|
28 |
+
- hi
|
29 |
+
- hu
|
30 |
+
- hy
|
31 |
+
- id
|
32 |
+
- is
|
33 |
+
- it
|
34 |
+
- ka
|
35 |
+
- kk
|
36 |
+
- ky
|
37 |
+
- la
|
38 |
+
- lt
|
39 |
+
- lv
|
40 |
+
- mg
|
41 |
+
- mk
|
42 |
+
- ml
|
43 |
+
- mt
|
44 |
+
- nl
|
45 |
+
- pa
|
46 |
+
- pl
|
47 |
+
- pt
|
48 |
+
- ro
|
49 |
+
- ru
|
50 |
+
- sk
|
51 |
+
- sq
|
52 |
+
- sv
|
53 |
+
- ta
|
54 |
+
- te
|
55 |
+
- th
|
56 |
+
- tr
|
57 |
+
- uk
|
58 |
+
- yi
|
59 |
+
- yo
|
60 |
+
datasets:
|
61 |
+
- benjamin/compoundpiece
|
62 |
+
---
|
63 |
+
|
64 |
+
Compound normalization model from [CompoundPiece: Evaluating and Improving Decompounding Performance of Language Models](https://arxiv.org/abs/2305.14214).
|
65 |
+
|
66 |
+
## Usage
|
67 |
+
|
68 |
+
```
|
69 |
+
from transformers import pipeline
|
70 |
+
|
71 |
+
pipe = pipeline("text2text-generation", "benjamin/compoundpiece")
|
72 |
+
|
73 |
+
pipe("Hauswirtschaftslehre", max_length=32)
|
74 |
+
# [{'generated_text': 'Haus-Wirtschaft-Lehre'}]
|
75 |
+
```
|
config.json
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "/home/patrick/t5/byt5-base",
|
3 |
"architectures": [
|
4 |
"T5ForConditionalGeneration"
|
5 |
],
|
@@ -26,6 +25,7 @@
|
|
26 |
"relative_attention_num_buckets": 32,
|
27 |
"tie_word_embeddings": false,
|
28 |
"tokenizer_class": "ByT5Tokenizer",
|
|
|
29 |
"transformers_version": "4.26.0",
|
30 |
"use_cache": true,
|
31 |
"vocab_size": 384
|
|
|
1 |
{
|
|
|
2 |
"architectures": [
|
3 |
"T5ForConditionalGeneration"
|
4 |
],
|
|
|
25 |
"relative_attention_num_buckets": 32,
|
26 |
"tie_word_embeddings": false,
|
27 |
"tokenizer_class": "ByT5Tokenizer",
|
28 |
+
"torch_dtype": "float32",
|
29 |
"transformers_version": "4.26.0",
|
30 |
"use_cache": true,
|
31 |
"vocab_size": 384
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0776ceaa762993d843dc71ae3c7f0688477855533d367423b345aafcc5fca828
|
3 |
+
size 2326696509
|