Instructions to use lainsoykaf/WeMM-Embedding-2B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lainsoykaf/WeMM-Embedding-2B-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 lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M --embeddings
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible embeddings server: llama serve -hf lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M --embeddings
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible embeddings server: ./llama-server -hf lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M --embeddings
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible embeddings server: ./build/bin/llama-server -hf lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M --embeddings
- LM Studio
- Jan
- Ollama
How to use lainsoykaf/WeMM-Embedding-2B-GGUF with Ollama:
ollama run hf.co/lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use lainsoykaf/WeMM-Embedding-2B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use lainsoykaf/WeMM-Embedding-2B-GGUF with Docker Model Runner:
docker model run hf.co/lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M
- Lemonade
How to use lainsoykaf/WeMM-Embedding-2B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.WeMM-Embedding-2B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use lainsoykaf/WeMM-Embedding-2B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use lainsoykaf/WeMM-Embedding-2B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "lainsoykaf/WeMM-Embedding-2B-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
WeMM-Embedding-2B GGUF (unofficial)
Unofficial GGUF conversion of tencent/WeMM-Embedding-2B for llama.cpp. It is the default embedding model of imgsearch, a local-first image search app. Not affiliated with or endorsed by Tencent. All credit for the model goes to the WeChat Vision Team; it is licensed under Apache 2.0.
| File | Size | SHA-256 |
|---|---|---|
WeMM-Embedding-2B-Q4_K_M.gguf |
1.56 GB | 3c6aa2dab16f250f730e7e87305fbd637a8fd068770d3cae16a0c16e33678d6d |
mmproj-WeMM-Embedding-2B-f16.gguf |
0.67 GB | 02115c4aebe057aaf0473c8c9ee4efbbd080ae1b07386910cb326c1c042baaaa |
Usage
Both files are needed for image input. Output: 2048 dimensions, L2-normalize; Matryoshka truncation (re-normalize) to 1024/512/256 works well.
The prompt must match the reference processor output exactly. No system turn, no instruction; queries and documents are encoded the same way. Take the last-token hidden state (pooling none, last position, or --pooling last):
text: <|im_start|>user\n{text}<|im_end|>\n<embedding>
image: <|im_start|>user\n<__media__><|im_end|>\n<embedding>
<__media__> is the llama.cpp mtmd media marker; mtmd adds the vision start/end tokens. <embedding> (id 248077) is a control token and must be parsed as special.
Conversion
Made with llama.cpp 5343f45 (convert_hf_to_gguf.py, llama-quantize) from the official safetensors, with two adjustments:
- WeMM's
tokenizer.jsonadds a normalizer (strips a trailing\n) and a post-processor (appends<embedding>). Both change the converter's pre-tokenizer hash. The conversion used a copy withnormalizerset to{"type": "NFC"}andpost_processorset tonull. Vocabulary and merges are unchanged; the prompt above adds<embedding>explicitly. --no-mtp: the config declares an MTP layer that the weights do not contain.
Text model: f16 → Q4_K_M. Vision projector: f16.
Evaluation
Flickr30k 1k test (1,000 images, 5,000 captions), images resized to a maximum side of 384 px, through imgsearch's llama.cpp pipeline:
| Model | Quant | T2I R@1 | T2I R@5 | I2T R@1 | ms/image (M2 Max) | ms/image (Radeon 780M) |
|---|---|---|---|---|---|---|
| Qwen3-VL-Embedding-2B | Q6_K | 80.8 | 94.7 | 94.3 | 242 | – |
| Qwen3-VL-Embedding-8B | Q4_K_M | 81.1 | 95.0 | 94.5 | 799 | 1095 |
| WeMM-Embedding-2B | Q6_K | 84.2 | 96.6 | 94.7 | 202 | – |
| WeMM-Embedding-2B (this repo) | Q4_K_M | 84.1 | 96.5 | 95.0 | 236 | 421 |
Against the transformers reference, text embeddings reach cosine ≈0.99 at Q4_K_M (0.9999 at Q8_0). Image embeddings reach 0.95–0.97 with identical pixels; this gap comes from llama.cpp's vision implementation, not from quantization.
- Downloads last month
- 108
4-bit