Mishamq commited on
Commit
b0e4319
·
verified ·
1 Parent(s): 7f8b9fb

Rewrite model card

Browse files
Files changed (1) hide show
  1. README.md +42 -34
README.md CHANGED
@@ -1,75 +1,83 @@
1
  ---
2
  license: apache-2.0
3
  library_name: transformers
4
- tags: ["dna", "genomics", "msa", "variant-effect-prediction", "mamba", "moe"]
5
- pipeline_tag: text-generation
6
- language:
7
  - dna
 
 
 
 
 
 
8
  ---
9
 
10
  # CENO-P-1B
11
 
12
- **CENO-P-1B** is the multi-species alignment (MSA) post-trained variant of the CENO DNA foundation model. It carries `intra_encoding_pattern` in its config and ships the MSA scoring modeling path (`modeling_ceno_p.py`), which consumes a per-token `seq_idx` to score packed MSA inputs. Use this checkpoint for variant effect prediction (VEP) via the TraitGym example in the companion [CENO code repository](https://github.com/CladeTeam/CENO).
 
 
 
13
 
14
- This checkpoint is part of the **CENO** DNA foundation model family. The model
15
- code, VEP pipeline, and generation demo live in the sibling [CENO code repository](https://github.com/CladeTeam/CENO); this
16
- directory is standalone-loadable via `trust_remote_code=True` (the model code is
17
- bundled here).
18
 
19
  ## Model details
20
 
21
- | | |
22
  |---|---|
23
  | Family | CENO-P (MSA post-trained) |
24
- | Stage | MSA post-trained |
25
- | Parameters | 1302.4M |
26
  | Precision | float32 |
27
- | Weights | `model.safetensors` (sharded: `model-0000*-of-*.safetensors` + `model.safetensors.index.json`) |
28
  | `model_type` | `ceno` |
29
- | `architectures` | `CENOPForCausalLM` |
30
- | `auto_map` model | `modeling_ceno_p.CENOPForCausalLM` |
31
- | `auto_map` tokenizer | `ceno_tokenizer.CENOCharLevelTokenizer` |
32
 
33
- ### Architecture
34
 
 
 
35
  | Hidden layers | 38 |
36
- | Context length | 1048576 |
37
- | Vocab size | 512 |
38
  | Attention heads | 16 |
39
  | Intermediate size | 4096 |
40
- | Num experts (MoE) | 8 |
 
41
 
42
  The backbone is a Mamba / Attention / Mixture-of-Experts hybrid (Nemotron-H
43
- architecture). The tokenizer is byte-level (character-level), mapping DNA
44
- characters to their ASCII byte codes (vocab size 512).
45
 
46
- ## Loading
47
 
48
  ```python
49
  from transformers import AutoModelForCausalLM, AutoTokenizer
50
 
51
- ckpt = "CENO-P-1B" # path to this directory
52
  model = AutoModelForCausalLM.from_pretrained(ckpt, trust_remote_code=True)
53
  tokenizer = AutoTokenizer.from_pretrained(ckpt, trust_remote_code=True)
54
 
55
  ids = tokenizer.encode("ATCGATCG", return_tensors="pt")
56
- # out = model.generate(ids, max_new_tokens=128) # needs a GPU (Mamba kernels)
57
  ```
58
 
59
- > The Mamba layers require CUDA kernels, so forward / generation needs a GPU.
60
  > Config, tokenizer, and weight loading are CPU-safe.
61
 
62
  ## Intended use
63
 
64
- - **Base checkpoints (CENO-*)**: genomic-sequence generation and embedding
65
- extraction; downstream adaptation (fine-tuning, probing) on genomics tasks.
66
- - **MSA checkpoints (CENO-P-*)**: variant effect prediction (VEP) by scoring
67
- wild-type vs. variant sequences with delta log-likelihood, using the MSA
68
- scoring path. See the TraitGym VEP example in the [CENO code repository](https://github.com/CladeTeam/CENO).
69
 
70
  ## License
71
 
72
- Apache-2.0. The bundled model code is derived from NVIDIA's Nemotron-H
73
- HuggingFace implementation (Apache-2.0); the tokenizer is derived from Arc
74
- Institute's Evo2 CharLevelTokenizer (Apache-2.0). See the `LICENSE` and `NOTICE`
75
- files in this directory for full attribution.
 
1
  ---
2
  license: apache-2.0
3
  library_name: transformers
4
+ tags:
 
 
5
  - dna
6
+ - genomics
7
+ - msa
8
+ - variant-effect-prediction
9
+ - mamba
10
+ - moe
11
+ pipeline_tag: text-generation
12
  ---
13
 
14
  # CENO-P-1B
15
 
16
+ **CENO-P-1B** is the multi-species alignment (MSA) post-trained variant of the 1B **CENO**
17
+ DNA foundation model, for **variant effect prediction (VEP)**. It carries
18
+ `intra_encoding_pattern` in its config and ships the MSA scoring path (`modeling_ceno_p.py`),
19
+ which consumes a per-token `seq_idx` to score packed MSA inputs.
20
 
21
+ It is part of the **CENO** DNA foundation model family. Model code, the VEP pipeline, and a
22
+ generation demo live in the companion [CENO code repository](https://github.com/CladeTeam/CENO).
23
+ Run VEP via the TraitGym example there. This checkpoint is standalone-loadable with
24
+ `trust_remote_code=True` — the model code is bundled here.
25
 
26
  ## Model details
27
 
28
+ | | |
29
  |---|---|
30
  | Family | CENO-P (MSA post-trained) |
31
+ | Training stage | MSA post-training (VEP) |
32
+ | Parameters | 1.3B (1302.4M) |
33
  | Precision | float32 |
 
34
  | `model_type` | `ceno` |
35
+ | Architecture class | `CENOPForCausalLM` |
36
+ | Auto-map (model) | `modeling_ceno_p.CENOPForCausalLM` |
37
+ | Auto-map (tokenizer) | `ceno_tokenizer.CENOCharLevelTokenizer` |
38
 
39
+ ## Architecture
40
 
41
+ | Property | Value |
42
+ |---|---|
43
  | Hidden layers | 38 |
44
+ | Hidden size | 1024 |
 
45
  | Attention heads | 16 |
46
  | Intermediate size | 4096 |
47
+ | Experts (MoE) | 8 (top-2 per token) |
48
+ | Vocabulary | 512 (byte / character-level) |
49
 
50
  The backbone is a Mamba / Attention / Mixture-of-Experts hybrid (Nemotron-H
51
+ architecture). The tokenizer is character-level, mapping DNA bases to their ASCII
52
+ byte codes.
53
 
54
+ ## Usage
55
 
56
  ```python
57
  from transformers import AutoModelForCausalLM, AutoTokenizer
58
 
59
+ ckpt = "CladeTeam/CENO-P-1B"
60
  model = AutoModelForCausalLM.from_pretrained(ckpt, trust_remote_code=True)
61
  tokenizer = AutoTokenizer.from_pretrained(ckpt, trust_remote_code=True)
62
 
63
  ids = tokenizer.encode("ATCGATCG", return_tensors="pt")
64
+ # out = model.generate(ids, max_new_tokens=128) # needs a CUDA GPU (Mamba kernels)
65
  ```
66
 
67
+ > The Mamba layers require CUDA kernels, so forward passes and generation need a GPU.
68
  > Config, tokenizer, and weight loading are CPU-safe.
69
 
70
  ## Intended use
71
 
72
+ - **Base checkpoints (`CENO-*`)** genomic-sequence generation and embedding extraction;
73
+ downstream adaptation (fine-tuning, probing) for genomics tasks.
74
+ - **MSA checkpoints (`CENO-P-*`)** variant effect prediction (VEP) by scoring wild-type
75
+ vs. variant sequences with delta log-likelihood. See the TraitGym VEP example in the
76
+ [CENO code repository](https://github.com/CladeTeam/CENO).
77
 
78
  ## License
79
 
80
+ Apache-2.0. The bundled model code is derived from NVIDIA's Nemotron-H Hugging Face
81
+ implementation (Apache-2.0); the tokenizer is derived from the Arc Institute Evo2
82
+ `CharLevelTokenizer` (Apache-2.0). See the `LICENSE` and `NOTICE` files in this repository
83
+ for full attribution.