Skip to main content

    Transformers inputs and parameters

    Text formats, model selection, task configuration, and batch processing options for biomedical NLP.

    transformersinputs

    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 TypeDescriptionExample
    Direct textPaste text into the input fieldAbstract or paragraph text
    PubMed IDAutomatic abstract retrievalPMID:12345678
    File uploadText file or CSV with text columnUpload abstracts.txt
    From previous jobImport from literature searchSelect 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 text or abstract

    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.

    TaskDescriptionOutput
    nerNamed entity recognitionEntity spans with types and confidence
    classificationCategorize documents against fixed labelsClass label with probability
    zero_shotCategorize documents against labels you supply at request timeClass label with probability
    qaExtract an answer to a question from the input textAnswer span with confidence
    summarizationCondense the input textGenerated summary
    embeddingsDense vector representationEmbedding 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

    ModelPre-training DataVocab SizeBest For
    PubMedBERTPubMed abstracts (21M)30,522PubMed-specific NER
    BioBERTPubMed + PMC28,996General biomedical NLP
    SciBERTSemantic Scholar (1.14M)31,090Broad scientific text
    ChemBERTaPubChem, ChEMBL591Chemical entity extraction
    BioGPTPubMed (15M)42,384Generative 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:

    ParameterTypeDefaultDescription
    textsarray of strings—The documents to process, one task applied to all of them
    taskstringembeddingsOne of embeddings, ner, classification, qa, summarization, zero_shot
    model_namestringdmis-lab/biobert-base-cased-v1.2Any Hugging Face model ID
    labelsarray 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

    Was this page helpful?

    On this page

    On this page

    Loading...