Kiel-2-Vector
Kiel-2-Vector is a dense embedding model based on BAAI/bge-small-en-v1.5. It maps inputs into a 384-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 / Dense Embedding Backbone
- Base Model: BAAI/bge-small-en-v1.5
- Maximum Sequence Length: 256 tokens
- Output Dimensionality: 384 dimensions
- Similarity Function: Cosine Similarity
- Supported Modality: Text
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face Hub: kiel2/Kiel-2-Vector
Full Model Architecture
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
(1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'mean', 'include_prompt': True})
(2): Normalize({'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
)
Direct Usage (Sentence Transformers)
First, install the Sentence Transformers library:
Bash
pip install -U sentence-transformers
Then load this model and run inference:
Python
from sentence_transformers import SentenceTransformer
# Load from the 🤗 Hub
model = SentenceTransformer("kiel2/Kiel-2-Vector")
# Run inference
sentences = [
'How often is The Australian Chess Championship held?',
'Every two years',
'Remove the - character and restore the split words in the markdown content.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
Citation
Code snippet
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "[https://arxiv.org/abs/1908.10084](https://arxiv.org/abs/1908.10084)",
}
@misc{oord2019representationlearningcontrastivepredictive,
title={Representation Learning with Contrastive Predictive Coding},
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
year={2019},
eprint={1807.03748},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={[https://arxiv.org/abs/1807.03748](https://arxiv.org/abs/1807.03748)},
}