brain-uce-pilot-mix-v3
A pilot Universal Cell Embedding (UCE)-style model for brain single-cell RNA-seq, trained
from scratch on "data mix v3": a designed mixture over the v2026-09 corpus (26 caches,
147,675,214 cells, 13 species) that re-weights sampling toward brain tissue (68 % of training
samples) and under-represented species (human 60 %, mouse 23 %, the eight smallest species
3-20x their uniform share). It maps a cell's raw counts to a 512-d, L2-normalised embedding
through a chromosome-ordered "cell sentence" of frozen ESM2 gene tokens. Its sibling
KuanP/brain-uce-pilot-mix-v2 was trained on the same corpus with uniform sampling and the
same number of training samples.
| Benchmark name | mixv3_131k_gb512 |
| Training run | brain_mixC_v2026_09_noeval_131072steps/2026-09-23_10-30-28 |
| Code | uce-training-suite (remote in training/git_info.json), branch ucsc-brain, commit be8b45db96a535f0d82703f73443b6574ad4021d (clean working tree) |
| Weights | model.safetensors, 5,575,765,828 bytes, 118 fp32 tensors, final model at step 131,072 |
| Embedding | 512-d, unit L2 norm (dot product = cosine similarity) |
| Status | pilot research model; license not yet chosen (see Caveats) |
1. Training data: "data mix v3" (a designed mixture over the v2026-09 corpus)
The corpus is the same 26 caches / 147,675,214 cells / 13 species as brain-uce-pilot-mix-v2
(CELLxGENE Census 2025-11-08 human, mouse, rhesus macaque, marmoset, chimpanzee; BICAN NeMO
and BrainGenome multi-species brain; CELLxGENE Discover human, mouse, rat, mouse lemur, pig,
zebrafish), split 0.995 / 0.005 into train / held-out cells with the same seed as mix v2, so
its held-out cells are identical. What differs is how training examples were drawn from
the train split. Instead of uniform sampling, the trainer materialised one pass of
67,108,864 samples (= 131,072 steps x global batch 512) from per-cell weights
(uce_suite.data.mixture, parameters in training/config.yaml: dataset.mixture; the realised
draw is in training/mixture_summary.json):
- species mass proportional to (train cells)^0.7 (
species_alpha0.7); - within a species, brain cells re-weighted to at least 67 % (
brain_fraction_target0.67); - within each (species, brain / non-brain) stratum, dataset weight proportional to n^0.5
(
dataset_alpha0.5, i.e. sqrt capping of the largest cohorts); - sci-RNA-seq3 libraries at half weight (
assay_weights); - no cache repeated more than 4x in expectation (
max_epochs_per_spec4.0); - two CELLxGENE Discover datasets (
0df5d172-5888-4cec-9a96-e637636bbfef,843c1459-e852-429c-9339-17b5760e7716) and NeMO libraries duplicated in the BrainGenome caches excluded (exclude_dataset_ids,exclude_nemo_bg_overlap).
Composition of the realised draw (samples, with replacement; data_mix_composition.csv, rows
mix == "data mix v3"). "Brain" is the tissue_general == "brain" label only.
| species | samples | share | of which brain | brain share within species |
|---|---|---|---|---|
| homo_sapiens | 40,033,420 | 59.65 % | 26,079,672 | 65.1 % |
| mus_musculus | 15,516,985 | 23.12 % | 9,254,226 | 59.6 % |
| macaca_mulatta | 4,493,327 | 6.70 % | 4,379,539 | 97.5 % |
| callithrix_jacchus | 2,588,586 | 3.86 % | 2,588,586 | 100.0 % |
| danio_rerio | 1,734,868 | 2.59 % | 863,391 | 49.8 % |
| rattus_norvegicus | 568,217 | 0.85 % | 568,217 | 100.0 % |
| pan_troglodytes | 551,043 | 0.82 % | 551,043 | 100.0 % |
| microcebus_murinus | 416,833 | 0.62 % | 220,333 | 52.9 % |
| sus_scrofa | 375,664 | 0.56 % | 251,695 | 67.0 % |
| monodelphis_domestica | 265,449 | 0.40 % | 265,449 | 100.0 % |
| macaca_nemestrina | 238,504 | 0.36 % | 238,504 | 100.0 % |
| aotus_nancymaae | 190,748 | 0.28 % | 190,748 | 100.0 % |
| tupaia_chinensis | 135,220 | 0.20 % | 135,220 | 100.0 % |
| total (13 species, 26 caches) | 67,108,864 | 100 % | 45,586,623 | 67.9 % |
For comparison, uniform sampling over the same corpus (mix v2) gives 74.3 % human, 18.9 % mouse and 43.1 % brain; the eight smallest species go from 0.02-0.18 % each to 0.20-0.85 %.
2. Architecture and training recipe
Verified against config.json (the saved UCEConfig), training/config.yaml (the resolved
Hydra config) and the tensor list of model.safetensors.
Model (UCEForExpressionPrediction, model_type: uce)
input_ids [B, 2048]
-> Embedding(266403, 5120) frozen ESM2 gene-token table (embedding_requires_grad: false)
-> LayerNorm(5120) use_embedding_layer_norm: true
-> Linear(5120 -> 512) -> LayerNorm input_projection_type: linear
-> + sinusoidal positional encoding max_sequence_length 2048
-> TransformerEncoder x 8 d_model 512, nhead 4, dim_feedforward 2048 (expansion_factor 4),
GELU, post-norm (norm_first: false), dropout 0.1
-> position 0 (CLS slot) embedding_reduction: cls
-> Linear(512 -> 512) -> LayerNorm -> F.normalize
=> cell_embedding [B, 512], unit L2 norm (output_embedding_dim 512)
Training head (not needed for embeddings): an MLP decoder with layer dims
[1024, 512, 512, 1] (decoder_dropout 0.1) that takes the concatenation of the cell
embedding and a target gene's projected token embedding and emits one logit.
Parameter count from the safetensors header (118 tensors, all F32, 1,393,937,921 elements):
| block | elements |
|---|---|
uce.embedding_layer.embedding.weight (frozen ESM2 table, 266,403 x 5,120) |
1,363,983,360 |
uce.pos_encoder.pe (fixed sinusoidal buffer, 2048 x 512) |
1,048,576 |
| trained weights (transformer 25,219,072; input projector 2,622,976; output projector 263,680; decoder 790,017; embedding LayerNorm 10,240) | 28,905,985 |
Weights are stored in fp32 (config.json: dtype float32); training ran under bf16 autocast.
Token vocabulary (vocab_size 266,403)
Read from vocab/all_species_gene_dict_v2026-09.json and training/config.yaml:
- ids 0-3: special tokens (
pad_token_idx0,cls_token_idx1,chrom_token_right_idx2 = end of a chromosome block; no gene uses ids 0-3). - ids 4-237,410:
protein_embedding_idof the 11 non-zebrafish species' genes, contiguous per species in the order homo_sapiens, mus_musculus, macaca_mulatta, callithrix_jacchus, pan_troglodytes, rattus_norvegicus, monodelphis_domestica, sus_scrofa, aotus_nancymaae, tupaia_chinensis, microcebus_murinus. - ids 237,411-239,337: chromosome-start tokens =
chrom_token_offset(237,411) +chromosome_idfor those 11 species (chromosome ids 0-1,926; 1,927 tokens). - ids 239,338-266,376: danio_rerio genes (27,039), appended in
v2026-09. - ids 266,377-266,402: danio_rerio chromosome-start tokens (chromosome ids 28,966-28,991, chosen so that the same offset 237,411 still applies).
264,446 gene tokens + 1,953 chromosome tokens in total; there are no collisions between gene and chromosome token ids.
Objective: masked expressed-gene prediction
Per cell, in the DataLoader (uce_suite/data/cell_sentence_sampler.py, parameters from
training/config.yaml: dataset):
- Align the cell's raw counts to the species' vocabulary; expressed = count > 0.
- Hold out
mask_prop= 15 % of the expressed genes (their sampling weight is set to 0). - Draw
sample_size= 1,024 gene tokens with replacement, with probability proportional tolog1p(count). - Group the drawn tokens by chromosome, shuffle the chromosome blocks, sort by genomic
location inside each block, wrap each block in
[CHROM_x] ... [CHROM_END], prepend[CLS], pad topad_length= 2,048. - Targets:
positive_sample_num= 512 expressed genes (the held-out genes first, topped up from the other expressed genes) andnegative_sample_num= 512 non-expressed genes. The decoder predicts expressed / not expressed for each from the cell embedding; the loss is binary cross-entropy with logits, averaged over the 1,024 targets. Classes are balanced by construction, so chance level is ln 2 = 0.6931.
Optimisation (training/config.yaml: training; train.py for the schedule)
| setting | value |
|---|---|
| steps | 131,072 (= 2^17); max_steps, no epochs |
| batch | per_device_train_batch_size 64 x 8 GPUs (H100, one node on the Marlowe cluster) x gradient_accumulation_steps 1 = global batch 512 |
| samples seen | 131,072 x 512 = 67,108,864 sentences drawn from the designed mixture (the same sample budget as brain-uce-pilot-mix-v2), i.e. about 0.46 passes over the train split in aggregate, with the per-cache repeat factor set by the mixture (at most 4x) |
| optimiser | AdamW (Hugging Face Trainer default), peak learning_rate 1e-4, warmup_steps 500, cosine decay (lr_scheduler_type="cosine" in train.py), weight_decay 0.01 |
| precision | bf16: true (autocast; fp32 master weights), torch_compile: true (inductor), DDP |
| data | 26 species specs, split 0.995 / 0.005 / 0 with seed 42; materialised mixture (section 1) with the same seed; 10 dataloader workers, persistent |
| evaluation | none during training (eval_strategy: 'no'); checkpoints every 5,000 steps |
| initialisation | from scratch; the gene-token table was loaded from all_tokens_v2026-09.torch and never updated |
3. Benchmark results (uce_brain_v1)
Rows for mixv3_131k_gb512 from the benchmark results. All metrics are computed on a
fixed stratified subsample of 60,000 cells per dataset, with donor-grouped
cross-validation (GroupKFold on the donor column), so a classifier cannot score by
memorising a donor's batch effect. Embeddings are extracted with deterministic cell sentences
(seeded by row index) and mask_prop = 0.
Metric definitions (from the benchmark):
- loss: mean per-cell training objective (BCE over 512 expressed + 512 non-expressed target genes, training mask); lower is better.
- kNN F1 / acc: cosine k-nearest-neighbour label transfer (k = 15, distance-weighted) to held-out donors; macro-F1 and accuracy, mean over folds.
- probe F1 / acc: multinomial logistic regression on standardised embeddings, same folds.
- donor mix: within each cell type, normalised entropy of donor ids among the 30 nearest neighbours (1 = donors fully mixed), mean over labels.
- label ASW / batch ASW: scIB-style silhouettes on a 10k subsample,
(s(label)+1)/2andmean(1 - |s(donor)|). - PR / PCs95: participation ratio and number of PCs for 95 % variance of the 512-d embedding (a diagnostic of effective dimensionality, not a score).
- genes mapped: fraction of the dataset's genes present in the model's vocabulary.
Evaluation datasets
| dataset | species | what it is | primary label / groups | cells in cache |
|---|---|---|---|---|
down_syndrome |
homo_sapiens | fetal cortex, Down syndrome vs control (10x multiome nuclei; CxG 0df5d172): 8 CL cell types, 15 author types, 30 donors |
cell_type / donor_id |
248,998 |
pediatric_glioma |
homo_sapiens | pediatric high-grade glioma (HTAN CHOP, 10x 3' v3 nuclei; CxG 843c1459): 7 CL cell types, 16 patients, tumor/normal |
cell_type / donor_id |
401,253 |
hmba_v05_macaque |
macaca_mulatta | HMBA whole-brain v0.5 macaque, 10x multiome nuclei not in pretraining (mostly cortex, thalamus, cerebellum): 348 subclasses / 43 classes / 9 neighborhoods, 85 ROIs, 4 donors | subclass / donor |
342,406 |
hmba_v05_marmoset |
callithrix_jacchus | HMBA whole-brain v0.5 marmoset, 10x multiome nuclei not in pretraining: 365 subclasses / 42 classes / 9 neighborhoods, 106 ROIs, 4 donors | subclass / donor |
729,273 |
human_striatum |
homo_sapiens | BICAN HMBA basal-ganglia atlas, caudate + putamen + nucleus accumbens ROIs: 34 atlas cell types, 9 donors | cell_type / donor_id |
657,602 eligible of 1,006,601 |
macaque_striatum |
macaca_mulatta | BICAN HMBA basal-ganglia atlas, caudate + putamen + nucleus accumbens ROIs: 32 atlas cell types, 7 donors | cell_type / donor_id |
403,979 eligible of 535,226 |
The two HMBA v0.5 sets are non-human-primate whole-brain atlases whose cells were not seen in training; they are the cross-species transfer test.
mixv3_131k_gb512, primary label
| dataset | loss (lower better) | kNN F1 | kNN acc | probe F1 | probe acc | donor mix | label ASW | batch ASW | PR | PCs95 | genes mapped |
|---|---|---|---|---|---|---|---|---|---|---|---|
down_syndrome (cell_type) |
0.4068 | 0.7606 | 0.8799 | 0.7881 | 0.9015 | 0.7028 | 0.5620 | 0.8382 | 20.0459 | 63 | 1.0000 |
pediatric_glioma (cell_type) |
0.4402 | 0.8226 | 0.9696 | 0.8208 | 0.9700 | 0.2955 | 0.5843 | 0.8465 | 26.3918 | 62 | 1.0000 |
hmba_v05_macaque (subclass) |
0.3810 | 0.5534 | 0.7526 | 0.6093 | 0.7885 | 0.3059 | 0.5566 | 0.8426 | 13.0647 | 47 | 1.0000 |
hmba_v05_marmoset (subclass) |
0.3963 | 0.1978 | 0.6157 | 0.2370 | 0.6609 | 0.6942 | 0.5706 | 0.8542 | 10.6017 | 39 | 1.0000 |
human_striatum (cell_type) |
0.3826 | 0.7751 | 0.7552 | 0.8359 | 0.8071 | 0.7858 | 0.5961 | 0.8516 | 6.7852 | 47 | 1.0000 |
macaque_striatum (cell_type) |
0.3685 | 0.6348 | 0.6829 | 0.7474 | 0.7817 | 0.6900 | 0.5730 | 0.8689 | 5.9996 | 40 | 1.0000 |
mixv3_131k_gb512, additional labels (donor-grouped kNN and probe)
| dataset | label | kNN acc | kNN macro-F1 | probe acc | probe macro-F1 |
|---|---|---|---|---|---|
| down_syndrome | author_cell_type | 0.7654 | 0.6506 | 0.8338 | 0.7293 |
| down_syndrome | disease | 0.4690 | 0.4644 | 0.4813 | 0.4728 |
| down_syndrome | development_stage | 0.1901 | 0.0972 | 0.2338 | 0.1211 |
| pediatric_glioma | merged_cellType | 0.9696 | 0.8226 | 0.9696 | 0.8211 |
| pediatric_glioma | TumorNormal | 0.8150 | 0.7790 | 0.8483 | 0.8221 |
| pediatric_glioma | molecularClass | 0.4456 | 0.2313 | 0.4697 | 0.2278 |
| hmba_v05_macaque | class | 0.9001 | 0.5585 | 0.9192 | 0.5485 |
| hmba_v05_macaque | neighborhood | 0.9567 | 0.5711 | 0.9549 | 0.5126 |
| hmba_v05_macaque | roi | 0.1936 | 0.0202 | 0.2260 | 0.0208 |
| hmba_v05_marmoset | class | 0.7478 | 0.3937 | 0.7850 | 0.4414 |
| hmba_v05_marmoset | neighborhood | 0.8317 | 0.5553 | 0.8519 | 0.5868 |
| hmba_v05_marmoset | roi | 0.0461 | 0.0097 | 0.0520 | 0.0112 |
| human_striatum | tissue | 0.2164 | 0.1306 | 0.2372 | 0.1375 |
| macaque_striatum | tissue | 0.2517 | 0.1832 | 0.2591 | 0.1844 |
disease, TumorNormal and molecularClass are donor-level labels and roi / tissue are
brain-region labels; under donor-grouped folds these sit near chance for every model.
Held-out pretraining loss
Mean per-cell training objective on the first 20,000 cells of this model's own validation split, per pretraining cache (identical cells and targets for every model that shares the cache):
| bg_callithrix_jacchus | bg_homo_sapiens | census_homo_sapiens | census_macaca_mulatta | census_mus_musculus | discover_danio_rerio | discover_homo_sapiens | nemo_homo_sapiens | nemo_mus_musculus |
|---|---|---|---|---|---|---|---|---|
| 0.3756 | 0.3828 | 0.3851 | 0.3503 | 0.3726 | 0.3325 | 0.3662 | 0.3959 | 0.3631 |
Headline comparison: primate transfer
Donor-grouped kNN macro-F1 on the same 60,000-cell subsamples:
| model | trained on | HMBA macaque subclass |
HMBA marmoset subclass |
human striatum cell_type |
macaque striatum cell_type |
macaque loss | genes mapped |
|---|---|---|---|---|---|---|---|
mixv3_131k_gb512 (this model) |
designed mixture (section 1), 131k steps at global batch 512 | 0.5534 | 0.1978 | 0.7751 | 0.6348 | 0.3810 | 1.0000 |
multi_v09_262k (brain-uce-pilot-mix-v2) |
same corpus, uniform sampling, 262k steps at global batch 256 (same sample budget) | 0.5058 | 0.1779 | 0.7515 | 0.6025 | 0.3840 | 1.0000 |
multi_v09_131k |
same corpus, uniform sampling, 131k steps at global batch 256 | 0.4363 | 0.1447 | 0.6910 | 0.5516 | 0.3866 | 1.0000 |
human_v09_131k (species ablation) |
human caches only, same vocab and recipe, 131k steps | 0.3902 | 0.1285 | 0.7051 | 0.5137 | 0.4739 | 1.0000 |
human_census_legacy_150k |
human CELLxGENE Census only, legacy 145k vocab, 150k steps at global batch 512 | 0.3531 | n/a | 0.7398 | 0.5077 | 0.5209 | 0.5343 |
With the same number of training samples as the uniform 262k-step model, the designed mixture is the strongest model on every non-human-primate set and on both striatum sets, while staying within run-to-run noise (about 0.01 F1) on the two human cortical sets; its held-out loss is slightly higher on human and mouse caches and lower on zebrafish and the primate sets, i.e. the reweighting traded a little human fit for cross-species transfer.
One training seed per model; differences of a few 1e-3 in loss or about 0.01 in F1 are within run-to-run noise.
4. How to load
The repository is laid out so that its root is a checkpoint directory for
uce_suite.inference (config.json + model.safetensors next to each other, and the run's
config.yaml beside them, which is the first place load_cell_sentence_params looks):
brain-uce-pilot-mix-v3/
README.md this card
MANIFEST.md sizes + sha256 of every file
config.json UCEConfig (HF PretrainedConfig)
model.safetensors weights, incl. the frozen 266,403 x 5,120 gene-token table
config.yaml resolved training config; supplies the cell-sentence parameters
training/
config.yaml same file, kept with the provenance set
config_unresolved.yaml the config with Hydra interpolations unresolved
git_info.json commit / branch / dirty flag of the code that trained the model
dataset_indices_summary.json train / val cell counts per cache
vocab/
all_species_gene_dict_v2026-09.json species -> gene symbol -> {protein_embedding_id, chromosome_id, location}
gene_names_v2026-09/gene_names_<species>.txt each species' vocabulary, one symbol per line, in token-id order
You need the uce_suite package from the uce-training-suite repository (commit in
training/git_info.json; Python >= 3.12, torch >= 2.6, transformers >= 4.57.1,
safetensors, datasets). load_uce_checkpoint contains a workaround for
transformers >= 5, which otherwise re-initialises the trained linear layers after
from_pretrained; the checkpoint itself was saved with transformers 5.15.0.
Untested snippet (the model was not run while preparing this card):
from huggingface_hub import snapshot_download
from uce_suite.inference import (
load_uce_checkpoint, load_cell_sentence_params, load_gene_artifacts, embed_dataset,
)
repo = snapshot_download("KuanP/brain-uce-pilot-mix-v3") # or a local clone
species = "macaca_mulatta" # must be a top-level key of vocab/all_species_gene_dict_v2026-09.json
# 1. cell-sentence parameters, read from <repo>/config.yaml (pad_length 2048, chrom_token_offset 237411, ...)
params = load_cell_sentence_params(repo)
# 2. gene artifacts: the DATASET's gene axis (one symbol per line, line i == column i of your matrix)
# and the species' entry of the shared gene mapping
gene_names, gene_mapping = load_gene_artifacts(
gene_names_path=f"{repo}/vocab/gene_names_v2026-09/gene_names_{species}.txt", # if your dataset uses the vocab gene axis
gene_mapping_path=f"{repo}/vocab/all_species_gene_dict_v2026-09.json",
species=species,
)
# 3. weights: config.json + model.safetensors at the repo root
model = load_uce_checkpoint(repo, device="cuda") # fp32 weights; bf16 autocast is applied at embed time
# 4. embed an Arrow dataset (datasets.save_to_disk layout, see section 5)
emb = embed_dataset(
model, "/path/to/my_cells.dataset", gene_names, gene_mapping, params,
species=species, batch_size=64, num_workers=8, device="cuda",
mask_prop=0.0, # default for embeddings; do not mask genes
output_path="my_cells_uce.npz", # optional: cell_embeddings + cell_indices
)
# emb: float32 [n_cells, 512], unit L2 norm, row i == row i of the dataset
CLI equivalent (uce-infer = python -m uce_suite.inference.cli). The saved config.yaml is
a multi-species config without a top-level dataset.gene_names_path / dataset.species, so
--gene-names, --gene-mapping and --species must be passed explicitly:
uce-infer --checkpoint /path/to/brain-uce-pilot-mix-v3 \
--dataset /path/to/my_cells.dataset \
--gene-names /path/to/brain-uce-pilot-mix-v3/vocab/gene_names_v2026-09/gene_names_macaca_mulatta.txt \
--gene-mapping /path/to/brain-uce-pilot-mix-v3/vocab/all_species_gene_dict_v2026-09.json \
--species macaca_mulatta --mode embed --output my_cells_uce.npz
Mapping to a training-run layout: the loader normally expects
<run>/<timestamp>/checkpoint-<step>/{config.json,model.safetensors} with config.yaml one
level up; here all three sit in the same directory, which the loader's first lookup
(<checkpoint>/config.yaml) covers. config.yaml still contains the absolute cluster paths of
the training caches; only its dataset.{pad_length, positive_sample_num, negative_sample_num, mask_prop, sample_size, cls_token_idx, chrom_token_offset, chrom_token_right_idx, pad_token_idx}
keys are read at inference. Sanity checks after loading: embedding norms ~1.0, pairwise cosine
similarities well below 1.0, and (with compute_per_cell_loss) a mean loss well below
ln 2 = 0.6931; a loss pinned at 0.6931 means the weights did not survive loading.
5. Input expectations
- Raw UMI counts, not normalised or log-transformed. The sentence sampler treats
count > 0as "expressed" and samples tokens with probability proportional tolog1p(count); a normalised matrix changes both. - Dataset format: a Hugging Face
datasetsdirectory (save_to_disklayout) with, per cell,expr_indices(ascending column indices of the nonzero genes) andexpr_values(their counts) โ the sparse layout used in training โ or a denseexprvector. Gene alignment is positional: line i of thegene_names.txtyou pass is column i of the matrix. The training caches were built with the species' vocabulary list as their gene axis, so the simplest route is to reorder / subset your matrix tovocab/gene_names_v2026-09/gene_names_<species>.txtand pass that file asgene_names_path. Thescripts/build_cache/03_build_arrow_cache.pyscript in the code repository converts.h5adfiles into this layout and writes the matchinggene_names.txt. - Gene symbols are matched by exact string against the species' entry in the gene
mapping; every vocabulary symbol is upper-case (e.g. mouse
A730008H23RIK,LOC100041708). Genes absent from the mapping are dropped for that cell; the dataset view logs the retained fraction. Symbols, not Ensembl ids. - Species must be one of the 12 top-level keys of
vocab/all_species_gene_dict_v2026-09.json(number of vocabulary genes in parentheses):homo_sapiens(20,076),mus_musculus(22,198),macaca_mulatta(21,513),callithrix_jacchus(21,743),pan_troglodytes(22,543),rattus_norvegicus(23,154),monodelphis_domestica(21,248),sus_scrofa(22,080),aotus_nancymaae(21,779),tupaia_chinensis(21,079),microcebus_murinus(19,994),danio_rerio(27,039). The 13th training species,macaca_nemestrina(pig-tailed macaque), has no entry of its own: it was trained through themacaca_mulattavocabulary (vocab_key: macaca_mulattaintraining/config.yaml), so use that key for it. - Cell-sentence settings, read from
config.yaml: datasetand required to match training exactly:pad_length2048,sample_size1024,positive_sample_num512,negative_sample_num512,mask_prop0.15 (training; use 0.0 for embeddings),cls_token_idx1,pad_token_idx0,chrom_token_right_idx2,chrom_token_offset237411. A wrong offset does not raise; it silently produces well-formed, meaningless embeddings. - Per-cell RNG: sentences are sampled, so embeddings are stochastic in principle;
embed_datasetseeds each cell's sampler with its row index (deterministic=True), which makes results reproducible across runs and comparable across models. - Not shipped:
all_tokens_v2026-09.torch(the 266,403 x 5,120 ESM2 gene-token table, 5.4 GB) is not included because the identical table is stored insidemodel.safetensorsasuce.embedding_layer.embedding.weight; it is only needed to start a new training run.
6. Caveats
- Pilot research model. One seed, one recipe, no hyper-parameter search; benchmark differences of about 0.01 F1 are within noise. The 512-d embedding is low-rank in practice (participation ratio 10-26 on the evaluation sets above).
- License not yet chosen. The front matter says
license: otherbecause the authors have not selected a license; until they do, please contact them before any use beyond evaluation. - Pretraining sources: CELLxGENE Census build 2025-11-08 (human, mouse, rhesus macaque, marmoset, chimpanzee); BICAN NeMO and BrainGenome (multi-species brain); CELLxGENE Discover (human, mouse, rat, mouse lemur, pig, zebrafish). The attribution and terms of use of those original sources apply to the data this model was trained on.
- Coverage is designed, not uniform: 60 % of the training samples are human and 23 % mouse; the eight smallest species contribute 0.2-0.85 % each (3-20x their uniform share) and brain tissue 68 % of samples. Non-brain human tissues (blood, embryo, eye, ...) were sampled at a fraction of their corpus share; expect the mix-v2 model to fit those slightly better.
- Species outside the vocabulary (any key not listed above) cannot be embedded without building a new gene mapping and token table.
- No evaluation ran during training; the numbers in section 3 come from the separate
uce_brain_v1benchmark run after training finished.
- Downloads last month
- -