Sentence Similarity
sentence-transformers
Safetensors
English
ultrabert
feature-extraction
mteb
long-context
custom_code
Eval Results (legacy)
Instructions to use PhysShell/UltraBERT-Embed-150M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use PhysShell/UltraBERT-Embed-150M with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("PhysShell/UltraBERT-Embed-150M", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
File size: 1,734 Bytes
be5c0e2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | {
"architectures": [
"UltrabertModel"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attention_windows": [
128,
128,
null,
128,
128,
null,
128,
128,
null,
128,
128,
null,
128,
128,
null,
128,
128,
null,
128,
128,
null,
128,
128,
null
],
"auto_map": {
"AutoConfig": "configuration_ultrabert.UltrabertConfig",
"AutoModel": "modeling_ultrabert.UltrabertModel",
"AutoModelForMaskedLM": "modeling_ultrabert.UltrabertForMaskedLM",
"AutoModelForQuestionAnswering": "modeling_ultrabert.UltrabertForQuestionAnswering",
"AutoModelForSequenceClassification": "modeling_ultrabert.UltrabertForSequenceClassification",
"AutoModelForTokenClassification": "modeling_ultrabert.UltrabertForTokenClassification"
},
"bos_token_id": 0,
"classifier_dropout": 0.0,
"dtype": "float32",
"eos_token_id": 0,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 768,
"initializer_range": 0.02,
"intermediate_size": 1024,
"mlp_bias": false,
"model_type": "ultrabert",
"num_attention_heads": 6,
"num_hidden_layers": 24,
"num_key_value_heads": 6,
"pad_token_id": 0,
"prediction_head_size": 768,
"rms_norm_eps": 1e-06,
"rope_theta": [
10000.0,
10000.0,
2560000.0,
10000.0,
10000.0,
2560000.0,
10000.0,
10000.0,
2560000.0,
10000.0,
10000.0,
2560000.0,
10000.0,
10000.0,
2560000.0,
10000.0,
10000.0,
2560000.0,
10000.0,
10000.0,
2560000.0,
10000.0,
10000.0,
2560000.0
],
"tie_word_embeddings": false,
"transformers_version": "5.16.1",
"use_cache": false,
"vocab_size": 49152
}
|