zjunlp / InstructCell-instruct

huggingface.co
Total runs: 12
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: January 15 2025

Introduction of InstructCell-instruct

Model Details of InstructCell-instruct

🗞️ Model description

InstructCell is a multi-modal AI copilot that integrates natural language with single-cell RNA sequencing data, enabling researchers to perform tasks like cell type annotation, pseudo-cell generation, and drug sensitivity prediction through intuitive text commands. By leveraging a specialized multi-modal architecture and our multi-modal single-cell instruction dataset, InstructCell reduces technical barriers and enhances accessibility for single-cell analysis.

Instruct Version : Supports generating only the answer portion without additional explanatory text, providing concise and task-specific outputs.

🚀 How to use

We provide a simple example for quick reference. This demonstrates a basic cell type annotation workflow.

Make sure to specify the paths for H5AD_PATH and GENE_VOCAB_PATH appropriately:

  • H5AD_PATH : Path to your .h5ad single-cell data file (e.g., H5AD_PATH = "path/to/your/data.h5ad" ).
  • GENE_VOCAB_PATH : Path to your gene vocabulary file (e.g., GENE_VOCAB_PATH = "path/to/your/gene_vocab.npy" ).
from mmllm.module import InstructCell
import anndata
import numpy as np
from utils import unify_gene_features

# Load the pre-trained InstructCell model from HuggingFace
model = InstructCell.from_pretrained("zjunlp/InstructCell-instruct")

# Load the single-cell data (H5AD format) and gene vocabulary file (numpy format)
adata = anndata.read_h5ad(H5AD_PATH)
gene_vocab = np.load(GENE_VOCAB_PATH)
adata = unify_gene_features(adata, gene_vocab, force_gene_symbol_uppercase=False)

# Select a random single-cell sample and extract its gene counts and metadata
k = np.random.randint(0, len(adata)) 
gene_counts = adata[k, :].X.toarray()
sc_metadata = adata[k, :].obs.iloc[0].to_dict()

# Define the model prompt with placeholders for metadata and gene expression profile
prompt = (
    "Can you help me annotate this single cell from a {species}? " 
    "It was sequenced using {sequencing_method} and is derived from {tissue}. " 
    "The gene expression profile is {input}. Thanks!"
)

# Use the model to generate predictions
for key, value in model.predict(
    prompt, 
    gene_counts=gene_counts, 
    sc_metadata=sc_metadata, 
    do_sample=True, 
    top_p=0.95,
    top_k=50,
    max_new_tokens=256,
).items():
    # Print each key-value pair
    print(f"{key}: {value}")

For more detailed explanations and additional examples, please refer to the Jupyter notebook demo.ipynb .

Runs of zjunlp InstructCell-instruct on huggingface.co

12
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About InstructCell-instruct huggingface.co Model

More InstructCell-instruct license Visit here:

https://choosealicense.com/licenses/mit

InstructCell-instruct huggingface.co

InstructCell-instruct huggingface.co is an AI model on huggingface.co that provides InstructCell-instruct's model effect (), which can be used instantly with this zjunlp InstructCell-instruct model. huggingface.co supports a free trial of the InstructCell-instruct model, and also provides paid use of the InstructCell-instruct. Support call InstructCell-instruct model through api, including Node.js, Python, http.

InstructCell-instruct huggingface.co Url

https://huggingface.co/zjunlp/InstructCell-instruct

zjunlp InstructCell-instruct online free

InstructCell-instruct huggingface.co is an online trial and call api platform, which integrates InstructCell-instruct's modeling effects, including api services, and provides a free online trial of InstructCell-instruct, you can try InstructCell-instruct online for free by clicking the link below.

zjunlp InstructCell-instruct online free url in huggingface.co:

https://huggingface.co/zjunlp/InstructCell-instruct

InstructCell-instruct install

InstructCell-instruct is an open source model from GitHub that offers a free installation service, and any user can find InstructCell-instruct on GitHub to install. At the same time, huggingface.co provides the effect of InstructCell-instruct install, users can directly use InstructCell-instruct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

InstructCell-instruct install url in huggingface.co:

https://huggingface.co/zjunlp/InstructCell-instruct

Url of InstructCell-instruct

InstructCell-instruct huggingface.co Url

Provider of InstructCell-instruct huggingface.co

zjunlp
ORGANIZATIONS

Other API from zjunlp

huggingface.co

Total runs: 1.1K
Run Growth: 363
Growth Rate: 33.21%
Updated:March 04 2024
huggingface.co

Total runs: 589
Run Growth: -601
Growth Rate: -102.04%
Updated:March 04 2024
huggingface.co

Total runs: 36
Run Growth: -50
Growth Rate: -138.89%
Updated:May 06 2024
huggingface.co

Total runs: 16
Run Growth: -14
Growth Rate: -87.50%
Updated:March 21 2023
huggingface.co

Total runs: 11
Run Growth: 0
Growth Rate: 0.00%
Updated:October 01 2025
huggingface.co

Total runs: 10
Run Growth: 3
Growth Rate: 30.00%
Updated:October 01 2025
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:July 28 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 22 2022
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 07 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 09 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 10 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 17 2023