Instructions to use akal-lm/Akal-Embed-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use akal-lm/Akal-Embed-GGUF with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("akal-lm/Akal-Embed-GGUF") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use akal-lm/Akal-Embed-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible embeddings server: llama serve -hf akal-lm/Akal-Embed-GGUF:Q4_K_M --embeddings
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible embeddings server: llama serve -hf akal-lm/Akal-Embed-GGUF:Q4_K_M --embeddings
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible embeddings server: ./build/bin/llama serve -hf akal-lm/Akal-Embed-GGUF:Q4_K_M --embeddings
- Llama new
- LM Studio
- Jan
- Ollama
How to use akal-lm/Akal-Embed-GGUF with Ollama:
ollama run hf.co/akal-lm/Akal-Embed-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use akal-lm/Akal-Embed-GGUF with Docker Model Runner:
docker model run hf.co/akal-lm/Akal-Embed-GGUF:Q4_K_M
- Lemonade
How to use akal-lm/Akal-Embed-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull akal-lm/Akal-Embed-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Akal-Embed-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
๐งญ Akal-Embed: Ultra-Sharp Edge CPU RAG Embedding Model (GGUF Edition)
Akal-Embed (akal-embed-indo-q4_k_m.gguf, 119 MB) is an ultra-lightweight, high-precision dense text embedding model engineered specifically for on-device Retrieval-Augmented Generation (RAG) on GPU-less edge CPUs.
Calibrated with an Indonesian RAG Importance Matrix (imatrix_indo_e5_id.dat) on top of a hybrid BertModel + XLMRobertaTokenizer (118M parameters, 384 dimensions), Akal-Embed-Indo reduces disk size by 74.7% and RAM footprint by 42.7% compared to PyTorch FP32 while achieving 100.0% Recall@1 and MRR@10 across Indonesian, Paraphrase, Hard-Negative, and Cross-Lingual (English $\rightarrow$ Indonesian) retrieval benchmarksโwith a 4.6x wider Hard-Negative Semantic Margin (+0.2676) than standard multilingual-e5-small (+0.0573).
- Developer / Researcher: Muhammad Luqni Baehaqi (@luqni โข mluqnibaehaqi@gmail.com)
- Organization: Akal LM Initiative (
akal-lm) - Companion Generator Model:
akal-lm/Akal-1B-GGUF - Preprint Paper (Vol. 2): ๐ Download Akal_Embed_RAG_Research_Paper.pdf (6-page Academic Preprint, CC-BY 4.0).
๐ Academic Research Preprint Available (Vol. 2):
Read the complete 6-page scientific paper detailing Indonesian RAG importance matrix calibration, 4.6x sharper hard-negative margin (+0.2676), sub-15ms pure CPU latency, and full sovereign data compliance under UU PDP No. 27/2022:
๐ Download Akal_Embed_RAG_Research_Paper.pdf | View in Files Tab
๐ฏ Intended Use & Capability Boundaries (Managing Expectations)
As a 118-Million Parameter Edge Embedding Model (119โ126 MB), Akal-Embed-Indo is purposefully engineered for extreme efficiency on CPU hardware with minimal memory footprints (< 520 MB RAM).
โ Recommended & Best-Suited Use Cases
- Local & On-Device RAG for Indonesian Enterprises & Government:
- Offline semantic search over internal SOPs, manuals, municipal codes, and product catalogs.
- Compliance with Indonesia's Personal Data Protection Act (UU PDP No. 27/2022) with zero data leaving local hardware.
- Sub-15ms Latency Query Processing on Pure CPU:
- Single-query inference takes only 12โ14 ms on a standard Intel Core i5 CPU without requiring GPUs.
- Paired Full-Stack Edge RAG with Akal-1B:
- Akal-Embed-Indo (119 MB) acts as the retriever and Akal-1B (762 MB) acts as the generator, creating a complete RAG system under 1 GB total RAM.
โ Out-of-Scope & Non-Recommended Use Cases
- Massive Web-Scale Web Retrieval (Millions of Documents):
- 384-dimensional dense vectors are optimized for compact CPU speed and small-to-medium corpora (< 100,000 chunks). For web-scale retrieval across billions of documents, 1024-dimensional large models are recommended.
- Context Beyond 512 Tokens:
- Maximum input sequence is 512 tokens. Long documents must be segmented into chunks (e.g., 300โ400 tokens with 50-token overlap).
- Universal 100+ Language Retrieval:
- Specialized specifically for Indonesian and English $\rightarrow$ Indonesian cross-lingual retrieval. Not intended for low-resource global languages outside this domain.
๐ Benchmark Results (Intel Core i5-8250U, 4 Threads, Pure CPU)
Evaluated on the Akal-Embed Indonesian & Cross-Lingual RAG Benchmark (40 multi-domain passages with hard-negative distractors, 30 queries):
| Model Variant | Backend / Precision | Disk Size | Peak RAM (RSS) | Query Latency | Recall@1 (All / Para) | MRR@10 | Semantic Margin ($d^+ - d^-$) | Cosine Fidelity vs FP32 |
|---|---|---|---|---|---|---|---|---|
| Akal-Embed-Indo Q8_0 (Ours) | GGUF Q8_0 | 126.3 MB | 519.0 MB | 12.74 ms | 100.0% / 100% | 100.0% | +0.2688 | 0.999495 (min: 0.999159) |
| Akal-Embed-Indo Q4_K_M (Ours) | GGUF Q4_K_M (imatrix) | 119.0 MB | 515.8 MB | 14.60 ms | 100.0% / 100% | 100.0% | +0.2676 | 0.993366 (min: 0.990741) |
all-indo-e5-small-v4 (Base) |
PyTorch FP32 | 470.0 MB | 899.4 MB | 13.34 ms | 100.0% / 100% | 100.0% | +0.2694 | 1.000000 |
all-indo-e5-small-v4 (Un-calibrated) |
GGUF Q4_K_M (Std) | 119.0 MB | 515.8 MB | 14.61 ms | 100.0% / 100% | 100.0% | +0.2632 | 0.992652 (min: 0.987276) |
all-indo-e5-small-v4 (Q5_K_M) |
GGUF Q5_K_M (Std) | 126.3 MB | 518.2 MB | 13.85 ms | 100.0% / 100% | 100.0% | +0.2681 | 0.998120 (min: 0.996840) |
| Akal-Embed-E5 Q4_K_M (Ours) | GGUF Q4_K_M (imatrix) | 119.0 MB | 515.7 MB | 14.31 ms | 100.0% / 100% | 100.0% | +0.0573 | 0.998241 |
multilingual-e5-small (Base) |
PyTorch FP32 | 470.0 MB | 867.6 MB | 13.72 ms | 100.0% / 100% | 100.0% | +0.0582 | 1.000000 |
all-MiniLM-L6-v2 (22.7M) |
PyTorch FP32 | 87.3 MB | 495.8 MB | 7.72 ms | 60.0% / 0.0% | 69.08% | +0.1330 | 1.000000 |
๐ How to Run Akal-Embed (llama.cpp CLI)
Prefix queries with query: and documents/chunks with passage: :
./llama-embedding -m akal-embed-indo-q4_k_m.gguf \
-p "query: Berapa batas waktu pelaporan kebocoran data menurut UU PDP?<#sep#>passage: Berdasarkan UU No. 27 Tahun 2022, pengendali data wajib melapor paling lambat 3x24 jam (72 jam)." \
--embd-separator "<#sep#>" \
--pooling mean \
--embd-normalize 2 \
--embd-output-format json+ \
-t 4
๐ฎ Try It Out on Your Own Documents:
Downloadakal-embed-indo-q4_k_m.gguf(119 MB) and test semantic similarity on your own Indonesian text or internal company SOPs! We warmly welcome feedback, custom benchmark tests, and community discussion.
๐ฆ Files in this Repository
akal-embed-indo-q4_k_m.gguf(119 MB): Primary 4-bit Indonesian + Cross-Lingual RAG embedding model calibrated withimatrix_indo_e5_id.dat.akal-embed-indo-q8_0.gguf(126 MB): 8-bit high-precision GGUF edition (0.999495cosine fidelity vs FP32).imatrix_indo_e5_id.dat(348 KB): Indonesian RAG activation importance matrix for encoder quantization.Akal_Embed_RAG_Research_Paper.pdf(1.2 MB): Full bilingual research paper & benchmark evaluation (Vol. 2).
๐ Citation
@article{baehaqi2026akalembed,
title={Optimizing RAG Embedding Models on Edge CPUs: Indonesian Importance Matrix Calibration and Empirical Evaluation of Akal-Embed-Indo},
author={Baehaqi, Muhammad Luqni},
journal={Akal LM Research Preprint Series},
volume={2},
year={2026},
publisher={Akal LM Initiative (akal-lm)},
url={https://huggingface.co/akal-lm/Akal-Embed-GGUF}
}
- Downloads last month
- 176
4-bit
8-bit
Model tree for akal-lm/Akal-Embed-GGUF
Base model
LazarusNLP/all-indo-e5-small-v4