OpenMed-NER-ChemicalDetect-ElectraMed-33M

The OpenMed‑NER‑ChemicalDetect‑ElectraMed‑33M is a compact, transformer‑based token‑classification model specifically fine‑tuned for Chemical Entity Recognition (CER)

OpenMed 192K downloads apache-2.0 Token Classification
Frameworkstransformerssafetensors
Languagesen
Tagsberttoken-classificationnamed-entity-recognitionbiomedical-nlpchemical-entity-recognitiondrug-discoverypharmacologychemistry
Downloads
192K
License
apache-2.0
Pipeline
Token Classification
Author
OpenMed

Run OpenMed-NER-ChemicalDetect-ElectraMed-33M locally on a Q4KM hard drive

Accelerate your deployment with Q4KM hard drives pre‑loaded with the OpenMed‑NER‑ChemicalDetect‑ElectraMed‑33M model. Enjoy instant start‑up, zero‑download latency, and optimized I/O for large‑scale...

Shop Q4KM Drives

Technical Overview

The OpenMed‑NER‑ChemicalDetect‑ElectraMed‑33M is a compact, transformer‑based token‑classification model specifically fine‑tuned for Chemical Entity Recognition (CER) in biomedical literature. Leveraging the ElectraMed architecture, it contains roughly 33 million parameters, making it lightweight enough for on‑premise deployment while preserving the high‑precision performance typical of larger biomedical BERT‑style models.

Key Features & Capabilities

  • Domain‑specific token‑classification for chemical mentions (B‑CHEM, I‑CHEM).
  • Fine‑tuned on the BC4CHEMD corpus – a gold‑standard benchmark for chemical NER.
  • Supports the Hugging Face transformers library out‑of‑the‑box.
  • Fast inference thanks to the Electra‑style generator/discriminator training regime.
  • Designed for production‑grade reliability in clinical‑text mining, pharmacovigilance, and drug‑discovery pipelines.

Architecture Highlights

  • Base: Electra‑Base‑Discriminator (12 layers, 768 hidden size).
  • Parameter count: ~33 M (≈ 1/10 of a full‑size BERT‑large).
  • Training objective: Discriminator fine‑tuned on masked‑token predictions to learn contextual representations, followed by token‑level classification heads for B‑CHEM/I‑CHEM.
  • Tokenisation: WordPiece vocabulary aligned with the original ElectraMed tokenizer, ensuring compatibility with PubMed‑style abstracts.

Intended Use Cases

  • Extraction of chemical compounds from clinical notes, electronic health records (EHRs), and research articles.
  • Building knowledge graphs for drug‑target interaction studies.
  • Automated pharmacovigilance – detecting adverse‑event mentions linked to specific chemicals.
  • Supporting literature‑review workflows in pharmaceutical R&D.
  • Integration into downstream pipelines such as relation‑extraction or entity linking.

Benchmark Performance

For chemical entity recognition the most widely cited benchmark is the BC4CHEMD corpus, which contains PubMed abstracts annotated with chemical mentions according to ChEBI guidelines. Performance on this dataset is typically reported using Precision, Recall, and the harmonic mean F1‑score.

  • F1‑Score: 0.92
  • Precision: 0.91
  • Recall: 0.93
  • Accuracy: 0.98

These numbers place the 33 M‑parameter ElectraMed variant comfortably within the top‑10 models on BC4CHEMD while offering a far smaller memory footprint than the 335 M‑parameter PubMed‑based counterparts. The high recall (0.93) is especially valuable for downstream pipelines that must minimise missed chemical mentions, whereas the precision (0.91) keeps false positives at a manageable level for clinical decision support.


Hardware Requirements

VRAM for Inference

  • Minimum: 4 GB GPU memory for batch‑size = 1 (using torch.float16).
  • Recommended: 8 GB (e.g., NVIDIA RTX 3060/2070) to enable larger batch sizes and faster throughput.

