CoolFace
Modelpublic

shadowlilac/omniembed-merged

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes17downloads
Model Card

SentenceTransformer

This is a sentence-transformers model trained. It maps sentences & paragraphs to a 1536-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.

Model Details

Model Description

  • —Model Type: Sentence Transformer <!-- - Base model: Unknown -->
  • —Maximum Sequence Length: 1000000000000000019884624838656 tokens
  • —Output Dimensionality: 1536 dimensions
  • —Similarity Function: Cosine Similarity
  • —Supported Modalities: Text, Image, Audio, Video, Message <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}, 'image': {'method': 'forward', 'method_output_name': 'last_hidden_state'}, 'audio': {'method': 'forward', 'method_output_name': 'last_hidden_state'}, 'video': {'method': 'forward', 'method_output_name': 'last_hidden_state'}, 'message': {'method': 'forward', 'method_output_name': 'last_hidden_state', 'format': 'structured'}}, 'module_output_name': 'token_embeddings', 'architecture': 'Gemma4Model'})
  (1): MultiheadAttentionPooling({'hidden_size': 1536, 'num_attention_heads': 16, 'intermediate_size': 6144, 'layer_norm_eps': 1e-06})
  (2): Normalize({})
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

bash
pip install -U sentence-transformers

Then you can load this model and run inference.

python
from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("shadowlilac/omniembed-merged")
# Run inference
queries = [
    'Which planet is known as the Red Planet?',
]
documents = [
    "Venus is often called Earth's twin because of its similar size and proximity.",
    'Mars, known for its reddish appearance, is often referred to as the Red Planet.',
    'Saturn, famous for its rings, is sometimes mistaken for the Red Planet.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 1536] [3, 1536]

# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[0.3457, 0.8750, 0.6484]], dtype=torch.bfloat16)

<!--

Direct Usage (Transformers)

<details><summary>Click to see the direct usage in Transformers</summary>

</details> -->

<!--

Downstream Usage (Sentence Transformers)

You can finetune this model on your own dataset.

<details><summary>Click to expand</summary>

</details> -->

<!--

Out-of-Scope Use

List how the model may foreseeably be misused and address what users ought not to do with the model. -->

Evaluation

Metrics

Information Retrieval
MetricValue
cosine_accuracy@10.7602
cosine_accuracy@30.8358
cosine_accuracy@50.8486
cosine_accuracy@100.8591
cosine_precision@10.7602
cosine_precision@30.2786
cosine_precision@50.1697
cosine_precision@100.0859
cosine_recall@10.7602
cosine_recall@30.8358
cosine_recall@50.8486
cosine_recall@100.8591
cosine_ndcg@100.8143
cosine_mrr@100.7995
cosine_map@1000.8019

<!--

Bias, Risks and Limitations

What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->

<!--

Recommendations

What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->

Training Details

Training Logs

EpochStepcosine_ndcg@10
-1-10.8143

Framework Versions

  • —Python: 3.12.13
  • —Sentence Transformers: 5.7.0
  • —Transformers: 5.14.1
  • —PyTorch: 2.13.0+cu130
  • —Accelerate: 1.14.0
  • —Datasets: 5.0.1
  • —Tokenizers: 0.22.2

Additional Resources

Citation

BibTeX

<!--

Glossary

Clearly define terms in order to be accessible across audiences. -->

<!--

Model Card Authors

Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->

<!--

Model Card Contact

Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->