
<!-- 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. -->

# pos-polish-gpt2-large

This model was trained from [polish-gpt2-large](https://huggingface.co/sdadas/polish-gpt2-large) on [clarin-pl/nkjp-pos](https://huggingface.co/datasets/clarin-pl/nkjp-pos) dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2290
- Precision: 0.8910
- Recall: 0.9328
- F1: 0.9114
- Accuracy: 0.9450

## Model description

Trained from [polish-gpt2-large](https://huggingface.co/sdadas/polish-gpt2-large)

## Intended uses & limitations

Part-of-speech tagging for Polish language.
Tags description at the bottom of http://nkjp.pl/poliqarp/help/plse2.html

## Training and evaluation data

Dataset: [clarin-pl/nkjp-pos](https://huggingface.co/datasets/clarin-pl/nkjp-pos)

Datacollator:
```py
from transformers import DataCollatorForTokenClassification
data_collator = DataCollatorForTokenClassification(tokenizer=tokenizer)
```

## Training procedure

GPU: RTX 3090

Training time: 01:15:31

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 2
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1     | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|               | 0.0   |    0 | 3.8487          | 3.8487    | 3.8487 | 3.8487 | 3.8487   |
| 0.1952        | 1.0   | 2444 | 0.1942          | 0.8865    | 0.9304 | 0.9079 | 0.9426   |
| 0.1287        | 2.0   | 4889 | 0.1984          | 0.8903    | 0.9322 | 0.9108 | 0.9449   |
| 0.0832        | 3.0   | 7332 | 0.2290          | 0.8910    | 0.9328 | 0.9114 | 0.9450   |


### Framework versions

- Transformers 4.36.2
- Pytorch 2.1.2+cu121
- Datasets 2.16.1
- Tokenizers 0.15.0
{"language": ["pl"], "license": "mit", "tags": ["generated_from_trainer"], "datasets": ["clarin-pl/nkjp-pos"], "metrics": ["precision", "recall", "f1", "accuracy"], "model-index": [{"name": "pos-polish-gpt2-large", "results": []}]}
transformers safetensors gpt2 token-classification generated_from_trainer pl dataset:clarin-pl/nkjp-pos license:mit autotrain_compatible endpoints_compatible text-generation-inference region:us