Model reference · open weights

No-small-Embedding

Available as managed deployment Embeddings avsolatorio · community Embeddings 1 variants 1k dl/mo

No-small-Embedding is an open-weight embedding model from avsolatorio. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released byavsolatorio
TypeEmbedding models
TaskEmbeddings
Parameters (lead)33M
Context512 tokens
Runs withsentence-transformers
Released2024-05-01
Popularity1k downloads / month
LicenceOpen weights

About

What No-small-Embedding is

NoInstruct Embedding: Asymmetric Pooling is All You Need

This model has improved retrieval performance compared to the avsolatorio/GIST-small-Embedding-v0 model.

One of the things that the GIST family of models fell short on is the performance on retrieval tasks. We propose a method that produces improved retrieval performance while maintaining independence on crafting arbitrary instructions, a trending paradigm in embedding models for retrieval tasks, when encoding a query.

Technical details of the model will be published shortly.

Read the full model card

Usage

from typing import Union
import torch
import torch.nn.functional as F
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("avsolatorio/NoInstruct-small-Embedding-v0")
tokenizer = AutoTokenizer.from_pretrained("avsolatorio/NoInstruct-small-Embedding-v0")

def get_embedding(text: Union[str, list[str]], mode: str = "sentence"):
    model.eval()

    assert mode in ("query", "sentence"), f"mode={mode} was passed but only `query` and `sentence` are the supported modes."

    if isinstance(text, str):
        text = [text]

    inp = tokenizer(text, return_tensors="pt", padding=True, truncation=True)

    with torch.no_grad():
        output = model(**inp)

    # The model is optimized to use the mean pooling for queries,
    # while the sentence / document embedding uses the [CLS] representation.

    if mode == "query":
        vectors = output.last_hidden_state * inp["attention_mask"].unsqueeze(2)
        vectors = vectors.sum(dim=1) / inp["attention_mask"].sum(dim=-1).view(-1, 1)
    else:
        vectors = output.last_hidden_state[:, 0, :]

    return vectors

texts = [
    "Illustration of the REaLTabFormer model. The left block shows the non-relational tabular data model using GPT-2 with a causal LM head. In contrast, the right block shows how a relational dataset's child table is modeled using a sequence-to-sequence (Seq2Seq) model. The Seq2Seq model uses the observations in the parent table to condition the generation of the observations in the child table. The trained GPT-2 model on the parent table, with weights frozen, is also used as the encoder in the Seq2Seq model.",
    "Predicting human mobility holds significant practical value, with applications ranging from enhancing disaster risk planning to simulating epidemic spread. In this paper, we present the GeoFormer, a decoder-only transformer model adapted from the GPT architecture to forecast human mobility.",
    "As the economies of Southeast Asia continue adopting digital technologies, policy makers increasingly ask how to prepare the workforce for emerging labor demands. However, little is known about the skills that workers need to adapt to these changes"
]

# Compute embeddings
embeddings = get_embedding(texts, mode="sentence")

# Compute cosine-similarity for each pair of sentences
scores = F.cosine_similarity(embeddings.unsqueeze(1), embeddings.unsqueeze(0), dim=-1)
print(scores.cpu().numpy())

# Test the retrieval performance.
query = get_embedding("Which sentence talks about concept on jobs?", mode="query")

scores = F.cosine_similarity(query, embeddings, dim=-1)
print(scores.cpu().numpy())

Support for the Sentence Transformers library will follow soon.

From the published model card. Full card on the HuggingFace links in the sidebar.

Benchmarks

Reported results

As published on the model card — the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
ClassificationMTEB AmazonCounterfactualClassification (en)accuracy75.761
ClassificationMTEB AmazonCounterfactualClassification (en)ap39.036
ClassificationMTEB AmazonCounterfactualClassification (en)f169.859
ClassificationMTEB AmazonPolarityClassificationaccuracy93.299
ClassificationMTEB AmazonPolarityClassificationap90.035
ClassificationMTEB AmazonPolarityClassificationf193.286
ClassificationMTEB AmazonReviewsClassification (en)accuracy49.988
ClassificationMTEB AmazonReviewsClassification (en)f149.462
RetrievalMTEB ArguAnamap_at_131.935
RetrievalMTEB ArguAnamap_at_1048.791
RetrievalMTEB ArguAnamap_at_10049.619
RetrievalMTEB ArguAnamap_at_100049.623
RetrievalMTEB ArguAnamap_at_344.334
RetrievalMTEB ArguAnamap_at_546.908
RetrievalMTEB ArguAnamrr_at_132.930
RetrievalMTEB ArguAnamrr_at_1049.158
RetrievalMTEB ArguAnamrr_at_10050.006
RetrievalMTEB ArguAnamrr_at_100050.010
RetrievalMTEB ArguAnamrr_at_344.618
RetrievalMTEB ArguAnamrr_at_547.325
RetrievalMTEB ArguAnandcg_at_131.935
RetrievalMTEB ArguAnandcg_at_1057.593
RetrievalMTEB ArguAnandcg_at_10060.841
RetrievalMTEB ArguAnandcg_at_100060.924

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys no-small-embedding for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (no-small-embedding below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/embeddings \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"no-small-embedding","input":"text to embed"}'

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms