Downloads · 30 days
7
32% of all-time downloads
AventIQ-AI/named-entity-recognition-for-tagging-news-articles
named-entity-recognition-for-tagging-news-articles is a machine learning model from AventIQ-AI. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a quantized version of the RoBERTa model fine-tuned for Named Entity Recognition (NER) on the WikiANN (English) dataset. The model is particularly suitable for tagging named entities in news a…
Downloads · 30 days
7
32% of all-time downloads
All-time downloads
22
Public
Parameters
124M
248 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors248 MB · 98%
From the Hugging Face model README
This repository contains a quantized version of the RoBERTa model fine-tuned for Named Entity Recognition (NER) on the WikiANN (English) dataset. The model is particularly suitable for tagging named entities in news articles, such as persons, organizations, and locations. It has been optimized for efficient deployment using quantization techniques.
pip install transformers torch
from transformers import RobertaTokenizerFast, RobertaForSequenceClassification, Trainer, TrainingArguments
import torch
# Load tokenizer
tokenizer = RobertaTokenizerFast.from_pretrained("roberta-base")
# Create NER pipeline
ner_pipeline = pipeline(
"ner",
model=model,
tokenizer=tokenizer,
aggregation_strategy="simple"
)
# Sample news headline
text = "Apple Inc. is planning to open a new campus in London by the end of 2025."
# Inference
entities = ner_pipeline(text)
# Display results
for ent in entities:
print(f"{ent['word']}: {ent['entity_group']} ({ent['score']:.2f})")
The dataset is taken from Hugging Face WikiANN (English).
Number of epochs: 5
Batch size: 16
Evaluation strategy: epoch
Learning rate: 3e-5
Post-training quantization was applied using PyTorch's built-in quantization framework to reduce the model size and improve inference efficiency.
.
├── config.json
├── tokenizer_config.json
├── sepcial_tokens_map.json
├── tokenizer.json
├── model.safetensors # Fine Tuned Model
├── README.md # Model documentation
The model may not generalize well to domains outside the fine-tuning dataset.
Quantization may result in minor accuracy degradation compared to full-precision models.
Contributions are welcome! Feel free to open an issue or submit a pull request if you have suggestions or improvements.