|
Download README.md from Elpapudex/Pos-full: direct link, hf CLI and curl.
- Browser
- Download file 2.19 kB
-
https://huggingface.co/Elpapudex/Pos-full/resolve/main/README.md
- Command line
-
hf download hf://Elpapudex/Pos-full/README.md
-
curl -L -o README.md https://huggingface.co/Elpapudex/Pos-full/resolve/main/README.md
2.19 kB
| language: | |
| - en | |
| # u2t01-bert-pos | |
| ## Training Data | |
| * **Dataset:** `universal-dependencies/universal_dependencies` (Config: `en_ewt`) | |
| * **Base Model:** `bert-base-uncased` | |
| * **Hyperparameters:** | |
| * `head_lr`: 1e-3 | |
| * `body_lr`: 2e-5 | |
| * `seed`: 42 | |
| * **Tokenization & Tagging Strategy:** | |
| * 17 UPOS tags | |
| * First-subword labeling | |
| * `-100` mask for continuation and special tokens | |
| ## Metrics | |
| ```json | |
| { | |
| "loss": 0.20879080891609192, | |
| "token_accuracy": 0.9718864323206616, | |
| "macro_f1": 0.9194535916196505, | |
| "precision": 0.9664863944129796, | |
| "recall": 0.9677226794013559, | |
| "f1": 0.9671041418101243, | |
| "runtime": 4.9848, | |
| "samples_per_second": 401.418, | |
| "steps_per_second": 3.21, | |
| "epoch": 3.0, | |
| "method": "full", | |
| "trainable_params": 108904721, | |
| "total_train_seconds": 309.63132905960083 | |
| } | |
| ``` | |
| **Headline Metrics:** Token Accuracy = **0.9719** | Macro-F1 = **0.9195** | |
| ## Example Usage | |
| ```python | |
| from transformers import pipeline | |
| # 1. Load the POS tagger pipeline | |
| pos_tagger = pipeline( | |
| task="token-classification", | |
| model="Elpapudex/Pos-full", | |
| aggregation_strategy="simple" | |
| ) | |
| # 2. Input sentence to analyze | |
| text = "The quick brown fox jumps gracefully over the lazy dog." | |
| # 3. Predict POS tags | |
| results = pos_tagger(text) | |
| # 4. Display results | |
| for tag in results: | |
| print(f"Word: {tag['word']:<12} | Tag: {tag['entity_group']:<9} | Confidence: {tag['score']:.2%}") | |
| ``` | |
| ## Limitations | |
| * English-only. | |
| * Trained on UD English EWT (English Web Treebank). | |
| * Predicts only the 17 Universal POS (UPOS) tags. | |
| * May not generalize well to other domains, genres, or tokenizers. | |
| * *Note:* The `seqeval` precision, recall, and F1 values included in the JSON are sequence evaluation metrics and do not represent standard entity-level metrics for POS tagging. | |
| ## References | |
| * Devlin et al., *BERT*, [arXiv:1810.04805 §5.3](https://arxiv.org/abs/1810.04805?utm_source=gemini) | |
| * [Hugging Face Transformers Training Documentation](https://huggingface.co/docs/transformers/training?utm_source=gemini) | |
| * [Hugging Face Universal Dependencies Dataset](https://huggingface.co/datasets/universal-dependencies/universal_dependencies?utm_source=gemini) |