Safetensors
Serbian
t5
procesaur commited on
Commit
f2b2899
·
verified ·
1 Parent(s): 1d5bed3

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +204 -0
README.md ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ datasets:
4
+ - procesaur/znanje
5
+ - procesaur/Vikipedija
6
+ - procesaur/Vikizvornik
7
+ - procesaur/kisobran
8
+ - jerteh/SrpELTeC
9
+ language:
10
+ - sr
11
+ ---
12
+
13
+ <table style="width:100%;height:100%">
14
+ <tr>
15
+ <td colspan=2>
16
+ <h4><i class="highlight-container"><b class="highlight">PiloT5</b></i></h4>
17
+ </td>
18
+ </tr>
19
+ <tr style="width:100%;height:100%">
20
+ <td width=50%>
21
+ <p>Аутоенкодер заснован на Т5 архитектури - 248 милиона параметара</p>
22
+ <p>Обучаван над корпусом српског језика - 4 милијарди речи</p>
23
+ <!--p>Једнака подршка уноса на ћирилици и латиници!</p-->
24
+ </td>
25
+ <td>
26
+ <p>T5 based Autoencoder - 248 million parameters</p>
27
+ <p>Trained on Serbian corpora - 4 billion words</p>
28
+ <!--p>Equal support for Cyrillic and Latin input!</p-->
29
+ </td>
30
+ </tr>
31
+ </table>
32
+
33
+ ```python
34
+ >>> from transformers import pipeline
35
+ >>> unmasker = pipeline('fill-mask', model='te-sla/teslaXLM')
36
+ >>> unmasker("Kada bi čovek znao gde će pasti on bi<mask>.")
37
+ ```
38
+
39
+ ```python
40
+ >>> from transformers import AutoTokenizer, AutoModelForMaskedLM
41
+ >>> from torch import LongTensor, no_grad
42
+ >>> from scipy import spatial
43
+ >>> tokenizer = AutoTokenizer.from_pretrained('te-sla/teslaXLM')
44
+ >>> model = AutoModelForMaskedLM.from_pretrained('te-sla/teslaXLM', output_hidden_states=True)
45
+ >>> x = " pas"
46
+ >>> y = " mačka"
47
+ >>> z = " svemir"
48
+ >>> tensor_x = LongTensor(tokenizer.encode(x, add_special_tokens=False)).unsqueeze(0)
49
+ >>> tensor_y = LongTensor(tokenizer.encode(y, add_special_tokens=False)).unsqueeze(0)
50
+ >>> tensor_z = LongTensor(tokenizer.encode(z, add_special_tokens=False)).unsqueeze(0)
51
+ >>> model.eval()
52
+ >>> with no_grad():
53
+ >>> vektor_x = model(input_ids=tensor_x).hidden_states[-1].squeeze()
54
+ >>> vektor_y = model(input_ids=tensor_y).hidden_states[-1].squeeze()
55
+ >>> vektor_z = model(input_ids=tensor_z).hidden_states[-1].squeeze()
56
+ >>> print(spatial.distance.cosine(vektor_x, vektor_y))
57
+ >>> print(spatial.distance.cosine(vektor_x, vektor_z))
58
+ ```
59
+
60
+ <div class="inline-flex flex-col" style="line-height: 1.5;padding-right:50px">
61
+ <div style="text-align: center; margin-top: 3px; font-size: 16px; font-weight: 800">Author</div>
62
+ <a href="https://huggingface.co/procesaur">
63
+ <div class="flex">
64
+ <div
65
+ style="display:DISPLAY_1; margin-left: auto; margin-right: auto; width: 92px; height:92px; border-radius: 50%;
66
+ background-size: cover; background-image: url(&#39;https://cdn-uploads.huggingface.co/production/uploads/1673534533167-63bc254fb8c61b8aa496a39b.jpeg?w=200&h=200&f=face&#39;)">
67
+ </div>
68
+ </div>
69
+ </a>
70
+ <div style="text-align: center; font-size: 16px; font-weight: 800">Mihailo Škorić</div>
71
+ <div>
72
+ <a href="https://huggingface.co/procesaur">
73
+ <div style="text-align: center; font-size: 14px;">@procesaur</div>
74
+ </a>
75
+ </div>
76
+ </div>
77
+ </div>
78
+
79
+
80
+
81
+ <div class="inline-flex flex-col" style="line-height: 1.5;padding-right:40px">
82
+ <div style="text-align: center; margin-top: 3px; font-size: 16px; font-weight: 800">Computation</div>
83
+ <a href="https://www.ai.gov.rs/">
84
+ <div class="flex">
85
+ <div
86
+ style="display:DISPLAY_1; margin-left: auto; margin-right: auto; width: 92px; height:92px; border-radius: 50%;
87
+ background-size: contain; background-image: url(https://www.ai.gov.rs/img/logo_60x120-2.png);background-repeat: no-repeat;
88
+ background-position: center;">
89
+ </div>
90
+ </div>
91
+ </a>
92
+ <div style="text-align: center; font-size: 16px; font-weight: 800" title="nVidia DGX-zasnovan sistem">Nacionalna AI platforma</div>
93
+ <div>
94
+ <a href="https://www.ai.gov.rs/">
95
+ <div style="text-align: center; font-size: 14px;">ai.gov.rs</div>
96
+ </a>
97
+ </div>
98
+ </div>
99
+ </div>
100
+
101
+ ## Cit.
102
+
103
+ ```bibtex
104
+ @inproceedings{skoricxlm,
105
+ author = {Mihailo Škorić, Saša Petalinkar},
106
+ title = {New XLM-R-based language models for Serbian and Serbo-Croatian},
107
+ booktitle = {ARTIFICAL INTELLIGENCE CONFERENCE},
108
+ year = {2024},
109
+ address = {Belgrade}
110
+ publisher = {SASA, Belgrade},
111
+ url = {}
112
+ }
113
+ ```
114
+ <br/>
115
+ <div id="zastava">
116
+ <div class="grb">
117
+ <img src="https://www.ai.gov.rs/img/logo_60x120-2.png" style="position:relative; left:30px; z-index:10; height:85px">
118
+ </div>
119
+ <table width=100% style="border:0px">
120
+ <tr style="background-color:#C6363C;width:100%;border:0px;height:30px"><td style="width:100vw"></td></tr>
121
+ <tr style="background-color:#0C4076;width:100%;border:0px;height:30px"><td></td></tr>
122
+ <tr style="background-color:#ffffff;width:100%;border:0px;height:30px"><td></td></tr>
123
+ </table>
124
+ </div>
125
+
126
+ <table style="width:100%;height:100%">
127
+ <tr style="width:100%;height:100%">
128
+ <td width=50%>
129
+ <p>Истраживање jе спроведено уз подршку Фонда за науку Републике Србиjе, #7276, Text Embeddings – Serbian Language Applications – TESLA</p>
130
+ </td>
131
+ <td>
132
+ <p>This research was supported by the Science Fund of the Republic of Serbia, #7276, Text Embeddings - Serbian Language Applications - TESLA</p>
133
+ </td>
134
+ </tr>
135
+ </table>
136
+
137
+
138
+
139
+ <style>
140
+ .ffeat: {
141
+ color:red
142
+ }
143
+
144
+ .cover {
145
+ width: 100%;
146
+ margin-bottom: 5pt
147
+ }
148
+
149
+ .highlight-container, .highlight {
150
+ position: relative;
151
+ text-decoration:none
152
+ }
153
+
154
+ .highlight-container {
155
+ display: inline-block;
156
+
157
+ }
158
+
159
+ .highlight{
160
+ color:white;
161
+ text-transform:uppercase;
162
+ font-size: 16pt;
163
+ }
164
+
165
+ .highlight-container{
166
+ padding:5px 10px
167
+ }
168
+
169
+ .highlight-container:before {
170
+ content: " ";
171
+ display: block;
172
+ height: 100%;
173
+ width: 100%;
174
+ margin-left: 0px;
175
+ margin-right: 0px;
176
+ position: absolute;
177
+ background: #e80909;
178
+ transform: rotate(2deg);
179
+ top: -1px;
180
+ left: -1px;
181
+ border-radius: 20% 25% 20% 24%;
182
+ padding: 10px 18px 18px 10px;
183
+ }
184
+
185
+ div.grb, #zastava>table {
186
+ position:absolute;
187
+ top:0px;
188
+ left: 0px;
189
+ margin:0px
190
+ }
191
+
192
+ div.grb>img, #zastava>table{
193
+ margin:0px
194
+ }
195
+
196
+ #zastava {
197
+ position: relative;
198
+ margin-bottom:120px
199
+ }
200
+
201
+ p {
202
+ font-size:14pt
203
+ }
204
+ </style>