Transformers inputs and parameters
Text formats, model selection, task configuration, and batch processing options for biomedical NLP.
You provide biomedical text — pasted directly, retrieved by PubMed ID, uploaded as a file, or pulled from a previous job. Which model you select for the task most affects the result, since each is pre-trained for different entities and text.
Webapp input methods
The .bloom* webapp provides several input methods for transformer-based biomedical NLP.
Input type selection
| Input Type | Description | Example |
|---|---|---|
| Direct text | Paste text into the input field | Abstract or paragraph text |
| PubMed ID | Automatic abstract retrieval | PMID:12345678 |
| File upload | Text file or CSV with text column | Upload abstracts.txt |
| From previous job | Import from literature search | Select from completed jobs |
Text input requirements
Supported text formats
- Plain text: Raw biomedical text in English
- PubMed abstracts: Retrieved automatically by PMID
- CSV: Tabular file with a column named
textorabstract
Length limits
- Maximum tokens: 512 tokens per input segment (~300-400 words)
- Automatic chunking: Documents exceeding 512 tokens are split into overlapping chunks
- Chunk overlap: 50 tokens of overlap between adjacent chunks to preserve entity context at boundaries
Language requirements
- English only: Models are trained on English biomedical text
- Biomedical domain: Best performance on scientific/clinical text; reduced accuracy on informal or non-technical text
Task selection
The transformers_inference job accepts one task value per run — there is no separate relation-extraction task; infer relationships from co-occurring NER entities, or use question answering against the source text instead.
| Task | Description | Output |
|---|---|---|
ner | Named entity recognition | Entity spans with types and confidence |
classification | Categorize documents against fixed labels | Class label with probability |
zero_shot | Categorize documents against labels you supply at request time | Class label with probability |
qa | Extract an answer to a question from the input text | Answer span with confidence |
summarization | Condense the input text | Generated summary |
embeddings | Dense vector representation | Embedding vector per document |
Model selection
model_name is a free-text Hugging Face model ID (default dmis-lab/biobert-base-cased-v1.2), not a fixed dropdown. Commonly used biomedical IDs:
Model comparison
| Model | Pre-training Data | Vocab Size | Best For |
|---|---|---|---|
| PubMedBERT | PubMed abstracts (21M) | 30,522 | PubMed-specific NER |
| BioBERT | PubMed + PMC | 28,996 | General biomedical NLP |
| SciBERT | Semantic Scholar (1.14M) | 31,090 | Broad scientific text |
| ChemBERTa | PubChem, ChEMBL | 591 | Chemical entity extraction |
| BioGPT | PubMed (15M) | 42,384 | Generative tasks, QA |
Choosing a model
- PubMedBERT: Default choice for PubMed abstracts; best accuracy on standard biomedical NER benchmarks
- BioBERT: Good alternative with slightly broader coverage (includes PMC full-text training)
- ChemBERTa: Use specifically for chemical entity recognition or chemical text
- SciBERT: Use for interdisciplinary scientific text beyond strict biomedicine
- BioGPT: Use for generative tasks or question answering (larger model, slower)
Full parameter list
The transformers_inference job takes exactly four parameters — there is no confidence threshold, entity-type filter, relation-type filter, class list, pooling strategy, or batch-size control:
| Parameter | Type | Default | Description |
|---|---|---|---|
| texts | array of strings | — | The documents to process, one task applied to all of them |
| task | string | embeddings | One of embeddings, ner, classification, qa, summarization, zero_shot |
| model_name | string | dmis-lab/biobert-base-cased-v1.2 | Any Hugging Face model ID |
| labels | array of strings | — | Candidate labels for zero_shot classification |
ner returns whatever entity types the selected model was trained to recognize — there is no entity_types allowlist or confidence_threshold to tune. classification requires a model already fine-tuned for your classes; use zero_shot with labels for classes chosen at request time.
Batch processing
Submit multiple documents in one texts array; there is no separate batch-size or max-documents parameter to configure.
Previous job integration
Compatible tools
- PubMed search: Abstract text from literature searches
- Web search: Web content for NLP analysis
- Literature Passport: Full-text documents for deep analysis
Data handling
- Text extraction: Automatic extraction from structured job outputs
- PMID resolution: Automatic abstract fetching for PubMed IDs
- Provenance tracking: Maintains connection to original data source
Read next
Was this page helpful?