File size: 1,517 Bytes
a1967f5 302de2d 6ea462a 302de2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
---
language:
- en
metrics:
- bleu
- meteor
- chrf
- comet
- bertscore
library_name: transformers
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
This model card lists fine-tuned byT5 model for the task of Text Generation from Meaning Representation (DRS).
## Model Details
We worked on a pre-trained byt5-base model and fine-tuned it with the Parallel Meaning Bank dataset (DRS-Text pairs dataset).
Furthermore, we enriched the gold_silver flavors of PMB (release 5.0.0) with different augmentation strategies.
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
To use the model, follow the code below for a quick response.
```python
from transformers import ByT5Tokenizer, T5ForConditionalGeneration
# Initialize the tokenizer and model
tokenizer = ByT5Tokenizer.from_pretrained('saadamin2k13/byT5_ft_generation', max_length=512)
model = T5ForConditionalGeneration.from_pretrained('saadamin2k13/byT5_ft_generation')
# Example sentence
example = "male.n.02 Name 'Tom' yell.v.01 Agent -1 Time +1 time.n.08 TPR now"
# Tokenize and prepare the input
x = tokenizer(example, return_tensors='pt', padding=True, truncation=True, max_length=512)['input_ids']
# Generate output
output = model.generate(x)
# Decode and print the output text
pred_text = tokenizer.decode(output[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
print(pred_text)
|