Synthyra / ANKH3_xl

huggingface.co
Total runs: 117
24-hour runs: 4
7-day runs: 5
30-day runs: -21
Model's Last Updated: August 27 2026
fill-mask

Introduction of ANKH3_xl

Model Details of ANKH3_xl

FastANKH

Fast, optimized implementations of ANKH protein language models (T5-based) with multi-backend attention support.

Requires PyTorch 2.11+ for Flash Attention 4 (FA4) backend support via flex attention.

Models
Model Params Layers Hidden Heads Activation Source
ANKH_base 453.3M 48 768 12 gelu_new ElnaggarLab/ankh-base
ANKH_large 1.15B 48 1536 16 gelu_new ElnaggarLab/ankh-large
ANKH2_large 1.15B 24 1536 16 silu ElnaggarLab/ankh2-ext2
ANKH3_large 1.15B 48 1536 16 silu ElnaggarLab/ankh3-large
ANKH3_xl 3.49B 48 2560 32 silu ElnaggarLab/ankh3-xl
Usage
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("Synthyra/ANKH_base", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("Synthyra/ANKH_base")

# Set attention backend before loading for best performance
# Options: "sdpa" (default, exact), "flex" (FA4 on Hopper/Blackwell)
model.config.attn_backend = "flex"

sequences = ["MKTLLILAVL", "ACDEFGHIKLMNPQRSTVWY"]
inputs = tokenizer(sequences, return_tensors="pt", padding=True)
outputs = model(**inputs)

# Per-residue embeddings
embeddings = outputs.last_hidden_state  # (batch, seq_len, hidden_dim)
Batch Embedding
model = AutoModel.from_pretrained("Synthyra/ANKH_base", trust_remote_code=True).to("cuda")
embeddings = model.embed_dataset(
    sequences=["MKTLLILAVL", "ACDEFGHIKLMNPQRSTVWY"],
    batch_size=8,
    max_len=512,
    full_embeddings=True,
)
Attention Backends
Backend Key Notes
SDPA "sdpa" Default. Exact attention with position bias as additive mask.
Flex "flex" Uses FA4 on Hopper/Blackwell GPUs (PyTorch 2.11+). Position bias computed via score_mod . Triton fallback on older hardware.
Flash "kernels_flash" Not supported for ANKH (no arbitrary bias support). Falls back to flex/sdpa.
Architecture

ANKH models are T5 encoder-only architectures:

  • No absolute position embeddings : Uses T5-style relative position bias (log-bucketed, bidirectional)
  • RMS LayerNorm : No mean subtraction, no bias term
  • Gated FFN : activation(wi_0(x)) * wi_1(x) -> wo(x) with gelu_new (v1) or silu (v2/v3)
  • Pre-layer normalization : Norm before attention and FFN, residual after
  • No bias in projections : All q/k/v/o and FFN linear layers are bias=False

The relative position bias is computed once (materialized as a full tensor) and shared across all encoder layers. For the flex backend, the bias is passed as a score_mod closure for optimal performance.

Notes
  • The FastAnkhForMaskedLM variant includes an LM head initialized from the shared embedding weights. The original ANKH models were trained with T5's span corruption objective using an encoder-decoder architecture. This encoder-only MaskedLM head is not pre-trained for standard MLM and requires additional fine-tuning.
  • ANKH3 models use a vocabulary of 256 tokens (vs 144 for v1/v2) and were trained with dual objectives ([NLU] for embeddings, [S2S] for generation).
Citations
@article{elnaggar2023ankh,
  title={Ankh: Optimized Protein Language Model Unlocks General-Purpose Modelling},
  author={Elnaggar, Ahmed and Essam, Hazem and Salah-Eldin, Wafaa and Moustafa, Walid and Elkerdawy, Mohamed and Rochereau, Charlotte and Rost, Burkhard},
  journal={arXiv preprint arXiv:2301.06568},
  year={2023}
}
@article{alsamkary2025ankh3,
  title={Ankh3: Multi-Task Pretraining with Sequence Denoising and Completion Enhances Protein Representations},
  author={Alsamkary, Hazem and Elshaffei, Mohamed and Elkerdawy, Mohamed and Elnaggar, Ahmed},
  journal={arXiv preprint arXiv:2505.20052},
  year={2025}
}
@misc{FastPLMs,
  author={Hallee, Logan and Bichara, David and Gleghorn, Jason P.},
  title={FastPLMs: Fast, efficient, protein language model inference from Huggingface AutoModel.},
  year={2024},
  url={https://huggingface.co/Synthyra/ESMplusplus_small},
  DOI={10.57967/hf/3726},
  publisher={Hugging Face}
}
@article{dong2024flexattention,
  title={Flex Attention: A Programming Model for Generating Optimized Attention Kernels},
  author={Dong, Juechu and Feng, Boyuan and Guessous, Driss and Liang, Yanbo and He, Horace},
  journal={arXiv preprint arXiv:2412.05496},
  year={2024}
}
@inproceedings{paszke2019pytorch,
  title={PyTorch: An Imperative Style, High-Performance Deep Learning Library},
  author={Paszke, Adam and Gross, Sam and Massa, Francisco and Lerer, Adam and Bradbury, James and Chanan, Gregory and Killeen, Trevor and Lin, Zeming and Gimelshein, Natalia and Antiga, Luca and Desmaison, Alban and K{\"o}pf, Andreas and Yang, Edward and DeVito, Zach and Raison, Martin and Tejani, Alykhan and Chilamkurthy, Sasank and Steiner, Benoit and Fang, Lu and Bai, Junjie and Chintala, Soumith},
  booktitle={Advances in Neural Information Processing Systems 32},
  year={2019}
}

Runs of Synthyra ANKH3_xl on huggingface.co

117
Total runs
4
24-hour runs
6
3-day runs
5
7-day runs
-21
30-day runs

More Information About ANKH3_xl huggingface.co Model

ANKH3_xl huggingface.co

ANKH3_xl huggingface.co is an AI model on huggingface.co that provides ANKH3_xl's model effect (), which can be used instantly with this Synthyra ANKH3_xl model. huggingface.co supports a free trial of the ANKH3_xl model, and also provides paid use of the ANKH3_xl. Support call ANKH3_xl model through api, including Node.js, Python, http.

Synthyra ANKH3_xl online free

ANKH3_xl huggingface.co is an online trial and call api platform, which integrates ANKH3_xl's modeling effects, including api services, and provides a free online trial of ANKH3_xl, you can try ANKH3_xl online for free by clicking the link below.

Synthyra ANKH3_xl online free url in huggingface.co:

https://huggingface.co/Synthyra/ANKH3_xl

ANKH3_xl install

ANKH3_xl is an open source model from GitHub that offers a free installation service, and any user can find ANKH3_xl on GitHub to install. At the same time, huggingface.co provides the effect of ANKH3_xl install, users can directly use ANKH3_xl installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

ANKH3_xl install url in huggingface.co:

https://huggingface.co/Synthyra/ANKH3_xl

Url of ANKH3_xl

ANKH3_xl huggingface.co Url

Provider of ANKH3_xl huggingface.co

Synthyra
ORGANIZATIONS

Other API from Synthyra

huggingface.co

Total runs: 39.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 15 2025
huggingface.co

Total runs: 2.6K
Run Growth: 1.2K
Growth Rate: 48.67%
Updated:July 25 2026
huggingface.co

Total runs: 1.2K
Run Growth: 1.2K
Growth Rate: 97.51%
Updated:April 21 2026
huggingface.co

Total runs: 539
Run Growth: 231
Growth Rate: 42.86%
Updated:February 25 2026
huggingface.co

Total runs: 515
Run Growth: 173
Growth Rate: 33.59%
Updated:March 13 2026
huggingface.co

Total runs: 229
Run Growth: 167
Growth Rate: 72.93%
Updated:August 27 2026
huggingface.co

Total runs: 141
Run Growth: -94
Growth Rate: -67.63%
Updated:August 27 2026
huggingface.co

Total runs: 135
Run Growth: -18
Growth Rate: -13.64%
Updated:August 27 2026
huggingface.co

Total runs: 135
Run Growth: 26
Growth Rate: 19.26%
Updated:August 27 2026
huggingface.co

Total runs: 118
Run Growth: -143
Growth Rate: -123.28%
Updated:August 27 2026
huggingface.co

Total runs: 82
Run Growth: -7
Growth Rate: -8.54%
Updated:August 27 2026
huggingface.co

Total runs: 71
Run Growth: -71
Growth Rate: -100.00%
Updated:August 27 2026
huggingface.co

Total runs: 70
Run Growth: -41
Growth Rate: -58.57%
Updated:August 27 2026
huggingface.co

Total runs: 49
Run Growth: -22
Growth Rate: -44.90%
Updated:August 27 2026
huggingface.co

Total runs: 31
Run Growth: 0
Growth Rate: 0.00%
Updated:November 09 2024
huggingface.co

Total runs: 30
Run Growth: -288
Growth Rate: -960.00%
Updated:August 27 2026
huggingface.co

Total runs: 25
Run Growth: 0
Growth Rate: 0.00%
Updated:November 15 2025
huggingface.co

Total runs: 21
Run Growth: -73
Growth Rate: -347.62%
Updated:August 27 2026
huggingface.co

Total runs: 3
Run Growth: -6
Growth Rate: -200.00%
Updated:November 21 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 09 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 22 2025