anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
A compact Korean and English sparse retrieval model that turns queries and documents into sparse vectors for search over an inverted index, for teams building Korean search.
KURE-Sparse-nano is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U sentence-transformers
KURE-Sparse-nano is a small search model for Korean and English text, with about 149M parameters. It is a learned sparse retriever. The model maps any text onto a set of 36,282 known terms and gives each term a weight. Because the terms are fixed, an inverted index can store the documents and you can read off which terms matched.
It handles long documents of up to 8,192 tokens. It builds on the KURE-v2-unsupervised model.
It suits developers who build Korean search, question answering or retrieval for a RAG system and want a small model whose matches can be inspected. A weights file of about 299 MB in BF16 fits on modest hardware.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | Search engineers | Build Korean document search on an inverted index | Finding the right help article for a question |
| Legal and public services | Knowledge teams | Retrieve passages from long texts | Locating a passage in a long regulation |
| AI applications | RAG developers | Fetch context for a language model | Passing the best passages to a chatbot |
| Research | NLP researchers | Compare sparse and dense retrieval | Testing on Korean retrieval benchmarks |
Skip it if you do not work with search or retrieval, or your text is in neither Korean nor English.
| Use case | Who | What they get back |
|---|---|---|
| Encode a query | Developers | A sparse vector of 36,282 dimensions with about 147 active on average |
| Encode documents | Developers | Sparse vectors with about 843 active dimensions on average |
| Score matches | Search engineers | Dot-product scores, where higher means more relevant |
You need a few things in place first.
pip install -U sentence-transformers
To get the repository files onto your computer, use Hugging Face's own steps.
pip install -U huggingface_hub hf download nlpai-lab/KURE-Sparse-nano
You call encode_query for the question and encode_document for the texts. Each one attaches the matching marker from the model's training, one for queries and one for documents. Then similarity gives dot-product scores, and a higher score means a closer match.
from sentence_transformers import SparseEncoder
model = SparseEncoder("nlpai-lab/KURE-Sparse-nano", trust_remote_code=True)
query = "훈민정음은 언제 만들어졌나요?"
documents = [
"세종대왕은 1443년에 훈민정음을 창제하고 1446년에 이를 반포하였다.",
"김치는 배추나 무를 소금에 절인 뒤 고춧가루와 젓갈을 넣어 발효시킨 음식이다.",
"한라산은 해발 1,947m로 남한에서 가장 높은 산이며 제주도 중앙에 자리한다.",
]
query_embeddings = model.encode_query(query)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# torch.Size([36282]) torch.Size([3, 36282])
# Dot-product scores (higher is more relevant)
scores = model.similarity(query_embeddings, document_embeddings)
print(scores)
# tensor([[119.3931, 11.5758, 6.4037]])| Tool | What it does |
|---|---|
| encode_query | Turns a question into a sparse vector, with the query marker added |
| encode_document | Turns one or more texts into sparse vectors, with the document marker added |
| similarity | Scores a query against documents by dot product |
You ask in Korean when Hunminjeongeum was created and pass three short documents. The first document, about the king who created it, scores 119.3931. The other two score 11.5758 and 6.4037, so the first one ranks on top.
Start with the code above. It needs only three short texts and prints a score for each, so you can see how ranking works. Then try your own Korean sentences.
Learned sparse retrieval keeps the transparency of keyword search while learning which terms matter. The card reports an average nDCG@10 of 0.7716 on the MTEB(kor, v2) Retrieval tasks, the best among sparse models under 0.5B that support Korean, and says it beats some much larger dense models.
A compact Korean and English sparse retrieval model that turns queries and documents into sparse vectors for search over an inverted index, for teams building Korean search.
Made by nlpai-lab on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: KURE-Sparse-nano is a small search model for Korean and English text, with about 149M parameters. It is a learned sparse retriever. The model maps any text onto a set of 36,282 known terms and gives each term a weight. Because the terms are fixed, an inverted index can store the documents and you can read off which terms matched.
It handles long documents of up to 8,192 tokens. It builds on the KURE-v2-unsupervised model.
Who it suits: It suits developers who build Korean search, question answering or retrieval for a RAG system and want a small model whose matches can be inspected. A weights file of about 299 MB in BF16 fits on modest hardware.
Industry | Who uses it | How they use it | Example
Software | Search engineers | Build Korean document search on an inverted index | Finding the right help article for a question
Legal and public services | Knowledge teams | Retrieve passages from long texts | Locating a passage in a long regulation
AI applications | RAG developers | Fetch context for a language model | Passing the best passages to a chatbot
Research | NLP researchers | Compare sparse and dense retrieval | Testing on Korean retrieval benchmarks
Skip it if you do not work with search or retrieval, or your text is in neither Korean nor English.
Where to use it:
Use case | Who | What they get back
Encode a query | Developers | A sparse vector of 36,282 dimensions with about 147 active on average
Encode documents | Developers | Sparse vectors with about 843 active dimensions on average
Score matches | Search engineers | Dot-product scores, where higher means more relevant
How to set it up: You need a few things in place first.
pip install -U sentence-transformers
To get the repository files onto your computer, use Hugging Face's own steps.
pip install -U huggingface_hub
hf download nlpai-lab/KURE-Sparse-nano
How to use it: You call encode_query for the question and encode_document for the texts. Each one attaches the matching marker from the model's training, one for queries and one for documents. Then similarity gives dot-product scores, and a higher score means a closer match.
from sentence_transformers import SparseEncoder
model = SparseEncoder("nlpai-lab/KURE-Sparse-nano", trust_remote_code=True)
query = "훈민정음은 언제 만들어졌나요?"
documents = [
"세종대왕은 1443년에 훈민정음을 창제하고 1446년에 이를 반포하였다.",
"김치는 배추나 무를 소금에 절인 뒤 고춧가루와 젓갈을 넣어 발효시킨 음식이다.",
"한라산은 해발 1,947m로 남한에서 가장 높은 산이며 제주도 중앙에 자리한다.",
]
query_embeddings = model.encode_query(query)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# torch.Size([36282]) torch.Size([3, 36282])
# Dot-product scores (higher is more relevant)
scores = model.similarity(query_embeddings, document_embeddings)
print(scores)
# tensor([[119.3931, 11.5758, 6.4037]])
Tool | What it does
encode_query | Turns a question into a sparse vector, with the query marker added
encode_document | Turns one or more texts into sparse vectors, with the document marker added
similarity | Scores a query against documents by dot product
Example: You ask in Korean when Hunminjeongeum was created and pass three short documents. The first document, about the king who created it, scores 119.3931. The other two score 11.5758 and 6.4037, so the first one ranks on top.
For newcomers and experts: Start with the code above. It needs only three short texts and prints a score for each, so you can see how ranking works. Then try your own Korean sentences.
Learned sparse retrieval keeps the transparency of keyword search while learning which terms matter. The card reports an average nDCG@10 of 0.7716 on the MTEB(kor, v2) Retrieval tasks, the best among sparse models under 0.5B that support Korean, and says it beats some much larger dense models.
Title: Average active dimensions, from the card
Per query: 147 dimensions
Per document: 843 dimensions
Install sentence-transformers
Load the sparse encoder by name
Encode the query and documents
Score by dot product and rank
Good to know:
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download nlpai-lab/KURE-Sparse-nano
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 6 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| KURE-Sparse-nano This page | 973 | 19 | 149M | apache-2.0 | |
| SPARSEUPShares splade · sparse · modernbert | 6,627 | 63 | 188M | apache-2.0 | |
| hs-embed-1Shares modernbert · text-embeddings-inference · sentence-transformers | 22,412 | 7 | 112M | mit | |
| UIBK-Embedding-v1Shares modernbert · text-embeddings-inference · sentence-transformers | 2,612 | 11 | 149M | apache-2.0 | |
| SlideOnShares sparse · sentence-transformers · feature-extraction | 830 | 18 | 174M | apache-2.0 | |
| mSlideOnShares sparse · sentence-transformers · feature-extraction | 706 | 16 | 339M | apache-2.0 |
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.