Downloads · 30 days
27
100% of all-time downloads
lau299/ximhai-embedder-es
ximhai-embedder-es is a sentence similarity model from lau299. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as apache-2.0.
A Spanish sentence embedder fine-tuned for retrieval over a Mexican secondary-school textbook (Colección Ximhai. Nuestro libro de proyectos. Primer grado, SEP 2023). It is the query/passage encoder of the RAG agent in…
Downloads · 30 days
27
100% of all-time downloads
All-time downloads
27
Public
Parameters
118M
488 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors471 MB · 96%
From the Hugging Face model README
A Spanish sentence embedder fine-tuned for retrieval over a Mexican secondary-school textbook (Colección Ximhai. Nuestro libro de proyectos. Primer grado, SEP 2023). It is the query/passage encoder of the RAG agent in github.com/lauro299/hackaton-devf-llama.
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2normalize_embeddings=True) to match the index.MultipleNegativesRankingLoss (in-batch negatives)The base multilingual model placed the wrong project's chunks closer to a query than the
right one for questions that name a project/reading by title (e.g. "¿qué es Juguemos con
la lengua?": correct chunk at L2 ≈ 0.87 vs unrelated chunks at ≈ 0.81). Training pairs are
generated from the book's own structure (project titles × pedagogical phases × question
templates) plus a handful of curated failure cases. See app/build_finetune_dataset.py
in the GitHub repo.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("lau299/ximhai-embedder-es")
emb = model.encode(["¿De qué trata el proyecto de lenguas indígenas?"], normalize_embeddings=True)
print(emb.shape) # (1, 384)
Use the same model that built the vector index. The vectors in the published book.db
were produced by this exact checkpoint.
The training pairs pair synthetic questions with passages from the textbook above, which is D.R. © Secretaría de Educación Pública (SEP), 2023. The training dataset is not distributed with this model. You can rebuild it from your own copy of the book with the pipeline in the GitHub repo. This model was built for a non-commercial, educational hackathon project.
Reimers & Gurevych, Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks, EMNLP 2019.