Skip to main content
Get started with Standard Model Biomedicine’s biological world model. This guide walks you through setting up your environment and downloading SMB-v1-Structure.
New: This quickstart now features SMB-v1-Structure — our flagship JEPA-based multimodal foundation model for oncology.

Prerequisites

GPU support is strongly recommended. SMB-v1-Structure (1.7B parameters) requires approximately 16GB GPU memory for inference.
Before you begin, ensure you have the following installed:
  • Python 3.10+ — Required for running the models
  • pip — Python package manager
  • CUDA (recommended) — For GPU acceleration with NVIDIA GPUs
  • Git — For cloning repositories
Run the quickstart script to automatically configure your environment:
curl -fsSL https://raw.githubusercontent.com/standardmodelbio/quickstart/main/quickstart.sh -o quickstart.sh && source quickstart.sh
This script will:
  1. Create a Python 3.10 virtual environment named standard_model
  2. Install PyTorch with CUDA support (if available)
  3. Install HuggingFace libraries (transformers, datasets, accelerate)
  4. Install SMB utilities (smb-biopan-utils)
  5. Download the Standard Model to your local machine

Manual Installation

If you prefer to set up your environment manually:
1

Create Virtual Environment

python3 -m venv standard_model
source standard_model/bin/activate
2

Install PyTorch

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
3

Install Dependencies

pip install transformers datasets accelerate huggingface_hub pandas
pip install git+https://github.com/standardmodelbio/smb-biopan-utils.git
4

Download SMB-v1-Structure

from huggingface_hub import snapshot_download

snapshot_download("standardmodelbio/SMB-v1-1.7B-Structure")

Environment Activation

After setup, activate your environment for usage:
source standard_model/bin/activate

Verify Installation

Verify that everything is working correctly:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

# Check PyTorch and CUDA
print(f"PyTorch version: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}")

# Load SMB-v1-Structure
model_id = "standardmodelbio/SMB-v1-1.7B-Structure"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    device_map="auto"
)

print("SMB-v1-Structure loaded successfully!")
print(f"Model parameters: {sum(p.numel() for p in model.parameters()):,}")
SMB-v1-Structure is a world model, not a text generator. It predicts patient states in latent space, not tokens. See the Embeddings Guide for the full workflow.

Download Other Models

Download additional models from the Standard Model family:
from huggingface_hub import snapshot_download

snapshot_download("standardmodelbio/smb-ehr-4b")

Troubleshooting

CUDA Not Detected

Ensure NVIDIA drivers are up to date. Run nvidia-smi to verify GPU is accessible.

Out of Memory

SMB-v1-Structure requires ~16GB GPU memory. Use torch.float16 or quantization for smaller GPUs.

Model Access Denied

Some models may require authentication. Run huggingface-cli login with your token.

Slow Download

Model downloads can be large (several GB). Ensure stable connection and sufficient disk space.

Reducing Memory Usage

For GPUs with less memory, use half-precision or quantization:
import torch
from transformers import AutoModelForCausalLM

# Load in bfloat16 (half precision + f32 range)
model = AutoModelForCausalLM.from_pretrained(
    "standardmodelbio/SMB-v1-1.7B-Structure",
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

# Or use 8-bit quantization (requires bitsandbytes)
# pip install bitsandbytes
model = AutoModelForCausalLM.from_pretrained(
    "standardmodelbio/SMB-v1-1.7B-Structure",
    trust_remote_code=True,
    load_in_8bit=True,
    device_map="auto"
)

Hardware Requirements

ModelParametersMin GPU MemoryRecommended
SMB-v1-Structure1.7B16 GB32 GB
SMB-EHR-4B4B24 GB48 GB
SMB-Vision-Base97.2M4 GB8 GB
SMB-Language-8B8B32 GB80 GB

Next Steps