Instructions to use aigensciences/BioGravity-bilingual-Inst with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aigensciences/BioGravity-bilingual-Inst with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aigensciences/BioGravity-bilingual-Inst") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aigensciences/BioGravity-bilingual-Inst") model = AutoModelForCausalLM.from_pretrained("aigensciences/BioGravity-bilingual-Inst", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aigensciences/BioGravity-bilingual-Inst with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aigensciences/BioGravity-bilingual-Inst" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aigensciences/BioGravity-bilingual-Inst", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aigensciences/BioGravity-bilingual-Inst
- SGLang
How to use aigensciences/BioGravity-bilingual-Inst 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 "aigensciences/BioGravity-bilingual-Inst" \ --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": "aigensciences/BioGravity-bilingual-Inst", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "aigensciences/BioGravity-bilingual-Inst" \ --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": "aigensciences/BioGravity-bilingual-Inst", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use aigensciences/BioGravity-bilingual-Inst with Docker Model Runner:
docker model run hf.co/aigensciences/BioGravity-bilingual-Inst
BioGravity-bilingual-Inst
BioGravity-bilingual-Inst is a Korean–English biomedical instruction model published by AIGEN Sciences, Inc., built on Trillion Labs' Gravity-30B-A5B-0715. It supports biomedical explanations, general instructions, and tool-assisted research through the Biomni A1 interface.
This repository contains the complete model weights, tokenizer, and chat template. Responses use the native <think>...</think> format and explicit A1 action and observation tokens.
Model Summary
| Property | Value |
|---|---|
| Publisher | AIGEN Sciences, Inc. |
| Upstream checkpoint | trillionlabs/Gravity-30B-A5B-0715 |
| Total parameters | 29.56B |
| Active parameters | Approximately 5.34B, counting embedding tables |
| Architecture | Native Transformers DeepseekV3ForCausalLM; MLA and sparse MoE |
| Transformer layers | 52 |
| Routed experts | 64 per MoE layer; 8 selected per token |
| Primary languages | Korean and English |
| Configured context limit | 131,072 tokens |
| Evaluated serving context | 49,152 tokens |
| Stored precision | FP32; 24 safetensors shards, approximately 118.3 GB |
| Evaluated inference precision | BF16 |
| Model vocabulary / tokenizer size | 151,552 / 151,371 |
| A1 interface | <execute>, <solution>, and <observation> |
| Verified Transformers version | 4.57.6 |
The configured context limit is an architectural setting. This release was evaluated with a 49,152-token serving window; performance at the full configured limit has not been measured. BF16 loading uses about 59 GB for weights, plus KV cache and runtime memory.
Quickstart
Installation
Use a CUDA-compatible PyTorch installation for your GPU, then install the tested Transformers version and loading dependencies:
pip install "transformers==4.57.6" accelerate safetensors
Using Transformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "aigensciences/BioGravity-bilingual-Inst"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
attn_implementation="sdpa",
).eval()
messages = [
{"role": "system", "content": "You are a helpful biomedical research assistant."},
{"role": "user", "content": "관찰연구에서 상관관계와 인과관계의 차이를 한국어로 설명해 주세요."},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
tokenizer_kwargs={"return_token_type_ids": False},
).to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs,
max_new_tokens=1024,
do_sample=False,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
continuation = outputs[0, inputs["input_ids"].shape[-1]:]
print(tokenizer.decode(continuation, skip_special_tokens=False))
The checkpoint loads through the native Transformers DeepSeek-V3 implementation. Its configuration, expert layout, tokenizer, and RoPE settings form the verified release and should be kept together.
Thinking mode
By default, add_generation_prompt=True leaves the prompt inside an open <think> segment. The generated continuation supplies the remaining text, including </think> and the answer or action.
The included template accepts enable_thinking=False to prefill an empty segment:
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
enable_thinking=False,
return_tensors="pt",
return_dict=True,
tokenizer_kwargs={"return_token_type_ids": False},
).to(model.device)
A1 tool use
| Message purpose | Format |
|---|---|
| Code action | <think>...</think><execute>Python code</execute> |
| Tool observation | <observation>tool result</observation> |
| Final answer | <think>...</think><solution>answer</solution> |
The harness executes code actions, appends observations, and asks the model for its next decision. It stops action generation at </execute> or </solution>, preserving the stop marker. The model repository supplies the policy; the A1 runtime supplies tools, the execution environment, and the data lake.
Set skip_special_tokens=False when decoding or serving. The six A1 protocol tokens are registered as special tokens; preserving them retains the action boundaries required by the harness.
The inherited template also renders tools= schemas and XML <tool_call> messages. The A1 integration uses the execute/solution protocol.
Deployment
vLLM
Evaluation used vLLM 0.19.0 with one B200 per model replica. The following configuration follows that serving setup. Use a separate environment from training so vLLM can install its matching PyTorch dependencies.
pip install "vllm==0.19.0" "transformers==4.57.6"
VLLM_MLA_DISABLE=1 VLLM_WORKER_MULTIPROC_METHOD=spawn \
python -m vllm.entrypoints.openai.api_server \
--model aigensciences/BioGravity-bilingual-Inst \
--served-model-name BioGravity-bilingual-Inst \
--host 127.0.0.1 --port 8000 \
--dtype bfloat16 --tensor-parallel-size 1 \
--max-model-len 49152 \
--gpu-memory-utilization 0.85 \
--max-num-seqs 32 --max-num-batched-tokens 4096 \
--attention-backend TRITON_ATTN \
--compilation-config '{"mode":0,"cudagraph_mode":"FULL_DECODE_ONLY","cudagraph_capture_sizes":[1,2,4,8,16,24,32],"cudagraph_specialize_lora":false}'
A general chat request:
curl http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "BioGravity-bilingual-Inst",
"messages": [{"role": "user", "content": "Explain correlation and causation in observational studies."}],
"temperature": 0,
"max_tokens": 1024,
"skip_special_tokens": false
}'
For A1 requests, the harness additionally supplies "stop": ["</execute>", "</solution>"] and "include_stop_str_in_output": true and handles the action/observation loop.
Acknowledgements
We acknowledge Trillion Labs for the upstream Gravity model and the Biomni project for its biomedical agent and evaluation framework. The organization of this card follows the Gravity-30B-A5B-Preview model card, with model-specific specifications for this release.
Citation
@misc{aigensciences2026biogravitybilingualinst,
title = {BioGravity-bilingual-Inst},
author = {{AIGEN Sciences, Inc.}},
year = {2026},
url = {https://huggingface.co/aigensciences/BioGravity-bilingual-Inst}
}
Contact
- Organization: AIGEN Sciences, Inc.
- Model discussions: BioGravity-bilingual-Inst discussions
- Downloads last month
- 154
Model tree for aigensciences/BioGravity-bilingual-Inst
Base model
trillionlabs/Gravity-30B-A5B-0715