Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import json
|
| 2 |
import torch
|
| 3 |
from transformers import AutoTokenizer
|
|
@@ -20,4 +50,34 @@ inputs = self.tokenizer(prompt, add_special_tokens=True, max_length=526,return_t
|
|
| 20 |
outputs = self.model.generate(inputs, max_new_tokens=length, pad_token_id=self.tokenizer.eos_token_id)
|
| 21 |
|
| 22 |
response = self.tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
| 23 |
-
print(response[0])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags: []
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Model Card for Model ID
|
| 7 |
+
|
| 8 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
## Model Details
|
| 13 |
+
|
| 14 |
+
### Model Description
|
| 15 |
+
|
| 16 |
+
<!-- Provide a longer summary of what this model is. -->
|
| 17 |
+
|
| 18 |
+
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 19 |
+
|
| 20 |
+
- **Developed by:** Sefika Efeoglu
|
| 21 |
+
|
| 22 |
+
- **Model type:** text-to-text
|
| 23 |
+
- **Language(s) (NLP):** [More Information Needed]
|
| 24 |
+
- **License:** [More Information Needed]
|
| 25 |
+
- **Finetuned from model [optional]:** https://huggingface.co/google/flan-t5-base
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
## Uses
|
| 29 |
+
|
| 30 |
+
```python
|
| 31 |
import json
|
| 32 |
import torch
|
| 33 |
from transformers import AutoTokenizer
|
|
|
|
| 50 |
outputs = self.model.generate(inputs, max_new_tokens=length, pad_token_id=self.tokenizer.eos_token_id)
|
| 51 |
|
| 52 |
response = self.tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
| 53 |
+
print(response[0])
|
| 54 |
+
#"Cause-Effect(e1,e2)"
|
| 55 |
+
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
## Training Details
|
| 60 |
+
|
| 61 |
+
### Training Data
|
| 62 |
+
|
| 63 |
+
semeval-2010-task8
|
| 64 |
+
[More Information Needed]
|
| 65 |
+
|
| 66 |
+
### Training Procedure
|
| 67 |
+
|
| 68 |
+
5 fold cross validation with sentence and relation types. Input is sentence and the output is relation types
|
| 69 |
+
|
| 70 |
+
#### Training Hyperparameters
|
| 71 |
+
|
| 72 |
+
Epoch:5, BS:16 and others are default.
|
| 73 |
+
|
| 74 |
+
#### Hardware
|
| 75 |
+
|
| 76 |
+
Colab Pro+ A100.
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
## Citation [optional]
|
| 81 |
+
|
| 82 |
+
Efeoglu, Sefika, and Adrian Paschke. "Retrieval-Augmented Generation-based Relation Extraction." arXiv preprint arXiv:2404.13397 (2024).
|
| 83 |
+
|