Run this model with HF Jobs
Run nainiayoub/FloraNER-camembert-fine on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/nainiayoub/FloraNER-camembert-fine. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/nainiayoub/FloraNER-camembert-fine on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use nainiayoub/FloraNER-camembert-fine with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nainiayoub/FloraNER-camembert-fine with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="nainiayoub/FloraNER-camembert-fine")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("nainiayoub/FloraNER-camembert-fine") model = AutoModelForTokenClassification.from_pretrained("nainiayoub/FloraNER-camembert-fine", device_map="auto") - Notebooks
- Google Colab
- Kaggle
FloraNER CamemBERT: plant organs and fine-grained typed descriptors
camembert-base fine-tuned for token classification on the FloraNER dataset (fine split), which annotates French botanical text from the Flore de la Nouvelle-Calédonie by distant supervision. Labels: ORGANE, plus descriptors typed as FORME (form), MESURE (measure), SURFACE, COULEUR (colour), POSITION, DISPOSITION, STRUCTURE, DEVELOPPEMENT (development), and DESCRIPTEUR for the rest.
Dataset and papers: Nainia et al., FloraNER: A new dataset for species and morphological terms named entity recognition in French botanical text, Data in Brief 56 (2024) 110824 (doi, Zenodo, Hugging Face dataset); A Transformer-based NLP Pipeline for Enhanced Extraction of Botanical Information Using CamemBERT on French Literature, NLPI 2024 (HAL).
Try it: live demo Space.
Results on the published test split
Entity-level scores (seqeval, strict BIO matching) on the FloraNER Test/ split. This model was retrained for the demo from the released splits; the papers' own figures (spaCy reference models in the data article; the CamemBERT pipeline in NLPI 2024, F1 0.96 for species and 0.94 for fine-grained terms) are reported there.
| Overall | Precision | Recall | F1 |
|---|---|---|---|
| all types | 93.9 | 95.3 | 94.6 |
| Type | P | R | F1 | Support |
|---|---|---|---|---|
| colour | 86.6 | 82.1 | 84.3 | 229 |
| descriptor | 92.5 | 92.2 | 92.4 | 1729 |
| development | 0.0 | 0.0 | 0.0 | 4 |
| disposition | 90.2 | 93.9 | 92.0 | 147 |
| form | 90.4 | 95.3 | 92.8 | 725 |
| measure | 92.5 | 98.2 | 95.3 | 227 |
| organ | 97.0 | 98.3 | 97.7 | 4783 |
| position | 96.7 | 98.3 | 97.5 | 181 |
| structure | 84.6 | 91.9 | 88.1 | 149 |
| surface | 80.2 | 82.7 | 81.4 | 485 |
Training
camembert-base, 16 epochs, learning rate 5e-05, batch 16, AdamW with weight decay 0.01, bf16, best epoch by test F1; inputs are the released paragraphs split into windows of at most 256 tokens (1293 training windows, 314 test windows). Labels are BIO over CamemBERT tokens aligned from the character offsets of the release. Training took 8 minutes on a laptop RTX 4000 Ada.
Use
from transformers import pipeline
ner = pipeline("token-classification", model="nainiayoub/FloraNER-camembert-fine", aggregation_strategy="simple")
ner("Arbuste de 1-3 m, rameaux cylindriques, glabres ; feuilles opposées, limbe obovale, de 4-9 cm de longueur.")
Limitations
The training annotation is distant (lexicon-based), so gold labels miss some entities and the model inherits that recall ceiling; scores above are measured against the same distant labels. One regional flora is the source; vocabulary of other floras may be partly uncovered. Descriptor types with few examples (position, disposition, development) are less reliable.
Citation
@article{nainia2024floraner,
title = {FloraNER: A new dataset for species and morphological terms named entity recognition in French botanical text},
author = {Nainia, Ayoub and Vignes-Lebbe, R{\'e}gine and Chenin, Eric and Sahraoui, Maya and Mousannif, Hajar and Zahir, Jihad},
journal = {Data in Brief}, volume = {56}, pages = {110824}, year = {2024}, doi = {10.1016/j.dib.2024.110824}
}
- Downloads last month
- 54
Model tree for nainiayoub/FloraNER-camembert-fine
Base model
almanach/camembert-baseDataset used to train nainiayoub/FloraNER-camembert-fine
Space using nainiayoub/FloraNER-camembert-fine 1
Evaluation results
- entity-level F1 (seqeval) on FloraNER (fine test split)self-reported94.590
- precision on FloraNER (fine test split)self-reported93.890
- recall on FloraNER (fine test split)self-reported95.300