Instructions to use KuanP/cxg-random75 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KuanP/cxg-random75 with Transformers:
# Load model directly from transformers import UCEForExpressionPrediction model = UCEForExpressionPrediction.from_pretrained("KuanP/cxg-random75", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload config.yaml with huggingface_hub
Browse files- config.yaml +86 -0
config.yaml
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
seed: 42
|
| 2 |
+
output_base_dir: /s3_data/kuan/model_cache_fsx
|
| 3 |
+
dataset:
|
| 4 |
+
pad_length: 2048
|
| 5 |
+
positive_sample_num: 512
|
| 6 |
+
negative_sample_num: 512
|
| 7 |
+
mask_prop: 0.15
|
| 8 |
+
sample_size: 1024
|
| 9 |
+
cls_token_idx: 1
|
| 10 |
+
chrom_token_offset: 143574
|
| 11 |
+
chrom_token_right_idx: 2
|
| 12 |
+
pad_token_idx: 0
|
| 13 |
+
name: cellxgene_2025_exclude_ts_sparse_random75pct
|
| 14 |
+
dataset_path: /scratch/kuan/cellxgene_cache/cellxgene_all_partitions_2025-01-30_wo_filter_sparse_sparse_raw.dataset
|
| 15 |
+
gene_names_path: /s3_data/kuan/cellxgene_cache_dataset/gene_names_2025.txt
|
| 16 |
+
gene_mapping_path: /s3_data/kuan/cellxgene_cache_dataset/all_species_gene_dict.json
|
| 17 |
+
species: human
|
| 18 |
+
train_val_test_split:
|
| 19 |
+
- 0.995
|
| 20 |
+
- 0.005
|
| 21 |
+
- 0
|
| 22 |
+
seed: 42
|
| 23 |
+
selectors:
|
| 24 |
+
- _target_: data_collection_suite.data.selectors.ExcludeDatasetSelector
|
| 25 |
+
dataset_id: 53d208b0-2cfd-4366-9866-c3c6114081bc
|
| 26 |
+
- _target_: data_collection_suite.data.selectors.SampleKeyFractionSelector
|
| 27 |
+
fraction: 0.75
|
| 28 |
+
seed: 42
|
| 29 |
+
training:
|
| 30 |
+
max_steps: 131072
|
| 31 |
+
per_device_train_batch_size: 256
|
| 32 |
+
per_device_eval_batch_size: 256
|
| 33 |
+
gradient_accumulation_steps: 1
|
| 34 |
+
learning_rate: 5.0e-05
|
| 35 |
+
weight_decay: 0.0001
|
| 36 |
+
warmup_steps: 500
|
| 37 |
+
logging_steps: 100
|
| 38 |
+
save_steps: 5000
|
| 39 |
+
eval_steps: 2500
|
| 40 |
+
save_total_limit: 200
|
| 41 |
+
remove_unused_columns: false
|
| 42 |
+
dataloader_num_workers: 4
|
| 43 |
+
bf16: true
|
| 44 |
+
gradient_checkpointing: false
|
| 45 |
+
torch_compile: true
|
| 46 |
+
torch_compile_backend: inductor
|
| 47 |
+
auto_resume: true
|
| 48 |
+
ddp_find_unused_parameters: false
|
| 49 |
+
dataloader_persistent_workers: true
|
| 50 |
+
ddp_bucket_cap_mb: 25
|
| 51 |
+
lr_scheduler_type: cosine
|
| 52 |
+
model:
|
| 53 |
+
_target_: data_collection_suite.model.uce.modeling_uce.UCEForExpressionPrediction
|
| 54 |
+
config:
|
| 55 |
+
_target_: data_collection_suite.model.uce.config_uce.UCEConfig
|
| 56 |
+
vocab_size: 145469
|
| 57 |
+
embedding_dim: 5120
|
| 58 |
+
d_model: 512
|
| 59 |
+
nhead: 4
|
| 60 |
+
num_layers: 8
|
| 61 |
+
dropout: 0.1
|
| 62 |
+
activation: gelu
|
| 63 |
+
expansion_factor: 4
|
| 64 |
+
max_sequence_length: 2048
|
| 65 |
+
padding_idx: 0
|
| 66 |
+
embedding_requires_grad: false
|
| 67 |
+
use_embedding_layer_norm: true
|
| 68 |
+
embedding_reduction: cls
|
| 69 |
+
output_embedding_dim: 512
|
| 70 |
+
decoder_dropout: 0.1
|
| 71 |
+
positional_encoding_type: sinusoidal
|
| 72 |
+
pretrained_embeddings:
|
| 73 |
+
path: /s3_data/kuan/UCE_data/all_tokens.torch
|
| 74 |
+
load: true
|
| 75 |
+
experiment:
|
| 76 |
+
name: scaling_law_8l_random75_aligned_setting_steps131072
|
| 77 |
+
description: Scaling law 8L prenorm - random 75% baseline - wd=0.1, steps=131072
|
| 78 |
+
tags:
|
| 79 |
+
- uce
|
| 80 |
+
- scaling_law
|
| 81 |
+
- 8l
|
| 82 |
+
- prenorm
|
| 83 |
+
- steps131072
|
| 84 |
+
- random75
|
| 85 |
+
- baseline
|
| 86 |
+
- aligned_setting
|