bilstm-crf-fasttext NER CoNLL-2002 (bs=8)

BiLSTM + CRF con embeddings FastText español (cc.es.300). Entrenado sobre CoNLL-2002 español. Modelo CUSTOM con trust_remote_code=True.

Métricas en test (CoNLL-2002)

Metric Valor
F1 0.7973
Precision 0.8109
Recall 0.7842

Uso

# Requiere: pip install pytorch-crf
from transformers import AutoModelForTokenClassification, AutoConfig
import json

config = AutoConfig.from_pretrained("cvalenciaunivalle/bilstm-crf-fasttext-conll-bs8", trust_remote_code=True)
model  = AutoModelForTokenClassification.from_pretrained("cvalenciaunivalle/bilstm-crf-fasttext-conll-bs8", trust_remote_code=True)

# Cargar vocab (incluye word2idx, char2idx, id2tag)
from huggingface_hub import hf_hub_download
vocab_path = hf_hub_download("cvalenciaunivalle/bilstm-crf-fasttext-conll-bs8", "vocab.json")
with open(vocab_path) as f:
    vocab = json.load(f)

# Predecir
oraciones_tokenizadas = [["Juan", "vive", "en", "Bogotá", "."]]
tags = model.predict(oraciones_tokenizadas, vocab)
print(tags)  # [['B-PER', 'O', 'O', 'B-LOC', 'O']]

Detalles

  • Arquitectura: BiLSTM hidden=200, dropout=0.3, CRF de salida

  • Word embeddings: 300d (FastText)

  • Batch size: 8, épocas: 10

  • Compañeros: Laura Valero, Cristian Valencia

  • Taller PLN — Maestría Univalle

Downloads last month
54
Safetensors
Model size
10.2M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train cvalenciaunivalle/bilstm-crf-fasttext-conll-bs8