bilstm-crf-fasttext-charcnn NER CoNLL-2002 (bs=16)

BiLSTM + CRF+CharCNN 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.8059
Precision 0.8057
Recall 0.8061

Uso

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

config = AutoConfig.from_pretrained("cvalenciaunivalle/bilstm-crf-fasttext-charcnn-conll-bs16", trust_remote_code=True)
model  = AutoModelForTokenClassification.from_pretrained("cvalenciaunivalle/bilstm-crf-fasttext-charcnn-conll-bs16", 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-charcnn-conll-bs16", "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)
  • CharCNN: 30d char emb -> Conv1d(filters=50, kernel=3) -> max-pool
  • Batch size: 16, épocas: 10
  • Compañeros: Laura Valero, Cristian Valencia
  • Taller PLN — Maestría Univalle
Downloads last month
52
Safetensors
Model size
10.3M 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-charcnn-conll-bs16