Skip to main content
bash -c "$(curl -fsSL https://docs.standardmodel.bio/quickstart.sh)"
This script will:
  1. Clone the quickstart repo with demo.py and all dependencies.
  2. Install uv if not already present.
  3. Run uv sync to install the exact locked dependency set (PyTorch, transformers, smb_utils, etc.).
After running the quickstart script, skip ahead to Verify Your Installation to confirm everything is working.
This quickstart uses uv for dependency management. If you prefer a different tool (conda, pip, etc.), refer to pyproject.toml in the quickstart repo for the list of dependencies.

Manual Installation

GPU support is strongly recommended. smb-v1-1.7b has 1.7B parameters and requires approximately 16GB GPU memory for inference.
Requirements: Python 3.11+, Git, and uv.
1

Install uv

curl -LsSf https://astral.sh/uv/install.sh | sh
2

Clone and install

Once complete, run the demo:
cd quickstart
uv run python demo.py
git clone https://github.com/standardmodelbio/quickstart.git
cd quickstart
uv sync
All dependencies (PyTorch, transformers, smb_utils, etc.) are installed from the lockfile, ensuring a reproducible environment.

Verify Your Installation

From the quickstart/ directory, verify that everything is working:
uv run python -c "
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-1.7b
model_id = 'standardmodelbio/smb-v1-1.7b'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    device_map='auto'
)

print('smb-v1-1.7b loaded successfully!')
"

Next Steps

Once complete, you can run a demo for an end-to end example, or try the model on your data.

Troubleshooting

CUDA Not Detected

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

Out of Memory

Reduce memory use via torch.float16 or quantization (see below).

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.

Memory optimization

For large cohorts and/or limited GPU memory, use half-precision or quantization:
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype=torch.float16,
    device_map="auto"
)
Memory: ~8GB

Next Steps