Downloads · 30 days
9
41% of all-time downloads
momeaicrypto/ModernBERT-base-MoME-v0
ModernBERT-base-MoME-v0 is a machine learning model from momeaicrypto. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a specialized variant of ModernBERT-base designed for Mixture of Multichain Experts (MoME) routing tasks, particularly focusing on determining which blockchain or chain expert (e.g., Aptos, Ripple, Polkadot, C…
Downloads · 30 days
9
41% of all-time downloads
All-time downloads
22
Public
Parameters
149M
2.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.onnx1.9 GB · 76%
From the Hugging Face model README
This is a specialized variant of ModernBERT-base designed for Mixture of Multichain Experts (MoME) routing tasks, particularly focusing on determining which blockchain or chain expert (e.g., Aptos, Ripple, Polkadot, Crust) should handle an incoming transaction or query. It retains the core architectural and performance benefits of ModernBERT, while integrating custom training on chain classification data.
ModernBERT-base-MoME-v0 is an encoder-only model (BERT-style) derived from ModernBERT-base. The original ModernBERT was trained on a large corpus of text and code (2T tokens), supporting context lengths of up to 8,192 tokens. Key enhancements include:
ModernBERT-base-MoME-v0 extends these capabilities with a fine-tuned head specialized in routing transactions or queries to the correct “chain expert” in a Mixture of Experts (MoME) system. By integrating specialized training data for chain classification (e.g., Polkadot, Aptos, Ripple, Crust), the model can better determine which chain is relevant for a given transaction payload.
You can load ModernBERT-base-MoME-v0 using Hugging Face Transformers. The steps are largely identical to standard BERT usage, with two key notes:
pip install -U transformers>=4.48.0
pip install flash-attn # optional but recommended if supported by your GPU
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "momeaicrypto/ModernBERT-base-MoME-v0"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
# Sample transaction or query
text = "Transaction: {\"action\": \"transfer\", \"chain\": \"polkadot\", ...}"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
# The logits from outputs.logits will indicate which chain this transaction likely belongs to.
print("Logits:", outputs.logits)
predicted_label = outputs.logits.argmax(dim=-1).item()
print("Predicted chain ID:", predicted_label)
Note: If you want to adapt the model to a different classification scheme (e.g., additional chains), you can fine-tune via standard BERT classification recipes.
The base ModernBERT architecture has been shown to outperform or match other leading encoder-only models across GLUE, BEIR, MLDR, CodeSearchNet, and StackQA. For ModernBERT-base-MoME-v0, we specifically evaluate:
See the parent ModernBERT evaluation results for a broad performance context:
| Model | IR (DPR) BEIR | IR (ColBERT) BEIR | NLU (GLUE) | Code (CSN) |
|---|---|---|---|---|
| BERT | 38.9 | 49.0 | 84.7 | 41.2 |
| RoBERTa | 37.7 | 48.7 | 86.4 | 44.3 |
| ModernBERT | 41.6 | 51.3 | 88.4 | 56.4 |
ModernBERT-base-MoME-v0 maintains the same strong backbone while adding chain-routing capabilities.
This model inherits the Apache 2.0 license from ModernBERT.
If you use ModernBERT-base-MoME-v0 in your work, please cite the original ModernBERT:
@misc{modernbert,
title={Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference},
author={Benjamin Warner and Antoine Chaffin and Benjamin Clavié and Orion Weller and Oskar Hallström and Said Taghadouini and Alexis Gallagher and Raja Biswas and Faisal Ladhak and Tom Aarsen and Nathan Cooper and Griffin Adams and Jeremy Howard and Iacopo Poli},
year={2024},
eprint={2412.13663},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2412.13663},
}
Additional references for the MoME (Mixture of Multichain Experts) concept should be included if relevant.