Downloads · 30 days
182
9% of all-time downloads
jsonMartin/voyage-4-nano-gguf
voyage-4-nano-gguf is a sentence similarity model from jsonMartin. Use it when you need a score for how close two texts are. The card lists the license as other.
GGUF conversions of VoyageAI's voyage-4-nano embedding model for use with llama.cpp.
Downloads · 30 days
182
9% of all-time downloads
All-time downloads
2.1K
Public
Repo size
1.1 GB
Likes
5
Public
Click a slice to open those files.
.gguf1.1 GB · 99%
From the Hugging Face model README
GGUF conversions of VoyageAI's voyage-4-nano embedding model for use with llama.cpp.
| File | Size | Description |
|---|---|---|
voyage-4-nano-f16.gguf | 695 MB | Full precision (FP16) |
voyage-4-nano-q8_0.gguf | 372 MB | 8-bit quantized |
voyage-4-nano-linear.pt | 4.2 MB | Linear projection layer (required) |
Cosine similarity against HuggingFace reference embeddings:
| Format | Mean Similarity | Quality |
|---|---|---|
| GGUF F16 | 1.000000 | Identical |
| GGUF Q8_0 | 0.999903 | Excellent |
The Q8_0 quantized model achieves 99.99% similarity to the original, with 46% size reduction.
# Generate embeddings with llama-embedding
./llama.cpp/build/bin/llama-embedding \
-m voyage-4-nano-q8_0.gguf \
--pooling mean \
--attention non-causal \
--embd-normalize 2 \
-p "Your text here"
Important flags:
--attention non-causal - Required for bidirectional models--pooling mean - Use mean pooling--embd-normalize 2 - L2 normalizationThe GGUF model outputs 1024-dim embeddings. To match the original 2048-dim output, apply the linear projection:
import torch
import numpy as np
# Load projection matrix
linear_weight = torch.load("voyage-4-nano-linear.pt", weights_only=True).float().numpy()
# Apply projection: (batch, 1024) @ (1024, 2048).T -> (batch, 2048)
projected = embeddings @ linear_weight.T
# Re-normalize
projected = projected / np.linalg.norm(projected, axis=1, keepdims=True)