Downloads · 30 days
73
16% of all-time downloads
thivy/embeddinggemma-300m-norwegian-health
embeddinggemma-300m-norwegian-health is a feature extraction model from thivy. Use it when you need embeddings to search or compare text. It is set up for sentence-transformers. The card lists the license as gemma.
This is a domain-adapted version of Google's EmbeddingGemma-300M model, fine-tuned specifically for Norwegian health and medical information retrieval tasks.
Downloads · 30 days
73
16% of all-time downloads
All-time downloads
450
Public
Parameters
303M
1.3 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors1.2 GB · 97%
From the Hugging Face model README
This is a domain-adapted version of Google's EmbeddingGemma-300M model, fine-tuned specifically for Norwegian health and medical information retrieval tasks.
Base Model: google/embeddinggemma-300m
Architecture: Gemma-based encoder with pooling and normalization layers
Embedding Dimension: 768
Max Sequence Length: 2048 tokens
Language: Norwegian (with English support)
Domain: Health, medical, and general Norwegian text
The model was fine-tuned on a curated dataset of Norwegian question-answer pairs focusing on health and medical information:
Total Training Samples: ~80,000 (anchor, positive) pairs
Validation: 788 pairs
Test: 790 pairs
The model demonstrates excellent retrieval performance on Norwegian health information:
| Metric | Score |
|---|---|
| NDCG@10 | 95.65% |
| MRR@10 | 94.72% |
| Accuracy@1 | 92.50% |
| Accuracy@10 | 98.50% |
| MAP@100 | 94.76% |
from sentence_transformers import SentenceTransformer
# Load the model
model = SentenceTransformer('thivy/embeddinggemma-300m-norwegian-health')
# Encode text
texts = [
"Hva er symptomene på diabetes?",
"Diabetes kan gi tørste, hyppig vannlating og tretthet."
]
embeddings = model.encode(texts)
# Calculate similarity
similarity = model.similarity(embeddings[0], embeddings[1])
print(f"Similarity: {similarity:.4f}")
import numpy as np
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('thivy/embeddinggemma-300m-norwegian-health')
# Example: Medical FAQ retrieval
queries = ["Hva er symptomene på influensa?"]
documents = [
"Influensa gir feber, hodepine og muskelsmerter.",
"Diabetes kan føre til økt tørste og hyppig vannlating.",
"Høyt blodtrykk kan være årsak til hodepine."
]
# Encode
query_embeddings = model.encode(queries)
doc_embeddings = model.encode(documents)
# Find most relevant document
similarities = np.dot(query_embeddings, doc_embeddings.T)
best_match_idx = similarities.argmax()
print(f"Best match: {documents[best_match_idx]}")
from sentence_transformers import SentenceTransformer
import faiss
import numpy as np
model = SentenceTransformer('thivy/embeddinggemma-300m-norwegian-health')
# Create vector database
documents = [...] # Your Norwegian health documents
doc_embeddings = model.encode(documents)
# Create FAISS index
index = faiss.IndexFlatIP(768) # Inner product for cosine similarity
index.add(doc_embeddings.astype('float32'))
# Query
query = "Hva er behandling for høyt blodtrykk?"
query_embedding = model.encode([query])
# Search
k = 5 # Top 5 results
scores, indices = index.search(query_embedding.astype('float32'), k)
# Get relevant documents
relevant_docs = [documents[i] for i in indices[0]]
Architecture Components:
Training Approach:
This model is specifically designed for:
If you use this model, please cite:
@misc{embeddinggemma-300m-norwegian-health,
title={EmbeddingGemma 300M Norwegian Health Domain Adapted},
author={Thivyesh},
year={2026},
url={https://huggingface.co/thivy/embeddinggemma-300m-norwegian-health}
}
This model inherits the license from the base EmbeddingGemma model. Please refer to Google's licensing terms for EmbeddingGemma.