
Coatl-1
Coatl-1 is a 2.89 billion parameter decoder-only transformer trained from scratch on natural language and biological data. Every modality is represented as plain text with one shared 16,384-token vocabulary.
Coatl-1 was trained on 160 billion tokens across internet text, scientific papers, DNA, RNA, proteins, protein structures, single-cell gene expression profiles, cell perturbations, and user-assistant conversations, followed by online reinforcement learning.
For full technical details, see the Coatl-1 announcement.
Architecture
Coatl-1 uses a Llama-style decoder backbone modified for stability and long-context performance:
- Wall Attention. Learned per-channel forget gates replace positional encodings. The running product of gates between two positions scales their attention score per key/value head channel, so Coatl-1 has no fixed context limit.
- QK-Norm. Queries and keys are normalized per head with a learned per-channel gain before attention.
- Output gates. Each query head's attention output is multiplied by a learned sigmoid gate before the output projection.
- Peri-LN. RMSNorm is applied to both the input and the output of every attention and SwiGLU feed-forward sublayer.
- Case-agnostic tokenizer. Before BPE merges, the tokenizer works like a keyboard:
<shift>and<caps>mark single and repeated uppercase letters, and<bow>and<eow>mark word boundaries while absorbing adjacent spaces. Uppercase and lowercase text or biological sequences share the same merges, and numbers use fixed 1-, 2-, and 3-digit tokens.
| Parameter | Value |
|---|---|
| Total parameters | 2,891,317,760 (~2.89B) |
| Layers | 40 |
| Model width | 2,560 |
| Feed-forward width | 6,912 (SwiGLU) |
| Query heads | 20 |
| Key/value heads | 4 (5:1 GQA) |
| Head dimension | 128 |
| Vocabulary size | 16,384 |
| Embeddings | Untied input and output |
| Positional encoding | None (Wall Attention forget gates) |
| Chat format | OpenAI Harmony (analysis, commentary, final) |
| Weights precision | bfloat16 (~5.8 GB on disk) |
| License | Apache 2.0 |
Training data
Coatl-1 was pretrained on 160 billion tokens across nine modalities, with train, validation, and evaluation splits grouped by biological family (and by donor for single-cell datasets) to prevent leakage across modalities.
| Modality | Tokens (billions) |
|---|---|
| Internet text | 43.0 |
| DNA | 32.3 |
| Proteins | 17.7 |
| Research papers | 14.9 |
| Single-cell gene expression profiles | 14.2 |
| Cell perturbations | 12.1 |
| RNA | 10.0 |
| User-assistant conversations | 9.5 |
| Protein structures | 6.4 |
| Total | 160.0 |
Quickstart with Transformers
Coatl-1 runs through standard Hugging Face transformers with trust_remote_code=True. At 2.89B parameters in bfloat16, it fits on an 8 GB GPU.
pip install torch transformers safetensors tokenizers
Chat
Coatl-1 uses the OpenAI Harmony chat format with analysis, commentary, and final channels. apply_chat_template formats conversations and tool declarations, and parse_completion separates reasoning from the final answer.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Recension/Coatl-1"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "user", "content": "Explain what a signal peptide does in a secreted protein."}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
with torch.inference_mode():
output = model.generate(
inputs,
max_new_tokens=512,
temperature=0.6,
top_k=50,
)
parsed = tokenizer.parse_completion(output[0][inputs.shape[-1]:].tolist())
print("Reasoning:", parsed["reasoning_content"])
print("Answer:", parsed["content"])
Pass reasoning_effort="none" (or enable_thinking=False) to apply_chat_template to open the final channel directly without an analysis block. The prompt then opens that channel itself, so pass channel="final" to parse_completion.
Raw biological sequences and likelihood scoring
No modality tags are used. Pass raw DNA, RNA, protein sequences, or paired text descriptions directly to the tokenizer.
import torch
import torch.nn.functional as F
sequence = "ATGGCATGCGTTACAGGTCAAGT"
inputs = tokenizer(sequence, return_tensors="pt").to(model.device)
with torch.inference_mode():
logits = model(**inputs).logits
shift_logits = logits[:, :-1, :]
shift_labels = inputs["input_ids"][:, 1:]
log_probs = F.log_softmax(shift_logits, dim=-1)
token_log_probs = log_probs.gather(-1, shift_labels.unsqueeze(-1)).squeeze(-1)
print("Total log-likelihood:", token_log_probs.sum().item())
To continue a raw DNA or protein sequence without closing the sequence word run first, use encode_sequence_continuation:
prompt_ids = tokenizer.encode_sequence_continuation("ATGGCATGCGTTACAGGTCAAGT")
input_ids = torch.tensor([prompt_ids], device=model.device)
with torch.inference_mode():
generated = model.generate(input_ids, max_new_tokens=64, temperature=0.8)
print(tokenizer.decode(generated[0], skip_special_tokens=True))
High-throughput inference engine
Because Wall Attention uses learned forget gates instead of standard positional encodings, this repository bundles Recension's batched inference engine in engine/. It provides:
- Paged 64-position block KV cache with keys pre-scaled to each block anchor
- Fused Triton CUDA kernels for paged prefill and split-K decode
- CUDA graph capture and replay for decode steps
- Continuous batching with chunked prefill and automatic prefix and prompt-score caching
- OpenAI-compatible HTTP endpoints (
/v1/models,/v1/chat/completions,/v1/completions) with streaming,logprobs, andecho - Constrained generation for tool calls, internal-coordinate protein structures, gene panels, and DNA continuation with token healing
Install and serve
pip install "git+https://huggingface.co/Recension/Coatl-1#subdirectory=engine"
coatl-serve Recension/Coatl-1 --port 8090
Or from a local download of this repository:
pip install ./engine
coatl-serve . --port 8090
Query with the OpenAI client
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8090/v1", api_key="unused")
response = client.chat.completions.create(
model="Recension/Coatl-1",
messages=[{"role": "user", "content": "What motif binds iron-sulfur clusters in Glrx5?"}],
max_tokens=512,
temperature=0.6,
)
print(response.choices[0].message.content)
See engine/README.md for all server flags and domain-specific request options (structure, genes, continue_dna, dna_only, heal, max_reasoning_tokens).
Benchmarks
All results below are measured on the final Coatl-1 release checkpoint.
Protein structure and fitness
- FoldingBench: 0.433
- Text-to-protein conditioning: organism and family lower bits per residue from 1.190 to 1.152
- Protein generation from descriptions: 67.0% reach 30% identity
| Benchmark | Metric | Coatl-1 | ESM2 3B | ProGen3 3B | RITA XL |
|---|---|---|---|---|---|
| ProteinGym substitutions | Spearman | 0.319 | 0.406 | 0.392 | 0.373 |
| ProteinGym indels | Spearman | 0.329 | 0.443 | 0.464 | 0.449 |
| ProteinGym clinical substitutions | AUC | 0.786 | 0.880 | 0.870 | 0.859 |
| ProteinGym clinical indels | AUC | 0.856 | 0.905 | 0.915 | 0.916 |
DNA and RNA
- Promoter tissue expression: Spearman 0.551 across promoters and 0.229 across tissues
- Transcript text conditioning: taxonomy and family lower bits per base from 1.237 to 1.231
| Benchmark | Metric | Coatl-1 | Carbon 3B | GENERator-v2 3B | Evo 2 7B | Carbon-X 14B |
|---|---|---|---|---|---|---|
| ClinVar coding SNV | AUROC | 0.916 | 0.951 | 0.875 | 0.942 | 0.898 |
| ClinVar coding non-SNV | AUROC | 0.901 | 0.919 | 0.938 | 0.896 | 0.915 |
| ClinVar noncoding SNV | AUROC | 0.951 | 0.915 | 0.885 | 0.976 | 0.934 |
| ClinVar noncoding non-SNV | AUROC | 0.921 | 0.928 | 0.942 | 0.933 | 0.857 |
| BRCA1 | AUROC | 0.813 | 0.820 | 0.831 | 0.87 | 0.812 |
| BRCA2 | AUROC | 0.819 | 0.846 | 0.819 | 0.835 | 0.826 |
| TraitGym Mendelian | AUPRC | 0.176 | 0.337 | 0.279 | 0.385 | 0.202 |
| TraitGym complex | AUPRC | 0.103 | 0.118 | 0.127 | 0.118 | 0.105 |
| RNAGym | Spearman (mean of 3 RNA types) | 0.151 | 0.098 | 0.110 | 0.190 | 0.150 |
| Sequence recovery | Next 30 bases | 0.428 | 0.615 | 0.586 | 0.599 | 0.544 |
| Genome-NIAH 98 kbp | Exact match | 0.70 | 0.73 | 0.74 | 0.97 | - |
| Genome-NIAH 196 kbp | Exact match | 0.67 | 0.90 | - | 0.95 | - |
| Genome-NIAH 393 kbp | Exact match | 0.66 | 0.79 | - | 0.80 | - |
Virtual cell (gene properties and single-cell clustering)
Gene property tasks fit a linear classifier over Coatl-1's averaged internal state from coding sequences or text descriptions (no task-specific model fine-tuning). Single-cell tasks cluster unlabeled gene count profiles directly from internal representations.
| Benchmark | Metric | Coatl-1 | Geneformer | GenePT |
|---|---|---|---|---|
| Dosage sensitivity | ROC-AUC | 0.985 | 0.91 | 0.89 |
| Bivalent vs. Lys4-only | ROC-AUC | 0.948 | 0.88 | 0.94 |
| Bivalent vs. no methylation | ROC-AUC | 0.946 | 0.93 | 0.91 |
| TF regulatory range | ROC-AUC | 0.665 | 0.74 | 0.73 |
| Gene-gene interaction | ROC-AUC | 0.825 | - | 0.82 |
| Dataset | Metric | Coatl-1 | Geneformer | scGPT | scVI | HVG |
|---|---|---|---|---|---|---|
| PBMC 12k | AvgBIO | 0.76 | 0.59 | 0.78 | 0.74 | 0.63 |
| Pancreas | AvgBIO | 0.44 | 0.24 | 0.44 | 0.80 | 0.68 |
| Immune (8,000 cells) | AvgBIO | 0.45 | 0.35 | 0.51 | 0.53 | 0.53 |
General language, reasoning, long context, and tool use
| Benchmark | Metric | Coatl-1 | Llama 3.2 3B | Ministral 3 3B | SmolLM3 3B |
|---|---|---|---|---|---|
| MMLU | Accuracy, 5-shot base model | 39.7 | 58 | 70.7 | 61.38 |
| MMLU-Pro | Accuracy, 5-shot CoT, reasoning | 20.3 | 25.99 | 35.72 | 52.90 |
| GSM8K | Accuracy, 5-shot base model | 19.6 | 26.69 | 71.87 | 67.63 |
| MATH-500 | Accuracy, reasoning | 19.0 | 49.20 | 84.60 | 81.20 |
| IFEval | Prompt accuracy, strict | 60.1 | 71.53 | 56.19 | 71.2 |
| RULER 128K | Mean of 13 tasks, base model | 58.08 | 66.74 | 73.42 | 58.04 |
| tau2-bench | pass^1, mean of 3 domains | 17.0 | 14.8 | 27.5 | - |
| BFCL v4 | Overall accuracy | 21.58 | 21.95 | 30.89 | 18.94 |
License
Coatl-1 weights, model code, tokenizer code, and the bundled inference engine are released under the Apache License 2.0. See NOTICE for third-party attributions.