cnn_yor_ner / README.md
Testys's picture
Upload folder using huggingface_hub
fb81fa8 verified
|
raw
history blame contribute delete
No virus
926 Bytes
metadata
language: en
tags:
  - ner
  - pytorch
license: mit

CNN for Named Entity Recognition

This model is a CNN-based model for Named Entity Recognition (NER) built on top of a pre-trained transformer model.

Model description

The model uses a pre-trained transformer as a base and adds convolutional layers on top for NER tasks.

Intended uses & limitations

This model is intended for Named Entity Recognition tasks. It should be used on Yoruba text data.

Usage

To use this model:

from transformers import AutoTokenizer
from custom_modeling import get_model

tokenizer = AutoTokenizer.from_pretrained("your-username/your-model-name")
model = get_model("your-username/your-model-name")

# Load the saved weights
import torch
model.load_state_dict(torch.load("pytorch_model.bin"))

# Use the model for inference
inputs = tokenizer("Your text here", return_tensors="pt")
outputs = model(**inputs)