Feature Extraction
Transformers
Safetensors
English
Chinese
minicpmv
histopathology
multimodal
spatial-transcriptomics
custom_code
Instructions to use openbmb/SciCore-Omics with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/SciCore-Omics with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="openbmb/SciCore-Omics", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openbmb/SciCore-Omics", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| # gene_projector_module.py | |
| import torch.nn as nn | |
| class GeneProjector(nn.Module): | |
| def __init__(self, in_dim=768, out_dim=3584, dropout=0.1): | |
| super().__init__() | |
| self.proj = nn.Sequential( | |
| nn.LayerNorm(in_dim), | |
| nn.Linear(in_dim, out_dim), | |
| nn.GELU(), | |
| nn.Dropout(dropout), | |
| nn.Linear(out_dim, out_dim), | |
| nn.LayerNorm(out_dim), | |
| ) | |
| def forward(self, x): | |
| # x: [B, 32, 768] -> [B, 32, 3584] | |
| return self.proj(x) | |