NeuML / bert-hash-nano-embeddings

huggingface.co
Total runs: 82
24-hour runs: 0
7-day runs: 17
30-day runs: 17
Model's Last Updated: June 16 2026
sentence-similarity

Introduction of bert-hash-nano-embeddings

Model Details of bert-hash-nano-embeddings

BERT Hash Nano Embeddings

This is a BERT Hash Nano model fined-tuned using sentence-transformers . It maps sentences & paragraphs to a 128-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

This model is an alternative to MUVERA fixed-dimensional encoding with ColBERT models. MUVERA encoding enables encoding the multi-vector outputs of ColBERT into single dense vector outputs. While this is a great step, the main issue with MUVERA is that it tends to need wide vectors to be effective (5K - 10K dimensional vectors). bert-hash-nano-embeddings outputs 128-dimensional vectors.

The training dataset is a subset of this embedding training collection . The training workflow was a two step distillation process as follows.

Usage (txtai)

This model can be used to build embeddings databases with txtai for semantic search and/or as a knowledge source for retrieval augmented generation (RAG).

import txtai

embeddings = txtai.Embeddings(
  path="neuml/bert-hash-nano-embeddings",
  content=True,
  vectors={"trust_remote_code": True}
)
embeddings.index(documents())

# Run a query
embeddings.search("query to run")
Usage (Sentence-Transformers)

Alternatively, the model can be loaded with sentence-transformers .

from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]

model = SentenceTransformer("neuml/bert-hash-nano-embeddings", trust_remote_code=True)
embeddings = model.encode(sentences)
print(embeddings)
Usage (Hugging Face Transformers)

The model can also be used directly with Transformers.

from transformers import AutoTokenizer, AutoModel
import torch

# Mean Pooling - Take attention mask into account for correct averaging
def meanpooling(output, mask):
    embeddings = output[0] # First element of model_output contains all token embeddings
    mask = mask.unsqueeze(-1).expand(embeddings.size()).float()
    return torch.sum(embeddings * mask, 1) / torch.clamp(mask.sum(1), min=1e-9)

# Sentences we want sentence embeddings for
sentences = ['This is an example sentence', 'Each sentence is converted']

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained("neuml/bert-hash-nano-embeddings", trust_remote_code=True)
model = AutoModel.from_pretrained("neuml/bert-hash-nano-embeddings", trust_remote_code=True)

# Tokenize sentences
inputs = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')

# Compute token embeddings
with torch.no_grad():
    output = model(**inputs)

# Perform pooling. In this case, mean pooling.
embeddings = meanpooling(output, inputs['attention_mask'])

print("Sentence embeddings:")
print(embeddings)
Evaluation

The following table shows a subset of BEIR scored with the txtai benchmarks script .

This evaluation is compared against the ColBERT MUVERA series of models.

Scores reported are ndcg@10 and grouped into the following three categories.

BERT Hash Embeddings vs MUVERA
Model Parameters NFCorpus SciDocs SciFact Average
BERT Hash Nano Embeddings 0.9M 0.2562 0.1179 0.5032 0.2924
ColBERT MUVERA Nano 0.9M 0.2355 0.0807 0.4904 0.2689
BERT Hash Embeddings vs MUVERA with maxsim re-ranking of the top 100 results per MUVERA paper
Model Parameters NFCorpus SciDocs SciFact Average
BERT Hash Nano Embeddings 0.9M 0.3101 0.1347 0.6327 0.3592
ColBERT MUVERA Nano 0.9M 0.2996 0.1201 0.6249 0.3482
Compare to other models
Model Parameters NFCorpus SciDocs SciFact Average
ColBERT MUVERA Nano (full multi-vector maxsim) 0.9M 0.3180 0.1262 0.6576 0.3673
all-MiniLM-L6-v2 22.7M 0.3089 0.2164 0.6527 0.3927
mxbai-embed-xsmall-v1 24.1M 0.3186 0.2155 0.6598 0.3980

In analyzing the results, bert-hash-nano-embeddings is better across the board vs MUVERA with colbert-muvera-nano . It keeps 98% of the performance of full multi-vector maxsim vs 95% for MUVERA. Comparing the standard MUVERA output of 10240 vs 128 dimensions, 10K standard F32 vectors needs 400 MB of storage vs 5 MB

