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

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

Model tree for aigensciences/BioGravity-bilingual-Inst

Finetuned
(1)
this model