Instructions to use Rumiii/Qwen3.8-27B-ScientificBM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rumiii/Qwen3.8-27B-ScientificBM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Rumiii/Qwen3.8-27B-ScientificBM") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Rumiii/Qwen3.8-27B-ScientificBM") model = AutoModelForMultimodalLM.from_pretrained("Rumiii/Qwen3.8-27B-ScientificBM", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rumiii/Qwen3.8-27B-ScientificBM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rumiii/Qwen3.8-27B-ScientificBM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rumiii/Qwen3.8-27B-ScientificBM", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Rumiii/Qwen3.8-27B-ScientificBM
- SGLang
How to use Rumiii/Qwen3.8-27B-ScientificBM with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Rumiii/Qwen3.8-27B-ScientificBM" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rumiii/Qwen3.8-27B-ScientificBM", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Rumiii/Qwen3.8-27B-ScientificBM" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rumiii/Qwen3.8-27B-ScientificBM", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Rumiii/Qwen3.8-27B-ScientificBM with Docker Model Runner:
docker model run hf.co/Rumiii/Qwen3.8-27B-ScientificBM
Qwen3.8-27B-ScientificBM
Qwen3.8-27B-ScientificBM is a research model that converts natural-language biomedical questions into structured tool calls. Given a question and a set of tool definitions, it selects the appropriate biomedical API and fills in its arguments.
It is a fine-tune of Qwen/Qwen3.8-27B, released as full merged 16-bit weights in the Hugging Face Transformers format.
Research use only. This model is not a medical device and must not be used for clinical decisions, diagnosis, or treatment.
Model Summary
| Base model | Qwen/Qwen3.8-27B (dense, 27B parameters) |
| Fine-tuning data | gxx27/BioTool |
| Task | Biomedical tool selection and argument generation |
| Mode | Non-thinking (enable_thinking=False) |
| Format | Merged 16-bit weights, safetensors |
| Library | Transformers (v5 or later) |
| License | Apache-2.0 |
What the Model Is Trained to Do
The model acts as the tool-calling layer of a biomedical assistant. It reads a user question together with a list of tool schemas and returns a single, well-formed function call. The tools cover three major public databases:
| Database | Example capabilities |
|---|---|
| NCBI | E-utilities search, fetch, link and summary; BLAST |
| UniProt | Protein entries, proteomes, taxonomy, diseases, keywords, cross-references |
| Ensembl | Gene and transcript lookup, sequences, variation, VEP, coordinate mapping, comparative genomics, regulation |
It was trained to answer with a short structured call rather than a long reasoning trace, so it should be used with thinking disabled.
Intended Uses
- Research on biomedical agents and tool use in language models
- The planning step of a bioinformatics pipeline: question, tool call, execution by your own code, results
- Prototyping natural-language interfaces to NCBI, UniProt and Ensembl
- Benchmarking and comparing biomedical tool-calling approaches
Limitations
- Not for clinical use. Outputs must not inform diagnosis or treatment.
- Single-step calls only. The model produces one tool call per request. It is not trained for multi-step tool chains and does not read tool outputs to write a final answer.
- No abstention. Every training example ends in a tool call, so the model tends to call a tool even when the question is unrelated to biomedicine or no tool applies. Filter out-of-scope questions before calling it.
- Limited to the tools it has seen. Behavior on unseen tool schemas or other databases is not guaranteed.
- Arguments can be imperfect. The model may add optional parameters that were not requested, or emit placeholder-like values (for example, the string
"null"). Validate every call against the tool schema before executing it. - Long tool schemas. Training excluded samples longer than 3,072 tokens, so very long prompts may be handled less reliably.
- Non-thinking mode only. Reasoning ability was not trained and is not expected to improve over the base model.
Evaluation
No formal benchmark results are reported yet. In an informal check of nine hand-written biomedical queries (loaded in 4-bit), the model selected the correct tool and included the key values from the question in all nine cases. Each query was presented with the correct tool plus distractor tools. This is a smoke test, not a benchmark, and should not be read as a measure of overall accuracy. A full evaluation on the held-out BioTool test split is planned.
Usage with Transformers
Requires transformers>=5. Load the model, pass your tools in OpenAI-style schema, and disable thinking through the chat template.
# pip install -U "transformers>=5" accelerate
import re, json, torch
from transformers import AutoTokenizer, AutoModelForMultimodalLM
model_id = "Rumiii/Qwen3.8-27B-ScientificBM"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMultimodalLM.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
tools = [{
"type": "function",
"function": {
"name": "map_cdna_to_genome",
"description": "Convert from cDNA coordinates to genomic coordinates.",
"parameters": {
"type": "object",
"properties": {
"id": {"type": "string", "description": "An Ensembl stable ID"},
"region": {"type": "string", "description": "Query region"},
"include_original_region": {"type": "boolean", "description": "Include original input region"},
"species": {"type": "string", "description": "Species name/alias"},
},
"required": ["id", "region"],
},
},
}]
messages = [
{"role": "system", "content": "You are a helpful assistant that can call tools. Use the provided tools when appropriate."},
{"role": "user", "content": "Map bases 100 to 200 of transcript ENST00000361390 to genomic coordinates in human."},
]
inputs = tok.apply_chat_template(
messages, tools=tools, add_generation_prompt=True,
enable_thinking=False, return_tensors="pt", return_dict=True,
).to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
text = tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(text)
def parse_call(s):
m = re.search(r"<function=([^>]+)>(.*?)</function>", s, re.S)
if not m:
return None
args = dict(re.findall(r"<parameter=([^>]+)>\s*(.*?)\s*</parameter>", m.group(2), re.S))
return {"name": m.group(1), "arguments": args}
print(json.dumps(parse_call(text), indent=2))
The model needs roughly 55 GB of memory in 16-bit. On a smaller GPU it can be loaded with 4-bit quantization, with a small expected change in output quality.
Output format
Tool calls use the Qwen3.8 chat-template format:
<tool_call>
<function=map_cdna_to_genome>
<parameter=id>
ENST00000361390
</parameter>
<parameter=region>
100..200
</parameter>
<parameter=species>
human
</parameter>
</function>
</tool_call>
Parsed argument values are returned as strings. Convert them to the types declared in your tool schema (for example booleans and integers) before calling the real API.
Training Data
The model was fine-tuned on BioTool, a biomedical tool-calling dataset of 7,040 query and API-call pairs across 127 tools from NCBI, UniProt and Ensembl. Only the training split was used. The test split was held out. LoRA adapters were trained and merged into the full 16-bit weights.
Acknowledgments
- Base model: Qwen/Qwen3.8-27B, licensed under Apache-2.0.
- Dataset: BioTool by Gao et al. The underlying API responses are subject to the licenses of the original NCBI, UniProt and Ensembl services.
Citation
If you use this model, please also cite the BioTool dataset:
@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},
}
Disclaimer
This model is provided for research purposes without warranty of any kind. Outputs may be incorrect or incomplete. Verify all tool calls and results independently before relying on them.
- Downloads last month
- 86