By itself for a 970K parameter model, the scores are really good. When paired with re-ranking with a 970K ColBERT model, the scores are even better. Competitive with common small models as shown above at only ~4% of the number of parameters.

While this isn't a state of the art model, it's an extremely competitive method for building vectors on edge and low resource devices.

Full Model Architecture
SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'BertHashModel'})
  (1): Pooling({'word_embedding_dimension': 128, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)
More Information

Read more about this model and how it was built in this article .

Runs of NeuML bert-hash-nano-embeddings on huggingface.co

82
Total runs
0
24-hour runs
5
3-day runs
17
7-day runs
17
30-day runs

More Information About bert-hash-nano-embeddings huggingface.co Model

More bert-hash-nano-embeddings license Visit here:

https://choosealicense.com/licenses/apache-2.0

bert-hash-nano-embeddings huggingface.co

bert-hash-nano-embeddings huggingface.co is an AI model on huggingface.co that provides bert-hash-nano-embeddings's model effect (), which can be used instantly with this NeuML bert-hash-nano-embeddings model. huggingface.co supports a free trial of the bert-hash-nano-embeddings model, and also provides paid use of the bert-hash-nano-embeddings. Support call bert-hash-nano-embeddings model through api, including Node.js, Python, http.

bert-hash-nano-embeddings huggingface.co Url

https://huggingface.co/NeuML/bert-hash-nano-embeddings

NeuML bert-hash-nano-embeddings online free

bert-hash-nano-embeddings huggingface.co is an online trial and call api platform, which integrates bert-hash-nano-embeddings's modeling effects, including api services, and provides a free online trial of bert-hash-nano-embeddings, you can try bert-hash-nano-embeddings online for free by clicking the link below.

NeuML bert-hash-nano-embeddings online free url in huggingface.co:

https://huggingface.co/NeuML/bert-hash-nano-embeddings

bert-hash-nano-embeddings install

bert-hash-nano-embeddings is an open source model from GitHub that offers a free installation service, and any user can find bert-hash-nano-embeddings on GitHub to install. At the same time, huggingface.co provides the effect of bert-hash-nano-embeddings install, users can directly use bert-hash-nano-embeddings installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

bert-hash-nano-embeddings install url in huggingface.co:

https://huggingface.co/NeuML/bert-hash-nano-embeddings

Url of bert-hash-nano-embeddings

bert-hash-nano-embeddings huggingface.co Url

Provider of bert-hash-nano-embeddings huggingface.co

NeuML
ORGANIZATIONS

Other API from NeuML

huggingface.co

Total runs: 1.8K
Run Growth: -1.0K
Growth Rate: -53.03%
Updated:February 06 2025
huggingface.co

Total runs: 1.3K
Run Growth: 1.1K
Growth Rate: 83.45%
Updated:January 27 2025
huggingface.co

Total runs: 1.1K
Run Growth: -170
Growth Rate: -16.18%
Updated:January 27 2025
huggingface.co

Total runs: 919
Run Growth: 310
Growth Rate: 31.03%
Updated:February 21 2023
huggingface.co

Total runs: 853
Run Growth: 250
Growth Rate: 29.31%
Updated:February 21 2023
huggingface.co

Total runs: 521
Run Growth: -99.9K
Growth Rate: -19182.34%
Updated:January 27 2025
huggingface.co

Total runs: 285
Run Growth: 98
Growth Rate: 34.39%
Updated:January 27 2025
huggingface.co

Total runs: 162
Run Growth: 121
Growth Rate: 74.69%
Updated:April 21 2026
huggingface.co

Total runs: 31
Run Growth: 14
Growth Rate: 45.16%
Updated:October 10 2025
huggingface.co

Total runs: 16
Run Growth: 1
Growth Rate: 6.25%
Updated:November 23 2024
huggingface.co

Total runs: 10
Run Growth: 5
Growth Rate: 50.00%
Updated:July 21 2026
huggingface.co

Total runs: 8
Run Growth: -75
Growth Rate: -937.50%
Updated:April 13 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 11 2025