--- license: openmdw-1.1 language: - de - en library_name: sentence-transformers pipeline_tag: sentence-similarity base_model: google/gemma-4-E2B-it base_model_relation: finetune tags: - sentence-transformers - feature-extraction - text-embeddings - german - late-interaction - mteb ---
**hyper3-embed-deu** is a German text embedding model from [hyper³labs](https://hyper3labs.com), fine-tuned from [Gemma 4 E2B](https://huggingface.co/google/gemma-4-E2B-it). A single bidirectional encoder produces **1,536-dimensional dense embeddings** for vector search, clustering, and classification, alongside **128-dimensional token vectors** for fused dense + MaxSim retrieval over long documents. | Property | Value | |---|---| | Parameters | 4.66B total (1.91B active transformer + heads; 2.75B embeddings) | | Dense output | 1,536 dimensions, L2-normalized, cosine similarity (4,096-token limit) | | Fused retrieval | 0.25 dense + 0.75 MaxSim, mixing full document (4,096 tok) and best 512-token window (stride 256) | | Weights | BF16 backbone, FP32 heads (~8.75 GiB GPU memory; ~9.43 GB download) | | Languages | German; English in cross-lingual pairs | ## Quick start ```bash pip install torch==2.14.0 transformers==5.17.0 sentence-transformers==6.1.0 \ huggingface_hub==1.33.0 safetensors==0.8.0 tokenizers==0.23.3 ``` ### Dense embeddings Use with any vector database (Qdrant, Milvus, pgvector) or for clustering, classification, and similarity: ```python from sentence_transformers import SentenceTransformer model = SentenceTransformer( "hyper3labs/hyper3-embed-deu", revision="v1", trust_remote_code=True, ) queries = ["Welche Unterlagen brauche ich für die Anmeldung einer Wohnung?"] documents = [ "Für die Anmeldung benötigen Sie einen Ausweis und die Wohnungsgeberbestätigung.", "Die Bibliothek ist montags bis freitags geöffnet.", ] q = model.encode_query(queries) d = model.encode_document(documents) print(model.similarity(q, d)) ``` Retrieval queries automatically receive a search instruction; documents use no prefix. For symmetric or classification tasks, pass `prompt_name="sts"`, `"clustering"`, `"classification"`, `"pair_classification"`, or a task name from [`config.json`](config.json). ### Fused long-document retrieval Score a candidate set using both the dense embedding and token-level MaxSim across overlapping 512-token windows: ```python scores = model[0].model.score_multivector(queries, documents, batch_size=8) print(scores.cpu().tolist()) ```