Instructions to use tolyho/dl2-hw2-bge-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tolyho/dl2-hw2-bge-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="tolyho/dl2-hw2-bge-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("tolyho/dl2-hw2-bge-ner") model = AutoModelForTokenClassification.from_pretrained("tolyho/dl2-hw2-bge-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
BGE NER β DL2 homework 02
Fine-tuned BAAI/bge-small-en-v1.5 for nine CoNLL-2003 BIO labels. The synthetic-label run was selected by full validation F1, without selecting on test scores.
| Run | Train rows | Validation F1 | Test precision | Test recall | Test F1 |
|---|---|---|---|---|---|
| Baseline | 10000 | 0.912082 | 0.854063 | 0.883853 | 0.868703 |
| With synthetic labels | 10010 | 0.916403 | 0.849453 | 0.880135 | 0.864522 |
Both comparison runs used seed 42, learning rate 5.373713206635395e-5, batch size 4 per GPU, two Tesla T4 GPUs, FP16, weight decay 0.01, and three epochs. Checkpoints were selected by validation F1. Padding and special-token labels use -100. Twenty Optuna trials used seeded subsets of 2048 training and 512 validation examples.
The ten extra labels were generated with Qwen/Qwen2.5-7B-Instruct-AWQ. These structurally valid labels include errors; synthetic augmentation did not improve test F1 in this single paired comparison.
Experiments: baseline, synthetic. The original training histories were imported into Comet after training; no models were retrained for publication.
Saved Kaggle execution (private).
from transformers import pipeline
ner = pipeline(
"token-classification",
model="tolyho/dl2-hw2-bge-ner",
aggregation_strategy="simple",
)
print(ner("John works in London."))
- Downloads last month
- 33
Model tree for tolyho/dl2-hw2-bge-ner
Base model
BAAI/bge-small-en-v1.5