|
|
--- |
|
|
language: uk |
|
|
license: mit |
|
|
tags: |
|
|
- generated_from_trainer |
|
|
widget: |
|
|
- text: Що відправлять для ЗСУ? |
|
|
context: Про це повідомив міністр оборони Арвідас Анушаускас. Уряд Литви не має |
|
|
наміру зупинятися у військово-технічній допомозі Україні. Збройні сили отримають |
|
|
антидрони, тепловізори та ударний безпілотник. «Незабаром Литва передасть Україні |
|
|
не лише обіцяні бронетехніку, вантажівки та позашляховики, але також нову партію |
|
|
антидронів та тепловізорів. І, звичайно, Байрактар, який придбають на зібрані |
|
|
литовцями гроші», - написав глава Міноборони. |
|
|
base_model: ukr-models/xlm-roberta-base-uk |
|
|
model-index: |
|
|
- name: ukrainian-qa |
|
|
results: [] |
|
|
--- |
|
|
|
|
|
<!-- This model card has been generated automatically according to the information the Trainer had access to. You |
|
|
should probably proofread and complete it, then remove this comment. --> |
|
|
|
|
|
# ukrainian-qa |
|
|
|
|
|
This model is a fine-tuned version of [ukr-models/xlm-roberta-base-uk](https://huggingface.co/ukr-models/xlm-roberta-base-uk) on the [UA-SQuAD](https://github.com/fido-ai/ua-datasets/tree/main/ua_datasets/src/question_answering) dataset. |
|
|
|
|
|
Link to training scripts - [https://github.com/robinhad/ukrainian-qa](https://github.com/robinhad/ukrainian-qa) |
|
|
It achieves the following results on the evaluation set: |
|
|
- Loss: 1.4778 |
|
|
|
|
|
## Model description |
|
|
|
|
|
More information needed |
|
|
|
|
|
## How to use |
|
|
|
|
|
```python |
|
|
from transformers import pipeline, AutoTokenizer, AutoModelForQuestionAnswering |
|
|
model_name = "robinhad/ukrainian-qa" |
|
|
|
|
|
tokenizer = AutoTokenizer.from_pretrained(model_name) |
|
|
model = AutoModelForQuestionAnswering.from_pretrained(model_name) |
|
|
|
|
|
qa_model = pipeline("question-answering", model=model.to("cpu"), tokenizer=tokenizer) |
|
|
question = "Де ти живеш?" |
|
|
context = "Мене звати Сара і я живу у Лондоні" |
|
|
qa_model(question = question, context = context) |
|
|
``` |
|
|
|
|
|
## Intended uses & limitations |
|
|
|
|
|
More information needed |
|
|
|
|
|
## Training and evaluation data |
|
|
|
|
|
More information needed |
|
|
|
|
|
## Training procedure |
|
|
|
|
|
### Training hyperparameters |
|
|
|
|
|
The following hyperparameters were used during training: |
|
|
- learning_rate: 2e-05 |
|
|
- train_batch_size: 16 |
|
|
- eval_batch_size: 16 |
|
|
- seed: 42 |
|
|
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 |
|
|
- lr_scheduler_type: linear |
|
|
- num_epochs: 6 |
|
|
|
|
|
### Training results |
|
|
|
|
|
| Training Loss | Epoch | Step | Validation Loss | |
|
|
|:-------------:|:-----:|:----:|:---------------:| |
|
|
| 2.4526 | 1.0 | 650 | 1.3631 | |
|
|
| 1.3317 | 2.0 | 1300 | 1.2229 | |
|
|
| 1.0693 | 3.0 | 1950 | 1.2184 | |
|
|
| 0.6851 | 4.0 | 2600 | 1.3171 | |
|
|
| 0.5594 | 5.0 | 3250 | 1.3893 | |
|
|
| 0.4954 | 6.0 | 3900 | 1.4778 | |
|
|
|
|
|
|
|
|
### Framework versions |
|
|
|
|
|
- Transformers 4.19.2 |
|
|
- Pytorch 1.11.0 |
|
|
- Datasets 2.2.2 |
|
|
- Tokenizers 0.12.1 |
|
|
|