jwkova commited on
Commit
6821692
·
1 Parent(s): 50c95a4

MIMIC 1.0

Browse files
Files changed (3) hide show
  1. README.md +80 -1
  2. config.json +89 -0
  3. model.safetensors +3 -0
README.md CHANGED
@@ -1,3 +1,82 @@
 
 
 
 
 
 
 
 
1
  ---
2
- license: mit
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ TODO before making the repo public:
3
+ - Set the weights license below (the CODE is Apache-2.0; the weights license is
4
+ Polymathic's call). Add `license:` (+ `license_name`/`license_link` if "other")
5
+ to the YAML front-matter.
6
+ - Fill in the Training data and Citation sections.
7
+ - Update the install instructions once the `mimic` package location is final.
8
+ -->
9
  ---
10
+ tags:
11
+ - biology
12
+ - genomics
13
+ - dna
14
+ - rna
15
+ - protein
16
+ - multimodal
17
+ - foundation-model
18
  ---
19
+
20
+ # MIMIC 1.0
21
+
22
+ MIMIC is a multimodal encoder–decoder foundation model of the central dogma, trained
23
+ jointly over **DNA, RNA, and protein** together with a range of structural and
24
+ functional tracks. A single model embeds any subset of modalities into a shared
25
+ representation space and generates any modality conditioned on the others.
26
+
27
+ - **Architecture:** 20-layer encoder × 1536-d, 12-layer decoder × 1536-d, rotary
28
+ position embeddings, mixed (uni-/bi-directional) attention, 5 register tokens.
29
+ - **Parameters:** ~1.25B.
30
+ - **Weights:** `bfloat16`, `safetensors`.
31
+ - **Modalities (26):** nucleotide/amino-acid sequence, codons, splice junctions/regions,
32
+ coding annotation, conservation (phyloP human/mouse), protein structure tokens, DSSP,
33
+ SASA, MaSIF surface features, protein abundance, RASP2 reactivity, and free-text
34
+ functional/context channels.
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ from mimic import load_pretrained
40
+
41
+ # Downloads config.json + model.safetensors pinned to git tag v1.0.
42
+ model = load_pretrained(version="1.0")
43
+
44
+ # --- Embed ---
45
+ model.input([{"rna_seq": "ACGUACGUACGUACGU"}])
46
+ reps = model.embed() # per-sample encoder representations
47
+ # reps[0]["full"] -> (num_tokens, 1536) tensor
48
+ # reps[0]["dna/rna"] -> just the RNA tokens
49
+
50
+ # --- Generate ---
51
+ # Mask positions you want the model to fill (or request a co-grouped modality),
52
+ # then generate. Default strategy is an Ensemble soft-vote (deterministic at low temp).
53
+ model.input([{"rna_seq": "ACGU____"}])
54
+ out = model.generate("rna_seq", strategy="one_shot")
55
+ print(out["rna_seq"]["preds"]) # detokenized prediction
56
+ ```
57
+
58
+ `load_pretrained` fetches only `config.json` + `model.safetensors`; tokenizers ship
59
+ inside the `mimic` package.
60
+
61
+ > **Install:** the `mimic` package is distributed separately.
62
+ > `TODO: pip install mimic` / link to the package repository.
63
+
64
+ ## Files
65
+
66
+ | File | Description |
67
+ |------|-------------|
68
+ | `config.json` | Architecture + modality configuration consumed by `load_pretrained`. |
69
+ | `model.safetensors` | Model weights (bf16). |
70
+
71
+ ## Training data
72
+
73
+ `TODO: summarize the pretraining corpus (sources, modalities, scale).`
74
+
75
+ ## Citation
76
+
77
+ `TODO: add citation / BibTeX.`
78
+
79
+ ## License
80
+
81
+ `TODO: confirm the weights license.` The accompanying source code is released under
82
+ the Apache License 2.0.
config.json ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "encoder": "xt_encoder_20L_1536D",
3
+ "decoder": "xt_decoder_12L_1536D",
4
+ "encoder_dim": null,
5
+ "decoder_dim": null,
6
+ "encoder_depth": null,
7
+ "decoder_depth": null,
8
+ "encoder_position_code": "rotary",
9
+ "decoder_position_code": "rotary",
10
+ "rotary_emb_ratio": 0.75,
11
+ "encoder_use_alibi": false,
12
+ "decoder_use_alibi": false,
13
+ "attn_flash": true,
14
+ "mixed_attention": true,
15
+ "unidir_attention_ratio": 0.5,
16
+ "num_register_tokens": 5,
17
+ "sum_modality_groups": true,
18
+ "exclude_absent_tokens": true,
19
+ "decoder_causal_mask": false,
20
+ "decoder_sep_mask": true,
21
+ "share_model_embeddings": true,
22
+ "drop_enc_rate_min": 0.0,
23
+ "drop_enc_rate_max": 0.1,
24
+ "class_balance_max": null,
25
+ "freeze_llm_emb": true,
26
+ "num_input_tokens": 10000,
27
+ "num_target_tokens": 1000,
28
+ "is_target_autoregr": false,
29
+ "dtype": "bfloat16",
30
+ "in_domains": [
31
+ "tok_aa_seq",
32
+ "tok_atac",
33
+ "tok_cage",
34
+ "tok_cds_junctions",
35
+ "tok_context",
36
+ "tok_corpus",
37
+ "tok_dssp",
38
+ "tok_feature_type",
39
+ "tok_funcprot_caption",
40
+ "tok_gene_family_txt",
41
+ "tok_is_coding",
42
+ "tok_masif_charge",
43
+ "tok_masif_hbond",
44
+ "tok_masif_hydrophobicity",
45
+ "tok_masif_n_vertices",
46
+ "tok_masif_si_index",
47
+ "tok_phylop_human",
48
+ "tok_phylop_mouse",
49
+ "tok_prot_abund",
50
+ "tok_prot_struct",
51
+ "tok_rasp2",
52
+ "tok_rna_codons",
53
+ "tok_rna_seq",
54
+ "tok_sasa",
55
+ "tok_splice_jctns_5cls",
56
+ "tok_splice_regions"
57
+ ],
58
+ "out_domains": [
59
+ "tok_aa_seq",
60
+ "tok_atac",
61
+ "tok_cage",
62
+ "tok_cds_junctions",
63
+ "tok_context",
64
+ "tok_corpus",
65
+ "tok_dssp",
66
+ "tok_feature_type",
67
+ "tok_funcprot_caption",
68
+ "tok_gene_family_txt",
69
+ "tok_is_coding",
70
+ "tok_masif_charge",
71
+ "tok_masif_hbond",
72
+ "tok_masif_hydrophobicity",
73
+ "tok_masif_n_vertices",
74
+ "tok_masif_si_index",
75
+ "tok_phylop_human",
76
+ "tok_phylop_mouse",
77
+ "tok_prot_abund",
78
+ "tok_prot_struct",
79
+ "tok_rasp2",
80
+ "tok_rna_codons",
81
+ "tok_rna_seq",
82
+ "tok_sasa",
83
+ "tok_splice_jctns_5cls",
84
+ "tok_splice_regions"
85
+ ],
86
+ "init_text_from_biobert": false,
87
+ "mimic_version": "1.0",
88
+ "source_checkpoint": "5.7_main/E20-D12-H1536-pt7-synced/checkpoint-final.pth"
89
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75d09f50b5343fe243c1c87123adf56a08cff8d55ff80749fd50bc6f963f6dc9
3
+ size 2824113784