Text Generation
Transformers
Safetensors
ceno
dna
genomics
msa
variant-effect-prediction
mamba
Mixture of Experts
custom_code
Instructions to use CladeTeam/CENO-P-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CladeTeam/CENO-P-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CladeTeam/CENO-P-1B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("CladeTeam/CENO-P-1B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CladeTeam/CENO-P-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CladeTeam/CENO-P-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CladeTeam/CENO-P-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CladeTeam/CENO-P-1B
- SGLang
How to use CladeTeam/CENO-P-1B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "CladeTeam/CENO-P-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CladeTeam/CENO-P-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "CladeTeam/CENO-P-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CladeTeam/CENO-P-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CladeTeam/CENO-P-1B with Docker Model Runner:
docker model run hf.co/CladeTeam/CENO-P-1B
Rewrite model card
Browse files
README.md
CHANGED
|
@@ -1,75 +1,83 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
library_name: transformers
|
| 4 |
-
tags:
|
| 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
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
bundled here
|
| 18 |
|
| 19 |
## Model details
|
| 20 |
|
| 21 |
-
|
|
| 22 |
|---|---|
|
| 23 |
| Family | CENO-P (MSA post-trained) |
|
| 24 |
-
|
|
| 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 |
-
|
|
| 30 |
-
|
|
| 31 |
-
|
|
| 32 |
|
| 33 |
-
##
|
| 34 |
|
|
|
|
|
|
|
| 35 |
| Hidden layers | 38 |
|
| 36 |
-
|
|
| 37 |
-
| Vocab size | 512 |
|
| 38 |
| Attention heads | 16 |
|
| 39 |
| Intermediate size | 4096 |
|
| 40 |
-
|
|
|
|
|
| 41 |
|
| 42 |
The backbone is a Mamba / Attention / Mixture-of-Experts hybrid (Nemotron-H
|
| 43 |
-
architecture). The tokenizer is
|
| 44 |
-
|
| 45 |
|
| 46 |
-
##
|
| 47 |
|
| 48 |
```python
|
| 49 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 50 |
|
| 51 |
-
ckpt = "CENO-P-1B"
|
| 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
|
| 60 |
> Config, tokenizer, and weight loading are CPU-safe.
|
| 61 |
|
| 62 |
## Intended use
|
| 63 |
|
| 64 |
-
- **Base checkpoints (CENO-*)**
|
| 65 |
-
|
| 66 |
-
- **MSA checkpoints (CENO-P-*)**
|
| 67 |
-
|
| 68 |
-
|
| 69 |
|
| 70 |
## License
|
| 71 |
|
| 72 |
-
Apache-2.0. The bundled model code is derived from NVIDIA's Nemotron-H
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
| 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.
|