Kiel-2-Vector / README.md
kiel2's picture
Update README.md
331d63c verified
|
Raw History Blame Contribute Delete
4.13 kB
metadata
tags:
  - sentence-transformers
  - sentence-similarity
  - feature-extraction
  - dense
base_model: BAAI/bge-small-en-v1.5
widget:
  - source_sentence: Name a style of hot yoga.
    sentences:
      - Bikram.
      - Tallahassee is the capital of Florida
      - I want a redhead woman with tattoos and big boobs and a big ass
  - source_sentence: What is Orchesis - either professional or amateur
    sentences:
      - Art of Dancing
      - The Price Brothers and Company
      - Steve Jobs. Because of his invention.
  - source_sentence: What is the tiny piece at the end of a shoelace called?
    sentences:
      - Sinking Sand is most commonly known as Quicksand.
      - I would give the MVP award to Nikola Jokic.
      - An Aglet.
  - source_sentence: Who was given Stockholm Water Prize 2022 ?
    sentences:
      - Prof.Wilfried Brutsaert
      - Kingfisher
      - If you have 3 dimes, you have 30 cents.
  - source_sentence: How often is The Australian Chess Championship held?
    sentences:
      - Every two years
      - UC Berkeley; UCLA
      - >-
        Remove the - character and restore the split words in the markdown
        content.
pipeline_tag: sentence-similarity
library_name: sentence-transformers

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

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)},
}