Transformers
PyTorch
English
t5
text2text-generation
semantic-role-labeling
question-answer generation
text-generation-inference
Instructions to use kleinay/qanom-seq2seq-model-joint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kleinay/qanom-seq2seq-model-joint with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("kleinay/qanom-seq2seq-model-joint") model = AutoModelForSeq2SeqLM.from_pretrained("kleinay/qanom-seq2seq-model-joint", device_map="auto") - Notebooks
- Google Colab
- Kaggle
typo
Browse files
README.md
CHANGED
|
@@ -34,7 +34,7 @@ In order to use the model for QANom parsing easily, we suggest downloading the `
|
|
| 34 |
```python
|
| 35 |
from pipeline import QASRL_Pipeline
|
| 36 |
pipe = QASRL_Pipeline("kleinay/qanom-seq2seq-model-joint")
|
| 37 |
-
pipe("The student was interested in Luke 's <predicate> research about
|
| 38 |
```
|
| 39 |
Which will output:
|
| 40 |
```json
|
|
@@ -45,11 +45,11 @@ You can learn more about using `transformers.pipelines` in the [official docs](h
|
|
| 45 |
|
| 46 |
Notice that you need to specify which word in the sentence is the predicate, about which the question will interrogate. By default, you should precede the predicate with the `<predicate>` symbol, but you can also specify your own predicate marker:
|
| 47 |
```python
|
| 48 |
-
pipe("The student was interested in Luke 's <PRED> research about
|
| 49 |
```
|
| 50 |
In addition, you can specify additional kwargs for controling the model's decoding algorithm:
|
| 51 |
```python
|
| 52 |
-
pipe("The student was interested in Luke 's <predicate> research about
|
| 53 |
```
|
| 54 |
|
| 55 |
|
|
|
|
| 34 |
```python
|
| 35 |
from pipeline import QASRL_Pipeline
|
| 36 |
pipe = QASRL_Pipeline("kleinay/qanom-seq2seq-model-joint")
|
| 37 |
+
pipe("The student was interested in Luke 's <predicate> research about sea animals .", verb_form="research", predicate_type="nominal")
|
| 38 |
```
|
| 39 |
Which will output:
|
| 40 |
```json
|
|
|
|
| 45 |
|
| 46 |
Notice that you need to specify which word in the sentence is the predicate, about which the question will interrogate. By default, you should precede the predicate with the `<predicate>` symbol, but you can also specify your own predicate marker:
|
| 47 |
```python
|
| 48 |
+
pipe("The student was interested in Luke 's <PRED> research about sea animals .", verb_form="research", predicate_type="nominal", predicate_marker="<PRED>")
|
| 49 |
```
|
| 50 |
In addition, you can specify additional kwargs for controling the model's decoding algorithm:
|
| 51 |
```python
|
| 52 |
+
pipe("The student was interested in Luke 's <predicate> research about sea animals .", verb_form="research", predicate_type="nominal", num_beams=3)
|
| 53 |
```
|
| 54 |
|
| 55 |
|