Sentence Similarity
sentence-transformers
Safetensors
Rust
English
modernbert
feature-extraction
code-search
code
python
java
javascript
php
ruby
go
mteb
text-embeddings-inference
Instructions to use Shuu12121/CodeSearch-ModernBERT-Crow-Plus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Shuu12121/CodeSearch-ModernBERT-Crow-Plus with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Shuu12121/CodeSearch-ModernBERT-Crow-Plus") 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] - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "ModernBertModel" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 50000, | |
| "classifier_activation": "gelu", | |
| "classifier_bias": false, | |
| "classifier_dropout": 0.0, | |
| "classifier_pooling": "cls", | |
| "cls_token_id": 50281, | |
| "decoder_bias": true, | |
| "deterministic_flash_attn": false, | |
| "embedding_dropout": 0.0, | |
| "eos_token_id": 50001, | |
| "global_attn_every_n_layers": 3, | |
| "global_rope_theta": 160000.0, | |
| "hidden_activation": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "initializer_cutoff_factor": 2.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "local_attention": 128, | |
| "local_attention_rope_theta": 10000, | |
| "local_attention_window": 128, | |
| "local_rope_theta": 10000.0, | |
| "max_position_embeddings": 8192, | |
| "mlp_bias": false, | |
| "mlp_dropout": 0.0, | |
| "model_type": "modernbert", | |
| "norm_bias": false, | |
| "norm_eps": 1e-05, | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 0, | |
| "repad_logits_with_grad": false, | |
| "rope_theta": 160000, | |
| "sep_token_id": 50282, | |
| "sparse_pred_ignore_index": -100, | |
| "sparse_prediction": false, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.51.3", | |
| "type_vocab_size": 2, | |
| "vocab_size": 50004 | |
| } | |