Model reference · open weights
splade-code is an open-weight embedding model from naver. splade-code-06B (BF16) weighs 1.2 GB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the naver/splade-code-06B model card, 2026-10-01
What it is
| Released by | naver |
|---|---|
| Released | 2026-02-24 |
| Parameters | 596M |
| VRAM | 1.2 GB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
From the model card
SPLADE-Code-06B is a sparse retrieval model designed for code retrieval tasks. It is the top-performing models on MTEB for models below 1B (at time of writing, Feb 2026).
Install Sentence Transformers:
pip install sentence_transformers
from sentence_transformers import SparseEncoder
model = SparseEncoder("naver/splade-code-06B", trust_remote_code=True)
queries = [
"SELECT *\nFROM Student\nWHERE Age = (\nSELECT MAX(Age)\nFROM Student\nWHERE Group = 'specific_group'\n)\nAND Group = 'specific_group';"
]
query_embeddings = model.encode(queries)
print(query_embeddings.shape)
# torch.Size([1, 151936])
sparsity = model.sparsity(query_embeddings)
print(sparsity)
# {'active_dims': 1231.0, 'sparsity_ratio': 0.991897904380792}
decoded = model.decode(query_embeddings, top_k=10)
print(decoded)
# [[
# ("Ġgroup", 2.34375),
# ("Ġage", 2.34375),
# ("ĠAge", 2.34375),
# ("ĠStudent", 2.296875),
# ("Ġspecific", 2.296875),
# ("_group", 2.296875),
# ("ĠMax", 2.21875),
# ("Ġmax", 2.21875),
# ("Ġstudent", 2.203125),
# ("ĠGroup", 2.1875),
# ]]
pip install transformers
from transformers import AutoModelForCausalLM, AutoModel
import os
import torch
splade = AutoModelForCausalLM.from_pretrained("naver/splade-code-06B", trust_remote_code=True)
device = (torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu"))
splade.to(device)
splade.eval()
queries = ["SELECT *\nFROM Student\nWHERE Age = (\nSELECT MAX(Age)\nFROM Student\nWHERE Group = 'specific_group'\n)\nAND Group = 'specific_group';"]
bow_dict = splade.encode(queries, prompt_type="query", top_k_q=10, return_dict=True, print_dict=True)
+--------------------------------------------------------------------+
| TOP ACTIVATED WORDS |
+--------------------------------------------------------------------+
* INPUT: SELECT *
FROM Student
WHERE Age = (
SELECT MAX(Age)
FROM Student
WHERE Group = 'specific_group'
)
AND Group = 'specific_group';
Ġgroup | ████████████████████ 2.34
Ġage | ███████████████████ 2.33
ĠAge | ███████████████████ 2.33
_group | ███████████████████ 2.30
ĠStudent | ███████████████████ 2.30
Ġspecific | ███████████████████ 2.28
Ġmax | ██████████████████ 2.22
ĠMax | ██████████████████ 2.22
Ġstudent | ██████████████████ 2.20
ĠGroup | ██████████████████ 2.19
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.