Downloads · 30 days
0
0% of all-time downloads
timcryt/epo_lstm
epo_lstm is a text generation model from timcryt. Use it when you need the model to write or continue text. The card lists the license as cc-by-sa-4.0.
This is a simple generative LSTM model for Esperanto, trained on public data from Esperanto Telegram groups, using internet slang and informal language style.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
2
Public
Repo size
58.8 MB
Likes
0
Public
Click a slice to open those files.
.safetensors58.8 MB · 100%
From the Hugging Face model README
This is a simple generative LSTM model for Esperanto, trained on public data from Esperanto Telegram groups, using internet slang and informal language style.
Tio ĉi estas simpla generativa LSTM-modelo por Esperanto, trejnita per publikaj datumoj de esperantaj Telegram-grupoj, uzante interretan slangon kaj neformalan stilon.
The model can be used in two modes - generative (in this case a simple query is enough), and dialog (in this case the query must end with the ">" symbol). Note - due to the peculiarities of the training data in the dialog mode the model barely preserves the semantics of the question, and using this mode is not recommended.
La modelo uzeblas en du reĝimoj: generativa (ĉi-okaze sufiĉas simpla demando ) kaj dialoga (ĉi-okaze la demando devas finiĝi je la simbolo ">"). Bonvolu noti, ke pro la naturo de la trejnaj datumoj en dialoga reĝimo la modelo apenaŭ konservas la semantikon de la demando, kaj uzi ĉi tiun reĝimon estas malrekomendinde.
from epo_lstm import LSTMGeneratorPipeline, EOLSTMGenerator
from transformers import PreTrainedTokenizerFast
generator = LSTMGeneratorPipeline(
model=EOLSTMGenerator.from_pretrained("./version_1"),
tokenizer=PreTrainedTokenizerFast(
tokenizer_file="./version_1/tokenizer.json",
bos_token="[BOS]",
eos_token="\n",
unk_token="[UNK]",
pad_token="[PAD]",
),
)
print(generator('saluton, mi estas'))