Downloads · 30 days
209
40% of all-time downloads
ukung/semantic-lite-gguf
semantic-lite-gguf is a feature extraction model from ukung. Use it when you need embeddings to search or compare text. It is set up for llama.cpp. The card lists the license as apache-2.0.
A compact, multilingual embedding model for fast local semantic search.
Downloads · 30 days
209
40% of all-time downloads
All-time downloads
528
Public
Repo size
966 MB
Likes
2
Public
Click a slice to open those files.
.gguf966 MB · 100%
From the Hugging Face model README
A compact, multilingual embedding model for fast local semantic search.
This repository provides production-ready GGUF releases of ukung/semantic-lite, built on a pruned Qwen3 architecture. It brings high-quality semantic understanding to local applications without requiring a large GPU or a hosted API.
Use it for semantic search, retrieval-augmented generation (RAG), similarity scoring, clustering, duplicate detection, recommendations, and multilingual knowledge bases powered by llama.cpp.
This is an embedding model, not a chat or text-generation model. Use an embedding-capable runtime and compare vectors with cosine similarity or another distance metric.
| File | Quantization | Size | Best for |
|---|---|---|---|
semantic-lite-f16.gguf | F16 | 483 MB | Highest fidelity and reference use |
semantic-lite-q8.gguf | Q8_0 | 259 MB | Near-F16 quality with lower memory use |
semantic-lite-q4.gguf | Q4_K_M | 181 MB | Smallest footprint and CPU-friendly deployment |
All variants produce 1,024-dimensional embeddings and preserve the model's mean-pooling configuration.
llama.cpp embedding tools and servers.On our multilingual retrieval evaluation set, semantic-lite Q4 achieved:
| Scenario | Recall@1 |
|---|---|
| 10-language multilingual retrieval | 90% overall |
| English, French, Portuguese, Italian, and Arabic retrieval | 100% |
The model also achieved 100% pair accuracy on the tested semantic-similarity pairs. These results demonstrate strong multilingual retrieval across English, Indonesian, Spanish, French, German, Portuguese, Italian, Japanese, Chinese, and Arabic, while keeping the model small enough for local deployment.
English · Indonesian · Spanish · French · German · Portuguese · Italian · Japanese · Chinese · Arabic
Benchmark results are measured with the Q4_K_M GGUF release on a small task-focused evaluation set. Treat them as an indicative deployment signal and validate with your own domain data.
Build or install a recent version of llama.cpp, then run:
./llama-embedding \
-m semantic-lite-q4.gguf \
-p "Cara membuat nasi goreng" \
--embd-output-format json
The command returns a JSON object containing an embedding vector with 1,024 values. Replace semantic-lite-q4.gguf with the Q8 or F16 file when you need higher numerical fidelity.
For a local HTTP service, use a recent llama-server build with embedding mode enabled:
./llama-server \
-m semantic-lite-q4.gguf \
--embedding \
--host 127.0.0.1 \
--port 8080
Then request an embedding:
curl http://127.0.0.1:8080/embeddings \
-H "Content-Type: application/json" \
-d '{"content":"Cara membuat nasi goreng"}'
The exact server flags and endpoint format can vary by llama.cpp version. Run ./llama-server --help for the version you installed.
The GGUF files are intended for GGUF-compatible runtimes. One simple approach is to call llama.cpp from Python and parse its JSON output:
import json
import subprocess
def embed(text: str, model: str = "semantic-lite-q4.gguf") -> list[float]:
result = subprocess.run(
[
"llama-embedding",
"-m", model,
"-p", text,
"--embd-output-format", "json",
],
check=True,
capture_output=True,
text=True,
)
return json.loads(result.stdout)["data"][0]["embedding"]
query_vector = embed("Easy home cooking recipes")
print(len(query_vector)) # 1024
For production applications, keep the model loaded in a server process instead of launching a new process for every text.
Create embeddings for documents once, normalize them, and compare a normalized query vector with a dot product. For normalized vectors, the dot product equals cosine similarity:
import numpy as np
documents = [
"How to cook fried rice",
"Guide to stock market investing",
"Tips for caring for your cat",
]
document_vectors = np.array([embed(document) for document in documents])
document_vectors /= np.linalg.norm(document_vectors, axis=1, keepdims=True)
query = np.array(embed("Easy home cooking recipes"))
query /= np.linalg.norm(query)
scores = document_vectors @ query
best_index = int(np.argmax(scores))
print(documents[best_index])
Quantization can slightly change similarity scores. When comparing benchmark results, use the same GGUF variant consistently for both indexing and querying.
llama.cpp version with Qwen3 embedding support.query: and passage: where appropriate.The upstream model is released under the Apache-2.0 license. See the upstream model card for the original model details and license information.