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 |
+
- GPT2
|
| 13 |
+
- generisanje
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
<h4>Mali generativni model za srpski jezik.</h4>
|
| 18 |
+
|
| 19 |
+
<div id="zastava">
|
| 20 |
+
<div class="grb">
|
| 21 |
+
<img src="https://www.ai.gov.rs/img/logo_60x120-2.png" style="position:relative; left:30px; z-index:10; height:85px">
|
| 22 |
+
</div>
|
| 23 |
+
<table width=100% style="border:0px">
|
| 24 |
+
<tr style="background-color:#C6363C;width:100%;border:0px;height:30px"><td></td></tr>
|
| 25 |
+
<tr style="background-color:#0C4076;width:100%;border:0px;height:30px"><td></td></tr>
|
| 26 |
+
<tr style="background-color:#ffffff;width:100%;border:0px;height:30px"><td></td></tr>
|
| 27 |
+
</table>
|
| 28 |
+
</div>
|
| 29 |
+
|
| 30 |
+
Generiše novi tekst, ili nastavlja započeti tekstualni unos.\
|
| 31 |
+
Jednaka podrška unosa i na ćirilici i na latinici!
|
| 32 |
+
|
| 33 |
+
## Upotreba
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
>>> from transformers import pipeline, set_seed
|
| 37 |
+
>>> generator = pipeline('text-generation', model='jerteh/gpt2-vrabac')
|
| 38 |
+
>>> set_seed(23)
|
| 39 |
+
>>> generator("", max_length=30, num_return_sequences=5)
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
[{'generated_text': 'Ja, međutim, ne idem na Adu - kaže Miodrag.'},
|
| 44 |
+
{'generated_text': 'Domaćinstvo se nalazilo na mestu zvanom Kulina (ranije Kulina Vakuf) i bilo je jedno od najvećih i naj'},
|
| 45 |
+
{'generated_text': 'Regionalne razlike se uglavnom odnose na geografski položaj, geografsko-geografski položaj i ekonomsku razvijenost.'},
|
| 46 |
+
{'generated_text': 'Od tada do danas Srbija ne stoji na nogama'},
|
| 47 |
+
{'generated_text': 'Iz tog razloga, na ovaj način se postiže bolja efikasnost rada, odnosno smanjuje se vreme potrebno za sprovođenje simulacije.'}]
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
Pored navedenih, model je obučavan i na ostalim korpusima [Društva za jezičke resurse i tehnologije](https://jerteh.rs), uključujući korpuse savremenog srpskog jezika: SrpKor2013 i SrpKor2021,
|
| 51 |
+
kao i korpus [PDRS 1.0](https://www.clarin.si/repository/xmlui/handle/11356/1752) razvijen od strane Instituta za Srpski jezik SANU.
|
| 52 |
+
|
| 53 |
+
<h4>U slučaju potrebe za većim modelom, pogledajte <a href="https://huggingface.co/jerteh/gpt2-orao" class="highlight-container"><b class="highlight">gpt2-orao</b></a> --
|
| 54 |
+
najveći generativni model za srpski jezik.</h4>
|
| 55 |
+
|
| 56 |
+
Modeli su obučavani na Nacionalnoj platformi za veštačku inteligenciju Srbije (sistem koji se bazira na nVidia DGX sistemima).
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
<div class="inline-flex flex-col" style="line-height: 1.5;">
|
| 60 |
+
<div style="text-align: center; margin-top: 3px; font-size: 16px; font-weight: 800">Autor</div>
|
| 61 |
+
<a href="https://huggingface.co/procesaur">
|
| 62 |
+
<div class="flex">
|
| 63 |
+
<div
|
| 64 |
+
style="display:DISPLAY_1; margin-left: auto; margin-right: auto; width: 92px; height:92px; border-radius: 50%;
|
| 65 |
+
background-size: cover; background-image: url('https://cdn-uploads.huggingface.co/production/uploads/1673534533167-63bc254fb8c61b8aa496a39b.jpeg?w=200&h=200&f=face')">
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
</a>
|
| 69 |
+
<div style="text-align: center; font-size: 16px; font-weight: 800">Mihailo Škorić</div>
|
| 70 |
+
<div>
|
| 71 |
+
<a href="https://huggingface.co/procesaur">
|
| 72 |
+
<div style="text-align: center; font-size: 14px;">@procesaur</div>
|
| 73 |
+
</a>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
<style>
|
| 79 |
+
|
| 80 |
+
.highlight-container, .highlight {
|
| 81 |
+
position: relative;
|
| 82 |
+
text-decoration:none
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.highlight-container {
|
| 86 |
+
display: inline-block;
|
| 87 |
+
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.highlight{
|
| 91 |
+
color:white;
|
| 92 |
+
text-transform:uppercase;
|
| 93 |
+
font-size: 16pt
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.highlight-container:before {
|
| 97 |
+
content: " ";
|
| 98 |
+
display: block;
|
| 99 |
+
height: 110%;
|
| 100 |
+
width: 110%;
|
| 101 |
+
margin-left: 0px;
|
| 102 |
+
margin-right: 0px;
|
| 103 |
+
position: absolute;
|
| 104 |
+
background: #e80909;
|
| 105 |
+
transform: rotate(2deg);
|
| 106 |
+
top: -1px;
|
| 107 |
+
left: -1px;
|
| 108 |
+
border-radius: 20% 25% 20% 24%;
|
| 109 |
+
padding: 10px 3px 3px 10px;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
div.grb, #zastava>table {
|
| 113 |
+
position:absolute;
|
| 114 |
+
top:0px;
|
| 115 |
+
left: 0px;
|
| 116 |
+
margin:0px
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
div.grb>img, #zastava>table{
|
| 120 |
+
margin:0px
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
#zastava {
|
| 124 |
+
position: relative;
|
| 125 |
+
margin-bottom:120px
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
</style>
|