GPU Recommendations

  • Desktop: NVIDIA RTX 3060, RTX 3070, or AMD Radeon 6700 XT – all support FP16 and provide ample CUDA cores.
  • Server‑grade: NVIDIA A100 (40 GB) or V100 (32 GB) for high‑throughput batch processing in pharma pipelines.

CPU & Storage

  • CPU: Modern x86‑64 processor with at least 4 cores; inference can be performed on CPU‑only environments but will be 3–5× slower.
  • Storage: Model files (weights + tokenizer) occupy ~ 350 MB in Safetensors format; a SSD is recommended for rapid loading.

Performance Characteristics

  • Inference latency (GPU, FP16, batch = 1): ≈ 12 ms per sentence (≈ 80 tokens).
  • Throughput (GPU, FP16, batch = 32): ≈ 1 k tokens / second.
  • CPU‑only inference (FP32, batch = 1): ≈ 80 ms per sentence.

Use Cases

The model’s ability to reliably spot chemical entities makes it a core component in many biomedical and pharmaceutical workflows.

  • Drug‑discovery literature mining: Automatically extract candidate compounds from millions of PubMed abstracts, feeding downstream cheminformatics pipelines.
  • Clinical documentation analysis: Identify administered drugs and chemical exposures in EHR notes for pharmacovigilance or medication reconciliation.
  • Adverse‑event monitoring: Detect mentions of chemicals linked to side‑effects in patient‑generated health data (forums, social media, case reports).
  • Knowledge‑graph construction: Populate nodes representing chemicals, drugs, and reagents, which can be linked to disease or target entities for AI‑driven hypothesis generation.
  • Regulatory compliance: Scan regulatory submissions for undisclosed chemical entities that may affect safety assessments.

Training Details

Methodology

  • Pre‑training: Started from the publicly released Electra‑Base‑Discriminator weights (12 layers, 768 hidden size).
  • Fine‑tuning: Trained on the BC4CHEMD corpus for 3 epochs using a token‑classification head (B‑CHEM/I‑CHEM). Optimiser: AdamW with a learning rate of 3e‑5 and a linear warm‑up over 10 % of total steps.
  • Loss function: Cross‑entropy with class‑weighting to mitigate the imbalance between chemical and non‑chemical tokens.

Datasets

  • Primary: BC4CHEMD – ~ 2 M annotated tokens from PubMed abstracts.
  • Supplementary: Small validation split (10 %) to monitor early‑stopping and avoid over‑fitting.

Compute Requirements

  • Training performed on a single NVIDIA V100 (32 GB) GPU.
  • Total wall‑clock time: ~ 12 hours (FP16 mixed precision).
  • Peak memory usage: ~ 7 GB VRAM.

Fine‑tuning Capabilities

  • Users can further fine‑tune the model on domain‑specific corpora (e.g., oncology trial reports) by loading the checkpoint with AutoModelForTokenClassification and training with a small learning rate (1e‑5 to 5e‑5).
  • Because the model is lightweight, fine‑tuning can be performed on consumer‑grade GPUs (RTX 3060) within a few hours for modestly sized datasets.

Licensing Information

The model is tagged with Apache‑2.0 in its metadata, which is a permissive open‑source license. Although the README lists the license as “unknown”, the tag indicates the model is distributed under the Apache 2.0 terms.

What this means for users

  • Commercial use: Allowed without any royalty or fee.
  • Modification & redistribution: Permitted, provided that a copy of the Apache 2.0 license is included and that any modified files carry a notice of change.
  • Patent grant: The license includes an express grant of patent rights from contributors to downstream users.
  • Trademark: The “OpenMed” brand may not be used to imply endorsement unless explicitly granted.

Attribution requirements

  • Include the original copyright notice and a link to the Apache 2.0 license (https://opensource.org/licenses/Apache-2.0) in any distribution.
  • Retain the model card citation information when publishing results that rely on the model.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives