--- language: - tr license: mit library_name: sentence-transformers pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - semantic-search - information-retrieval - turkish - matryoshka-embeddings - variable-dimensions - hard-negatives - mrl datasets: - GoktugD/DUSUNEN-HardNegatives-50K-v1 base_model: intfloat/multilingual-e5-base model-index: - name: DUSUNEN Atlas 278M v1 results: - task: type: sentence-similarity name: Held-out hard-negative triplet discrimination dataset: type: GoktugD/DUSUNEN-HardNegatives-50K-v1 name: DUSUNEN hard-negative validation split: validation metrics: - type: accuracy value: 0.9475 name: Triplet accuracy at 128 dimensions --- # DUSUNEN Atlas 278M v1 **One Turkish retrieval model, six useful embedding sizes.** This model adapts `intfloat/multilingual-e5-base` with Matryoshka Representation Learning on 50,000 curated Turkish hard-negative triplets. Applications can select 768, 512, 384, 256, 128, or 64 dimensions at inference time without training or storing a second model. The practical target is a smaller vector index: 128-dimensional float32 vectors use **83.3% less storage** than 768-dimensional vectors, while improving held-out hard-negative triplet accuracy from 92.65% to 94.75% over the truncated base model. ## Measured dimension sweep All rows use the same 2,000-example held-out validation split and cosine similarity. The base and fine-tuned model were evaluated with identical E5 query/passage prefixes. | Dimensions | Base accuracy | Atlas accuracy | Gain | Float32 bytes/vector | Index reduction | |---:|---:|---:|---:|---:|---:| | 768 | 95.25% | **95.50%** | +0.25 pp | 3,072 | 0% | | 512 | 95.30% | **95.65%** | +0.35 pp | 2,048 | 33.3% | | 384 | 95.05% | **95.35%** | +0.30 pp | 1,536 | 50.0% | | 256 | 94.15% | **95.00%** | +0.85 pp | 1,024 | 66.7% | | 128 | 92.65% | **94.75%** | +2.10 pp | 512 | 83.3% | | 64 | 88.75% | **92.50%** | +3.75 pp | 256 | 91.7% | These are held-out in-domain triplet results, not a claim of state of the art. Broader Turkish MTEB evaluation is planned. Machine-readable results are in `dimension-sweep.json`. ## Usage ```python from sentence_transformers import SentenceTransformer model = SentenceTransformer( "GoktugD/DUSUNEN-Atlas-278M-v1", truncate_dim=128, ) queries = ["query: Türkiye'nin başkenti neresidir?"] passages = [ "passage: Türkiye'nin başkenti Ankara'dır.", "passage: İstanbul Türkiye'nin en kalabalık şehridir.", ] query_embeddings = model.encode(queries, normalize_embeddings=True) passage_embeddings = model.encode(passages, normalize_embeddings=True) scores = query_embeddings @ passage_embeddings.T print(scores) ``` Use the `query: ` prefix for queries and `passage: ` for documents. Apply the same `truncate_dim` to both sides. Recommended operating points: - **128 dimensions:** best storage/quality balance for large indexes. - **256 dimensions:** conservative production default. - **768 dimensions:** maximum measured held-out accuracy. - **64 dimensions:** extremely compact indexes and edge experiments. ## Training - Base revision: `d128750597153bb5987e10b1c3493a34e5a4502a` - Data: 50,000 training and 2,000 held-out Turkish hard-negative triplets - Loss: cached multiple-negatives ranking loss wrapped by Matryoshka loss - Dimensions: 768, 512, 384, 256, 128, 64 - Effective batch size: 64 - Sequence length: 256 - Epochs: 1 - Precision: bfloat16 - Seed: 3407 - Hardware: one NVIDIA GeForce RTX 3090 24 GB - Training time: 2,039 seconds - Peak memory allocated by the training process: 2.475 GiB Exact hyperparameters are available in `training_config.yaml`; the recorded environment is in `training_environment.json`. ## Limitations - Evaluation here is limited to an in-domain held-out hard-negative split. - Training data is Turkish retrieval data; quality on other languages may differ from the multilingual base model. - Prefix-free encoding was not evaluated. - Similarity thresholds should be calibrated for each application. ## Reproducibility and integrity The published `model.safetensors` SHA-256 is: `66c65d4109a646d3f8a6dc6c19b20efda4d9c5ed9cd5054386812da0d6b263dd` Developed and released by [Göktuğ Düşünen](https://huggingface.co/GoktugD).