Other
Transformers
Safetensors
English
Russian
t5
text2text-generation
text-to-graph
webnlg
bt5
text-generation-inference
Instructions to use Loria-MosAIk/bt5-webnlg-en-ru with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Loria-MosAIk/bt5-webnlg-en-ru with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Loria-MosAIk/bt5-webnlg-en-ru") model = AutoModelForSeq2SeqLM.from_pretrained("Loria-MosAIk/bt5-webnlg-en-ru", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Streamline the usage notes around the examples
Browse files
README.md
CHANGED
|
@@ -33,20 +33,20 @@ outputs = model.generate(**inputs, num_beams=5, max_new_tokens=256)
|
|
| 33 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_spaces=False))
|
| 34 |
```
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
```text
|
| 39 |
<S> Lina Dorado <P> birth year <O> 1975 <S> Lina Dorado <P> birth place <O> Bogotá
|
| 40 |
```
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
```text
|
| 45 |
Input: Parse Russian Валюта Индии - Индийская рупия.
|
| 46 |
Output: <S> India <P> currency <O> Indian rupee
|
| 47 |
```
|
| 48 |
|
| 49 |
-
The
|
| 50 |
|
| 51 |
The [base model](https://huggingface.co/cointegrated/rut5-base-multitask) is distributed under MIT. The WebNLG data used for fine-tuning are distributed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
|
| 52 |
|
|
|
|
| 33 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_spaces=False))
|
| 34 |
```
|
| 35 |
|
| 36 |
+
English output (`<S>` = subject, `<P>` = relation, `<O>` = object):
|
| 37 |
|
| 38 |
```text
|
| 39 |
<S> Lina Dorado <P> birth year <O> 1975 <S> Lina Dorado <P> birth place <O> Bogotá
|
| 40 |
```
|
| 41 |
|
| 42 |
+
Russian example:
|
| 43 |
|
| 44 |
```text
|
| 45 |
Input: Parse Russian Валюта Индии - Индийская рупия.
|
| 46 |
Output: <S> India <P> currency <O> Indian rupee
|
| 47 |
```
|
| 48 |
|
| 49 |
+
The scorer counts identical predicted triples only once per input.
|
| 50 |
|
| 51 |
The [base model](https://huggingface.co/cointegrated/rut5-base-multitask) is distributed under MIT. The WebNLG data used for fine-tuning are distributed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
|
| 52 |
|