Downloads · 30 days
63
5% of all-time downloads
DeepPavlov/t5-wikidata5M-with-neighbors
t5-wikidata5M-with-neighbors is a text generation model from DeepPavlov. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as openrail.
This is a t5-small model trained on the wikidata5M dataset.
Downloads · 30 days
63
5% of all-time downloads
All-time downloads
1.1K
Public
Repo size
485 MB
Likes
3
Public
Click a slice to open those files.
.bin242 MB · 99%
From the Hugging Face model README
This is a t5-small model trained on the wikidata5M dataset.
This model was trained on tail and entity prediction in a knowledge graph using the graph's context represented by the node's neighborhood.
Textual representation was obtained from wikidata entities and relation titles. Entity description was used to disambiguate if two entities had the same title. If still, no disambiguation was possible, we assigned unique numerical ids for such entities.
The neighborhood for the input was obtained as follows:
Neighborhood sorting by semantic proximity was performed using a pre-calculated matrix of cosine similarity of relations in KG, for similarity calculation the relations were embedded by the fasttext model.
We trained the model on the Wikidata5M dataset for approximately 5M iterations on 8xA100 GPUs using a batch size of 320.
To evaluate the model, we sample 50 times from the decoder for each input and then rank the predictions by their log probabilities. We achieve 0.319 Hits@1 on the test set.
One can load this model for their personal use of fine-tuning as follows:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("DeepPavlov/t5-wikidata5M-with-neighbors")
model = AutoModelForSeq2SeqLM.from_pretrained("DeepPavlov/t5-wikidata5M-with-neighbors")