CoolFace
Modelpublic

avemio/German-RAG-UAE-LARGE-V1-TRIPLES-MERGED-HESSIAN-AI

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes95downloads
Model Card

German-RAG-UAE-LARGE-V1-TRIPLES-MERGED-HESSIAN-AI

This is a sentence-transformers model trained on this Dataset with roughly 300k Triple-Samples. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. It was merged with the Base-Model WhereIsAI/UAE-Large-V1 again to maintain performance on other languages again.

Model Details

Model Description

  • —Model Type: Sentence Transformer <!-- - Base model: Unknown -->
  • —Maximum Sequence Length: 512 tokens
  • —Output Dimensionality: 1024 tokens
  • —Similarity Function: Cosine Similarity <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
  (2): Normalize()
)

Evaluation MTEB-Tasks

Classification

  • —AmazonCounterfactualClassification
  • —AmazonReviewsClassification
  • —MassiveIntentClassification
  • —MassiveScenarioClassification
  • —MTOPDomainClassification
  • —MTOPIntentClassification

Pair Classification

  • —FalseFriendsGermanEnglish
  • —PawsXPairClassification

Retrieval

  • —GermanQuAD-Retrieval
  • —GermanDPR

STS (Semantic Textual Similarity)

  • —GermanSTSBenchmark
TASK[UAE](https://huggingface.co/WhereIsAI/UAE-Large-V1/)[German-RAG-UAE](https://huggingface.co/avemio/German-RAG-UAE-LARGE-V1-TRIPLES-HESSIAN-AI/)Merged-UAEGerman-RAG vs. UAEMerged vs. UAE
AmazonCounterfactualClassification0.56500.54490.5401-2.01%-2.48%
AmazonReviewsClassification0.27380.27450.27820.08%0.44%
FalseFriendsGermanEnglish0.48080.47770.4703-0.32%-1.05%
GermanQuAD-Retrieval0.78110.83530.86285.42%8.18%
GermanSTSBenchmark0.64210.65680.67541.47%3.33%
MassiveIntentClassification0.51390.48840.4714-2.55%-4.25%
MassiveScenarioClassification0.60620.58370.6111-2.25%0.49%
GermanDPR0.67500.72100.75074.60%7.57%
MTOPDomainClassification0.76250.74500.7686-1.75%0.61%
MTOPIntentClassification0.49940.45160.4413-4.77%-5.80%
PawsXPairClassification0.54520.50770.5162-3.76%-2.90%

Evaluation on German-RAG-EMBEDDING-BENCHMARK

Accuracy is calculated by evaluating if the relevant context is the highest ranking embedding of the whole context array. See Eval-Dataset and Evaluation Code here

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("avemio-digital/UAE-Large-V1_Triples_Merged_with_base")
# Run inference
sentences = [
    'The weather is lovely today.',
    "It's so sunny outside!",
    'He drove to the stadium.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

<!--

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. -->

<!--

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

Framework Versions

  • —Python: 3.10.12
  • —Sentence Transformers: 3.2.1
  • —Transformers: 4.44.2
  • —PyTorch: 2.5.0+cu121
  • —Accelerate: 0.34.2
  • —Datasets: 2.19.0
  • —Tokenizers: 0.19.1

Citation

@article{li2023angle,
  title={AnglE-optimized Text Embeddings},
  author={Li, Xianming and Li, Jing},
  journal={arXiv preprint arXiv:2309.12871},
  year={2023}
}

The German-RAG AI Team

Marcel Rosiak Soumya Paul Siavash Mollaebrahim Zain ul Haq