handsker-pretrained-300d
This is a GloVe model trained on the entirety of Danish Dynaword for 10 epochs converted into a sentence-transformers model with mean pooling. The model was trained using the GlovPy Python library. The model uses a Bert-style tokenizer that was also trained on Dynaword.
Model Details
Model Description
- Model Type: Sentence Transformer
- Maximum Sequence Length: 1000000 tokens
- Output Dimensionality: 300 dimensions
- Similarity Function: Cosine Similarity
- Supported Modality: Text
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): WordEmbeddings({'tokenizer_class': 'sentence_transformers.sentence_transformer.modules.tokenizer.whitespace.WhitespaceTokenizer', 'update_embeddings': False, 'max_seq_length': 1000000})
(1): Pooling({'embedding_dimension': 300, 'pooling_mode': 'mean', 'include_prompt': True})
)
Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("kardosdrur/handsker-pretrained-300d")
# 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, 300]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.6504, 0.7633],
# [0.6504, 1.0000, 0.5803],
# [0.7633, 0.5803, 1.0000]])
Training Details
Framework Versions
- Python: 3.14.7
- Sentence Transformers: 6.0.1
- Transformers: 5.16.1
- PyTorch: 2.14.0+cu130
- Accelerate:
- Datasets: 5.0.1
- Tokenizers: 0.23.2
Additional Resources
- Training and Finetuning Embedding Models with Sentence Transformers: the end-to-end guide for training or finetuning Sentence Transformer models.
- Introduction to Matryoshka Embedding Models: variable-size embeddings that can be truncated with minimal quality loss.
- Binary and Scalar Embedding Quantization for Significantly Faster & Cheaper Retrieval: post-training compression of embedding vectors.
- Multimodal Embedding & Reranker Models with Sentence Transformers: use text, image, audio, and video models through the same API.
- Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers: train multimodal embedding models, with a Visual Document Retrieval walkthrough.