Instructions to use jxm/cde-small-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use jxm/cde-small-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jxm/cde-small-v2", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use jxm/cde-small-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="jxm/cde-small-v2", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jxm/cde-small-v2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Set base_model & tags metadata
Hello!
Preface
Congratulations on this release! I think this is extremely promising work, and I'm glad to see that our ModernBERT checkpoint and architecture are being put to good work here!
Pull Request overview
- Set base_model & tags metadata
Details
This should let HF automatically create some nice links across models, and make it easier to find this model when searching for modernbert-tagged models. For context, the modernbert tag is normally automatically included on the HF side, but due to the custom nature of this model, HF won't be able to read that this is based on the ModernBERT architecture.
- Tom Aarsen
yes, def useful if modernbert can be written on the model card too.
I knew from Twitter this was built on modernbert and then got confused when I didn't see it on the model card.