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
Download config.json from PhysShell/UltraBERT-Embed-150M: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/PhysShell/UltraBERT-Embed-150M/resolve/main/config.json
- Command line
-
hf download hf://PhysShell/UltraBERT-Embed-150M/config.json
-
curl -L -o config.json https://huggingface.co/PhysShell/UltraBERT-Embed-150M/resolve/main/config.json
1.73 kB
| { | |
| "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 | |
| } | |