Downloads ยท 30 days
20
12% of all-time downloads
warming666/ScDiVa
ScDiVa is a feature extraction model from warming666. Use it when you need embeddings to search or compare text. It is set up for pytorch. The card lists the license as apache-2.0.
Downloads ยท 30 days
20
12% of all-time downloads
All-time downloads
172
Public
Parameters
94.5M
19.1 GB on disk
Likes
2
Public
Click a slice to open those files.
.pt18.7 GB ยท 98%
From the Hugging Face model README
๐ arXiv Paper | ๐ป GitHub Repository | ๐ Dataset
</div>ScDiVa (Single-cell Deep Variational Analysis) is a 94.5M parameter foundation model pre-trained on 59 million single-cell transcriptomes. It utilizes a novel Masked Discrete Diffusion framework to model gene expression as an unordered set, effectively capturing the complex topology of gene regulatory networks.
Unlike traditional autoregressive models, ScDiVa employs a bidirectional Transformer encoder with SwiGLU activations, Rotary Positional Embeddings (RoPE), and RMSNorm, optimized for:
| Attribute | Value |
|---|---|
| Parameters | ~94.5M |
| Layers | 12 |
| Hidden Size | 512 |
| Attention Heads | 8 |
| Max Sequence Length | 1,200 genes |
| Vocabulary | 41,818 genes |
| Training Objective | Dual Denoising (Identity Classification + Value Regression) |
To use ScDiVa, you need the modeling_scdiva.py file (included in this repository).
pip install torch numpy huggingface_hub
You can load the model directly using the from_pretrained method defined in our architecture.
from modeling_scdiva import ScDiVaModel
import torch
# Load the model directly from Hugging Face
# This will automatically download model.safetensors and config
model = ScDiVaModel.from_pretrained("warming666/ScDiVa")
model.eval()
# Move to GPU if available
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
print(f"โ
ScDiVa loaded successfully on {device}")
# Create a dummy input (Batch Size: 2, Num Genes: 41818)
# In practice, replace this with your normalized gene expression matrix
input_data = torch.randn(2, 41818).to(device)
with torch.no_grad():
# Get latent embeddings (for clustering/integration)
outputs = model.encode(input_data)
embeddings = outputs['latent']
print(f"Latent Embedding Shape: {embeddings.shape}") # [2, 128]
# Get annotation logits
predictions = model.predict(input_data, task="annotation")
print(f"Annotation Logits Shape: {predictions.shape}") # [2, 100]
This repository contains the core pre-trained weights and fine-tuned checkpoints for downstream tasks.
warming666/ScDiVa
โโโ config.json # Model configuration
โโโ model.safetensors # ๐ฅ Pre-trained Base Weights (94.5M)
โโโ modeling_scdiva.py # Model architecture definition code
โโโ downstream/ # ๐ Fine-tuned Checkpoints
โโโ Multi-batch_Integration/
โ โโโ immune.pt
โ โโโ pbmc12k.pt
โ โโโ ...
โโโ Annotation_FT/ # Fine-tuned for specific tissues
โ โโโ hpancreas.pt
โ โโโ ms.pt
โโโ Annotation_Zeroshot/ # Weights for zero-shot projection
โโโ Perturbation/ # Weights for gene perturbation tasks
To load a specific downstream model (e.g., for Batch Integration on Immune dataset), you can download the specific .pt file from the downstream folder and load it using torch.load().
ScDiVa achieves state-of-the-art performance across multiple benchmarks:
For detailed results, please refer to our arXiv paper.
If you use ScDiVa in your research, please cite:
@article{wang2026scdiva,
title={ScDiva: Masked Discrete Diffusion for Joint Modeling of Single-Cell Identity and Expression},
author={Wang, Mingxuan and Chen, Cheng and Jiang, Gaoyang and Ren, Zijia and Zhao, Chuangxin and Shi, Lu and Ma, Yanbiao},
journal={arXiv preprint arXiv:2602.03477},
year={2026}
}
<div align="center">
<sub>Thank you to everyone who has helped me.</sub>
</div>