Sentence Similarity
Safetensors
sentence-transformers
Turkish
PyLate
bert_hash
ColBERT
feature-extraction
Generated from Trainer
dataset_size:910904
loss:Contrastive
custom_code
Instructions to use newmindai/colbert-hash-pico-tr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use newmindai/colbert-hash-pico-tr with sentence-transformers:
from pylate import models queries = [ "Which planet is known as the Red Planet?", "What is the largest planet in our solar system?", ] documents = [ ["Mars is the Red Planet.", "Venus is Earth's twin."], ["Jupiter is the largest planet.", "Saturn has rings."], ] model = models.ColBERT(model_name_or_path="newmindai/colbert-hash-pico-tr") queries_emb = model.encode(queries, is_query=True) docs_emb = model.encode(documents, is_query=False) - Notebooks
- Google Colab
- Kaggle
Download configuration_bert_hash.py from newmindai/colbert-hash-pico-tr: direct link, hf CLI and curl.
- Browser
- Download file 340 Bytes
-
https://huggingface.co/newmindai/colbert-hash-pico-tr/resolve/main/configuration_bert_hash.py
- Command line
-
hf download hf://newmindai/colbert-hash-pico-tr/configuration_bert_hash.py
-
curl -L -o configuration_bert_hash.py https://huggingface.co/newmindai/colbert-hash-pico-tr/resolve/main/configuration_bert_hash.py
340 Bytes
| from transformers.models.bert.configuration_bert import BertConfig | |
| class BertHashConfig(BertConfig): | |
| """ | |
| Extension of Bert configuration to add projections parameter. | |
| """ | |
| model_type = "bert_hash" | |
| def __init__(self, projections=5, **kwargs): | |
| super().__init__(**kwargs) | |
| self.projections = projections | |