image

Mistral-BioMed-Tool-Caller-7B

A fine-tuned version of Mistral-7B-Instruct-v0.3 specialized for biomedical tool-calling. Given a biomedical question and a set of available tool schemas, the model selects the correct tool and generates properly formatted function-call arguments in Mistral's native [TOOL_CALLS] format.

Model Details

Property Value
Base model mistralai/Mistral-7B-Instruct-v0.3
Fine-tuning method QLoRA (4-bit) via Unsloth
LoRA rank / alpha 32 / 32
Target modules q/k/v/o_proj, gate/up/down_proj
Trainable parameters 83,886,080 (1.14% of total)
Training dataset gxx27/BioTool (5,408 examples after filtering) + 540 general-instruction examples (~10% mix)
Epochs 1
Final training loss ~0.27
Hardware Single Kaggle Tesla T4

Coverage

Trained on tool-calling patterns across 127 tools spanning three biomedical API families:

  • NCBI E-utilities (esearch, efetch, elink, BLAST, and related endpoints)
  • UniProt REST (protein, proteome, and taxonomy lookups)
  • Ensembl REST (coordinate mapping, variant effect prediction, comparative genomics)

This covers genomics, proteomics, and comparative biology tool-use. It does not cover clinical-facing APIs such as ICD-10 lookup, drug databases, or clinical trial registries.

A small slice (~10%) of general-instruction data (HuggingFaceH4/no_robots) was interleaved during training specifically to preserve the base model's general conversational ability alongside its new biomedical specialization.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "Rumiii/Mistral-BioMed-Tool-Caller-7B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")

tools = [
    {
        "type": "function",
        "function": {
            "name": "esearch",
            "description": "Search an NCBI Entrez database and return UIDs matching a text query.",
            "parameters": {
                "type": "object",
                "properties": {
                    "db": {"type": "string", "description": "Entrez database name"},
                    "term": {"type": "string", "description": "Search query"},
                },
                "required": ["db", "term"],
            },
        },
    }
]

messages = [{"role": "user", "content": "Search PubMed for articles on BRCA1 mutations."}]

inputs = tokenizer.apply_chat_template(
    messages,
    tools=tools,
    add_generation_prompt=True,
    return_tensors="pt",
).to(model.device)

outputs = model.generate(inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))

Training Data

BioTool: a biomedical function-calling dataset of 7,040 human-verified query-to-API-call pairs across NCBI, UniProt, and Ensembl.

@misc{gao2026biotoolcomprehensivetoolcallingdataset,
      title={BioTool: A Comprehensive Tool-Calling Dataset for Enhancing Biomedical Capabilities of Large Language Models},
      author={Xin Gao and Ruiyi Zhang and Meixi Du and Peijia Qin and Pengtao Xie},
      year={2026},
      eprint={2605.05758},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2605.05758},
}

This model was trained with Unsloth and Hugging Face's TRL library.

License

Apache 2.0

Downloads last month
470
Safetensors
Model size
7B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Rumiii/Mistral-BioMed-Tool-Caller-7B

Finetuned
(528)
this model

Dataset used to train Rumiii/Mistral-BioMed-Tool-Caller-7B

Paper for Rumiii/Mistral-BioMed-Tool-Caller-7B