
# Model Card of `lmqg/mt5-base-ruquad-ae`
This model is fine-tuned version of [google/mt5-base](https://huggingface.co/google/mt5-base) for answer extraction on the [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).


### Overview
- **Language model:** [google/mt5-base](https://huggingface.co/google/mt5-base)   
- **Language:** ru  
- **Training data:** [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) (default)
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
- **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)

### Usage
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
```python
from lmqg import TransformersQG

# initialize model
model = TransformersQG(language="ru", model="lmqg/mt5-base-ruquad-ae")

# model prediction
answers = model.generate_a("Нелишним будет отметить, что, развивая это направление, Д. И. Менделеев, поначалу априорно выдвинув идею о температуре, при которой высота мениска будет нулевой, в мае 1860 года провёл серию опытов.")

```

- With `transformers`
```python
from transformers import pipeline

pipe = pipeline("text2text-generation", "lmqg/mt5-base-ruquad-ae")
output = pipe("<hl> в английском языке в нарицательном смысле применяется термин rapid transit (скоростной городской транспорт), однако употребляется он только тогда, когда по смыслу невозможно ограничиться названием одной конкретной системы метрополитена. <hl> в остальных случаях используются индивидуальные названия: в лондоне — london underground, в нью-йорке — new york subway, в ливерпуле — merseyrail, в вашингтоне — washington metrorail, в сан-франциско — bart и т. п. в некоторых городах применяется название метро (англ. metro) для систем, по своему характеру близких к метро, или для всего городского транспорта (собственно метро и наземный пассажирский транспорт (в том числе автобусы и трамваи)) в совокупности.")

```

## Evaluation


- ***Metric (Answer Extraction)***: [raw metric file](https://huggingface.co/lmqg/mt5-base-ruquad-ae/raw/main/eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_ruquad.default.json) 

|                  |   Score | Type    | Dataset                                                          |
|:-----------------|--------:|:--------|:-----------------------------------------------------------------|
| AnswerExactMatch |   28.59 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| AnswerF1Score    |   54.69 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| BERTScore        |   79.99 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| Bleu_1           |   25.63 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| Bleu_2           |   21.45 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| Bleu_3           |   17.68 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| Bleu_4           |   14.19 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| METEOR           |   32.52 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| MoverScore       |   66.44 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
| ROUGE_L          |   41.79 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |



## Training hyperparameters

The following hyperparameters were used during fine-tuning:
 - dataset_path: lmqg/qg_ruquad
 - dataset_name: default
 - input_types: ['paragraph_sentence']
 - output_types: ['answer']
 - prefix_types: None
 - model: google/mt5-base
 - max_length: 512
 - max_length_output: 32
 - epoch: 5
 - batch: 8
 - lr: 0.001
 - fp16: False
 - random_seed: 1
 - gradient_accumulation_steps: 8
 - label_smoothing: 0.15

The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-base-ruquad-ae/raw/main/trainer_config.json).

## Citation
```
@inproceedings{ushio-etal-2022-generative,
    title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
    author = "Ushio, Asahi  and
        Alva-Manchego, Fernando  and
        Camacho-Collados, Jose",
    booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
    month = dec,
    year = "2022",
    address = "Abu Dhabi, U.A.E.",
    publisher = "Association for Computational Linguistics",
}

```

{"language": "ru", "license": "cc-by-4.0", "tags": ["answer extraction"], "datasets": ["lmqg/qg_ruquad"], "metrics": ["bleu4", "meteor", "rouge-l", "bertscore", "moverscore"], "pipeline_tag": "text2text-generation", "widget": [{"text": "<hl> \u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432 \u043d\u0430\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0440\u043c\u0438\u043d rapid transit (\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u043d\u043e\u0439 \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442), \u043e\u0434\u043d\u0430\u043a\u043e \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0435\u0442\u0440\u043e\u043f\u043e\u043b\u0438\u0442\u0435\u043d\u0430. <hl> \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f: \u0432 \u043b\u043e\u043d\u0434\u043e\u043d\u0435 \u2014 london underground, \u0432 \u043d\u044c\u044e-\u0439\u043e\u0440\u043a\u0435 \u2014 new york subway, \u0432 \u043b\u0438\u0432\u0435\u0440\u043f\u0443\u043b\u0435 \u2014 merseyrail, \u0432 \u0432\u0430\u0448\u0438\u043d\u0433\u0442\u043e\u043d\u0435 \u2014 washington metrorail, \u0432 \u0441\u0430\u043d-\u0444\u0440\u0430\u043d\u0446\u0438\u0441\u043a\u043e \u2014 bart \u0438 \u0442. \u043f. \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0433\u043e\u0440\u043e\u0434\u0430\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u043e (\u0430\u043d\u0433\u043b. metro) \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c, \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0443 \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u043a \u043c\u0435\u0442\u0440\u043e, \u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0433\u043e \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430 (\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u0440\u043e \u0438 \u043d\u0430\u0437\u0435\u043c\u043d\u044b\u0439 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u0441\u043a\u0438\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u0431\u0443\u0441\u044b \u0438 \u0442\u0440\u0430\u043c\u0432\u0430\u0438)) \u0432 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438.", "example_title": "Answering Extraction Example 1"}, {"text": "\u0412\u043e\u043f\u0440\u0435\u043a\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044e \u0438\u043d\u0444\u043b\u044f\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u0437\u0430\u043a\u0434\u0435\u043d\u0437\u043d\u0430\u043a\u0438 \u0441\u0442\u0430\u043b\u0438 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u0435\u0441\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 1924 \u0433\u043e\u0434\u0443. \u0414\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u043d\u0435\u0436\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u044d\u043c\u0438\u0441\u0441\u0438\u044e \u0437\u0430\u043a\u0434\u0435\u043d\u0437\u043d\u0430\u043a\u043e\u0432 \u0438 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432 \u043e\u0431\u043e\u0440\u043e\u0442 \u043a\u0443\u043f\u044e\u0440\u044b \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0432. <hl> \u0422\u0430\u043a, \u0432 \u043f\u0435\u0440\u0438\u043e\u0434 \u0441 1 \u044f\u043d\u0432\u0430\u0440\u044f \u043f\u043e 20 \u043c\u0430\u0440\u0442\u0430 1924 \u0433\u043e\u0434\u0430 \u0431\u044b\u043b\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u043e\u0431\u043e\u0440\u043e\u0442 \u043a\u0443\u043f\u044e\u0440\u044b \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e\u043c 25 000 000 \u0440\u0443\u0431\u043b\u0435\u0439, \u0437\u0430\u0442\u0435\u043c \u2014 250 000 000 \u0440\u0443\u0431\u043b\u0435\u0439. <hl> \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432 \u0430\u043f\u0440\u0435\u043b\u0435 1924 \u0433\u043e\u0434\u0430 \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u044b \u043a\u0443\u043f\u044e\u0440\u044b \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 (\u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0435\u0447\u0438\u0438 \u043b\u0438\u043c\u0430\u0440\u0434).", "example_title": "Answering Extraction Example 2"}], "model-index": [{"name": "lmqg/mt5-base-ruquad-ae", "results": [{"task": {"type": "text2text-generation", "name": "Text2text Generation"}, "dataset": {"name": "lmqg/qg_ruquad", "type": "default", "args": "default"}, "metrics": [{"type": "bleu4_answer_extraction", "value": 14.19, "name": "BLEU4 (Answer Extraction)"}, {"type": "rouge_l_answer_extraction", "value": 41.79, "name": "ROUGE-L (Answer Extraction)"}, {"type": "meteor_answer_extraction", "value": 32.52, "name": "METEOR (Answer Extraction)"}, {"type": "bertscore_answer_extraction", "value": 79.99, "name": "BERTScore (Answer Extraction)"}, {"type": "moverscore_answer_extraction", "value": 66.44, "name": "MoverScore (Answer Extraction)"}, {"type": "answer_f1_score__answer_extraction", "value": 54.69, "name": "AnswerF1Score (Answer Extraction)"}, {"type": "answer_exact_match_answer_extraction", "value": 28.59, "name": "AnswerExactMatch (Answer Extraction)"}]}]}]}
transformers pytorch mt5 text2text-generation answer extraction ru dataset:lmqg/qg_ruquad arxiv:2210.03992 license:cc-by-4.0 model-index autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #mt5 #text2text-generation #answer extraction #ru #dataset-lmqg/qg_ruquad #arxiv-2210.03992 #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

Model Card of 'lmqg/mt5-base-ruquad-ae'
=======================================


This model is fine-tuned version of google/mt5-base for answer extraction on the lmqg/qg\_ruquad (dataset\_name: default) via 'lmqg'.


### Overview


* Language model: google/mt5-base
* Language: ru
* Training data: lmqg/qg\_ruquad (default)
* Online Demo: URL
* Repository: URL
* Paper: URL


### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


* *Metric (Answer Extraction)*: raw metric file



Training hyperparameters
------------------------


The following hyperparameters were used during fine-tuning:


* dataset\_path: lmqg/qg\_ruquad
* dataset\_name: default
* input\_types: ['paragraph\_sentence']
* output\_types: ['answer']
* prefix\_types: None
* model: google/mt5-base
* max\_length: 512
* max\_length\_output: 32
* epoch: 5
* batch: 8
* lr: 0.001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 8
* label\_smoothing: 0.15


The full configuration can be found at fine-tuning config file.



### Overview


* Language model: google/mt5-base
* Language: ru
* Training data: lmqg/qg\_ruquad (default)
* Online Demo: URL
* Repository: URL
* Paper: URL ### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


* *Metric (Answer Extraction)*: raw metric file



Training hyperparameters
------------------------


The following hyperparameters were used during fine-tuning:


* dataset\_path: lmqg/qg\_ruquad
* dataset\_name: default
* input\_types: ['paragraph\_sentence']
* output\_types: ['answer']
* prefix\_types: None
* model: google/mt5-base
* max\_length: 512
* max\_length\_output: 32
* epoch: 5
* batch: 8
* lr: 0.001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 8
* label\_smoothing: 0.15


The full configuration can be found at fine-tuning config file.
TAGS
#transformers #pytorch #mt5 #text2text-generation #answer extraction #ru #dataset-lmqg/qg_ruquad #arxiv-2210.03992 #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 ### Overview


* Language model: google/mt5-base
* Language: ru
* Training data: lmqg/qg\_ruquad (default)
* Online Demo: URL
* Repository: URL
* Paper: URL ### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


* *Metric (Answer Extraction)*: raw metric file



Training hyperparameters
------------------------


The following hyperparameters were used during fine-tuning:


* dataset\_path: lmqg/qg\_ruquad
* dataset\_name: default
* input\_types: ['paragraph\_sentence']
* output\_types: ['answer']
* prefix\_types: None
* model: google/mt5-base
* max\_length: 512
* max\_length\_output: 32
* epoch: 5
* batch: 8
* lr: 0.001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 8
* label\_smoothing: 0.15


The full configuration can be found at fine-tuning config file.
TAGS
#transformers #pytorch #mt5 #text2text-generation #answer extraction #ru #dataset-lmqg/qg_ruquad #arxiv-2210.03992 #license-cc-by-4.0 #model-index #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
### Overview


* Language model: google/mt5-base
* Language: ru
* Training data: lmqg/qg\_ruquad (default)
* Online Demo: URL
* Repository: URL
* Paper: URL### Usage


* With 'lmqg'
* With 'transformers'


Evaluation
----------


* *Metric (Answer Extraction)*: raw metric file



Training hyperparameters
------------------------


The following hyperparameters were used during fine-tuning:


* dataset\_path: lmqg/qg\_ruquad
* dataset\_name: default
* input\_types: ['paragraph\_sentence']
* output\_types: ['answer']
* prefix\_types: None
* model: google/mt5-base
* max\_length: 512
* max\_length\_output: 32
* epoch: 5
* batch: 8
* lr: 0.001
* fp16: False
* random\_seed: 1
* gradient\_accumulation\_steps: 8
* label\_smoothing: 0.15


The full configuration can be found at fine-tuning config file.