In a breakthrough that bridges biology and large language models, C2S-Scale-Gemma-27B came out as an new generation innovation for biological data understanding. Built on the Gemma-2 27B architecture and fine-tuned using the Cell2Sentence (C2S) framework, this model treats single-cell RNA sequencing (scRNA-seq) data as if it were natural language, turning complex gene expression profiles into interpretable “cell sentences.” It is developed through a collaboration between Yale University, Google Research, and Google DeepMind, and trained on 57 million cells using TPU v5s, it’s designed to decode the language of life itself. From cell type prediction and tissue classification to biomarker discovery and in silico cell generation, C2S-Scale-Gemma-27B transforms single-cell biology into a generative, interpretable, and scalable problem, giving researchers the tools to ask biological questions in a format that large language models can understand and answer.
If you’re exploring single-cell datasets, automating cell atlas annotations, or generating new biological hypotheses, C2S-Scale-Gemma-27B is your all-in-one foundation model for next-generation cell analysis, and now, you can install and run it locally within GPU-accelerated environment in minutes by following this guide.
Prerequisites
The minimum system requirements for running this model are:
- GPU: 2x RTXA6000 or 2x H100 or 1x H200
- Storage: 200 GB (preferable)
- VRAM: at least 85 GB
- Anaconda installed
Step-by-step process to install and run C2S-Scale-Gemma-27B
For the purpose of this tutorial, we’ll use a GPU-powered Virtual Machine by NodeShift since it provides high compute Virtual Machines at a very affordable cost on a scale that meets GDPR, SOC2, and ISO27001 requirements. Also, it offers an intuitive and user-friendly interface, making it easier for beginners to get started with Cloud deployments. However, feel free to use any cloud provider of your choice and follow the same steps for the rest of the tutorial.
Step 1: Setting up a NodeShift Account
Visit app.nodeshift.com and create an account by filling in basic details, or continue signing up with your Google/GitHub account.
If you already have an account, login straight to your dashboard.
Step 2: Create a GPU Node
After accessing your account, you should see a dashboard (see image), now:
- Navigate to the menu on the left side.
- Click on the GPU Nodes option.
- Click on Start to start creating your very first GPU node.
These GPU nodes are GPU-powered virtual machines by NodeShift. These nodes are highly customizable and let you control different environmental configurations for GPUs ranging from H100s to A100s, CPUs, RAM, and storage, according to your needs.
Step 3: Selecting configuration for GPU (model, region, storage)
- For this tutorial, we’ll be using 1x H200 GPU, however, you can choose any GPU as per the prerequisites.
- Similarly, we’ll opt for 200GB storage by sliding the bar. You can also select the region where you want your GPU to reside from the available ones.
Step 4: Choose GPU Configuration and Authentication method
- After selecting your required configuration options, you’ll see the available GPU nodes in your region and according to (or very close to) your configuration. In our case, we’ll choose a 1x H200 140GB GPU node with 192 vCPUs/252GB RAM/500GB SSD.
2. Next, you’ll need to select an authentication method. Two methods are available: Password and SSH Key. We recommend using SSH keys, as they are a more secure option. To create one, head over to our official documentation.
Step 5: Choose an Image
The final step is to choose an image for the VM, which in our case is Nvidia Cuda.
That’s it! You are now ready to deploy the node. Finalize the configuration summary, and if it looks good, click Create to deploy the node.
Step 6: Connect to active Compute Node using SSH
- As soon as you create the node, it will be deployed in a few seconds or a minute. Once deployed, you will see a status Running in green, meaning that our Compute node is ready to use!
- Once your GPU shows this status, navigate to the three dots on the right, click on Connect with SSH, and copy the SSH details that appear.
As you copy the details, follow the below steps to connect to the running GPU VM via SSH:
- Open your terminal, paste the SSH command, and run it.
2. In some cases, your terminal may take your consent before connecting. Enter ‘yes’.
3. A prompt will request a password. Type the SSH password, and you should be connected.
Output:
Next, If you want to check the GPU details, run the following command in the terminal:
!nvidia-smi
Step 7: Set up the project environment with dependencies
- Create a virtual environment using Anaconda.
conda create -n c2s python=3.11 -y && conda activate c2s
Output:
2. Install required dependencies.
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install einops timm pillow
pip install git+https://github.com/huggingface/transformers
pip install git+https://github.com/huggingface/accelerate
pip install git+https://github.com/huggingface/diffusers
pip install huggingface_hub
pip install sentencepiece bitsandbytes protobuf decord numpy
Output:
3. Install Nano for editing Python file
apt install nano
Step 8: Download and Run the model
- Create a python file named
app.py
.
touch app.py
2. Write the following demo code inside the file using Nano editor.
# pip install accelerate transformers sentencepiece
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
# Load model directly from Hugging Face Hub
model_id = "vandijklab/C2S-Scale-Gemma-2-27B"
# Load tokenizer; requires sentencepiece to be installed
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
).to(device)
# Format prompt (see previous section)
cell_sentence = "MALAT1 TMSB4X B2M EEF1A1 H3F3B ACTB FTL RPL13 ..." # Truncated for example, use at least 200 genes for inference
num_genes = 1000
organism = "Homo sapiens"
prompt = f"""The following is a list of {num_genes} gene names ordered by descending expression level in a {organism} cell. Your task is to give the cell type which this cell belongs to based on its gene expression.
Cell sentence: {cell_sentence}.
The cell type corresponding to these genes is:"""
# Prepare tokenized inputs
input_ids = tokenizer(prompt, return_tensors="pt").to(device)
# Generate response
outputs = model.generate(**input_ids, max_new_tokens=20)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
# The predicted cell type will be the text immediately following the prompt
predicted_cell_type = response.split("The cell type corresponding to these genes is:")[1].strip()
print(f"Predicted Cell Type: {predicted_cell_type}")
Here’s how the file looks:
3. Run the script to download the model checkpoints and run the model for inference.
python app.py
Output:
Conclusion
C2S-Scale-Gemma-27B came as a powerful helping hand in how we interpret biological data, transforming single-cell RNA sequences into a form that large language models can intuitively process, reason about, and generate insights from. By bridging the worlds of computational biology and generative AI, it opens up new frontiers for cell type prediction, biomarker discovery, and in silico experimentation. With NodeShift Cloud, researchers can now seamlessly deploy and run this massive 27B-parameter model locally or in GPU-accelerated environments without the traditional setup complexities. This integration not only democratizes access to cutting-edge biological AI models but also empowers scientists and developers to experiment, fine-tune, and scale C2S-Scale-Gemma-27B workflows directly from a single unified platform.