Model reference · open weights
udever-bloom is an open-weight embedding model from izhx. 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 by | izhx |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Runs with | transformers |
| Released | 2023-10-24 |
| Popularity | 515 downloads / month |
| Licence | Commercial licence needed |
About
udever-bloom-560m is finetuned from bigscience/bloom-560m via BitFit on MS MARCO Passage Ranking, SNLI and MultiNLI data.
It is a universal embedding model across tasks, natural and programming languages.
(From the technical view, udever is merely with some minor improvements to sgpt-bloom)
On ModelScope / 魔搭社区: udever-bloom-560m, udever-bloom-1b1, udever-bloom-3b, udever-bloom-7b1
Use the code below to get started with the model.
import torch
from transformers import AutoTokenizer, BloomModel
tokenizer = AutoTokenizer.from_pretrained('izhx/udever-bloom-560m')
model = BloomModel.from_pretrained('izhx/udever-bloom-560m')
boq, eoq, bod, eod = '[BOQ]', '[EOQ]', '[BOD]', '[EOD]'
eoq_id, eod_id = tokenizer.convert_tokens_to_ids([eoq, eod])
if tokenizer.padding_side != 'left':
print('!!!', tokenizer.padding_side)
tokenizer.padding_side = 'left'
def encode(texts: list, is_query: bool = True, max_length=300):
bos = boq if is_query else bod
eos_id = eoq_id if is_query else eod_id
texts = [bos + t for t in texts]
encoding = tokenizer(
texts, truncation=True, max_length=max_length - 1, padding=True
)
for ids, mask in zip(encoding['input_ids'], encoding['attention_mask']):
ids.append(eos_id)
mask.append(1)
inputs = tokenizer.pad(encoding, return_tensors='pt')
with torch.inference_mode():
outputs = model(**inputs)
embeds = outputs.last_hidden_state[:, -1]
return embeds
encode(['I am Bert', 'You are Elmo'])
MS MARCO hard negatives provided by (https://github.com/UKPLab/sentence-transformers/blob/master/examples/training/ms_marco/train_bi-encoder_mnrl.py#L86). Negatives for SNLI and MultiNLI are randomly sampled.
| MTEB | Avg. | Class. | Clust. | PairClass. | Rerank. | Retr. | STS | Summ. |
|---|---|---|---|---|---|---|---|---|
| #Datasets ➡️ | 56 | 12 | 11 | 3 | 4 | 15 | 10 | 1 |
| bge-large-en-v1.5 | 64.23 | 75.97 | 46.08 | 87.12 | 60.03 | 54.29 | 83.11 | 31.61 |
| bge-base-en-v1.5 | 63.55 | 75.53 | 45.77 | 86.55 | 58.86 | 53.25 | 82.4 | 31.07 |
| gte-large | 63.13 | 73.33 | 46.84 | 85 | 59.13 | 52.22 | 83.35 | 31.66 |
| gte-base | 62.39 | 73.01 | 46.2 | 84.57 | 58.61 | 51.14 | 82.3 | 31.17 |
| e5-large-v2 | 62.25 | 75.24 | 44.49 | 86.03 | 56.61 | 50.56 | 82.05 | 30.19 |
| instructor-xl | 61.79 | 73.12 | 44.74 | 86.62 | 57.29 | 49.26 | 83.06 | 32.32 |
| instructor-large | 61.59 | 73.86 | 45.29 | 85.89 | 57.54 | 47.57 | 83.15 | 31.84 |
| e5-base-v2 | 61.5 | 73.84 | 43.8 | 85.73 | 55.91 | 50.29 | 81.05 | 30.28 |
| e5-large | 61.42 | 73.14 | 43.33 | 85.94 | 56.53 | 49.99 | 82.06 | 30.97 |
| text-embedding-ada-002 (OpenAI API) | 60.99 | 70.93 | 45.9 | 84.89 | 56.32 | 49.25 | 80.97 | 30.8 |
| e5-base | 60.44 | 72.63 | 42.11 | 85.09 | 55.7 | 48.75 | 80.96 | 31.01 |
| SGPT-5.8B-msmarco | 58.93 | 68.13 | 40.34 | 82 | 56.56 | 50.25 | 78.1 | 31.46 |
| sgpt-bloom-7b1-msmarco | 57.59 | 66.19 | 38.93 | 81.9 | 55.65 | 48.22 | 77.74 | 33.6 |
| Udever-bloom-560m | 55.80 | 68.04 | 36.89 | 81.05 | 52.60 | 41.19 | 79.93 | 32.06 |
| Udever-bloom-1b1 | 58.28 | 70.18 | 39.11 | 83.11 | 54.28 | 45.27 | 81.52 | 31.10 |
| Udever-bloom-3b | 59.86 | 71.91 | 40.74 | 84.06 | 54.90 | 47.67 | 82.37 | 30.62 |
| Udever-bloom-7b1 | 60.63 | 72.13 | 40.81 | 85.40 | 55.91 | 49.34 | 83.01 | 30.97 |
| CodeSearchNet | Go | Ruby | Python | Java | JS | PHP | Avg. |
|---|---|---|---|---|---|---|---|
| CodeBERT | 69.3 | 70.6 | 84.0 | 86.8 | 74.8 | 70.6 | 76.0 |
| GraphCodeBERT | 84.1 | 73.2 | 87.9 | 75.7 | 71.1 | 72.5 | 77.4 |
| cpt-code S | 97.7 | 86.3 | 99.8 | 94.0 | 86.0 | 96.7 | 93.4 |
| cpt-code M | 97.5 | 85.5 | 99.9 | 94.4 | 86.5 | 97.2 | 93.5 |
| sgpt-bloom-7b1-msmarco | 76.79 | 69.25 | 95.68 | 77.93 | 70.35 | 73.45 | 77.24 |
From the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| STS | MTEB AFQMC | cos_sim_pearson | 25.170 |
| STS | MTEB AFQMC | cos_sim_spearman | 25.320 |
| STS | MTEB AFQMC | euclidean_pearson | 25.343 |
| STS | MTEB AFQMC | euclidean_spearman | 25.528 |
| STS | MTEB AFQMC | manhattan_pearson | 25.734 |
| STS | MTEB AFQMC | manhattan_spearman | 25.922 |
| STS | MTEB ATEC | cos_sim_pearson | 32.336 |
| STS | MTEB ATEC | cos_sim_spearman | 33.458 |
| STS | MTEB ATEC | euclidean_pearson | 35.147 |
| STS | MTEB ATEC | euclidean_spearman | 33.378 |
| STS | MTEB ATEC | manhattan_pearson | 35.359 |
| STS | MTEB ATEC | manhattan_spearman | 33.524 |
| Classification | MTEB AmazonCounterfactualClassification (en) | accuracy | 72.358 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 35.456 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 66.495 |
| Classification | MTEB AmazonCounterfactualClassification (de) | accuracy | 66.424 |
| Classification | MTEB AmazonCounterfactualClassification (de) | ap | 78.328 |
| Classification | MTEB AmazonCounterfactualClassification (de) | f1 | 64.250 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | accuracy | 73.658 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | ap | 21.734 |
| Classification | MTEB AmazonCounterfactualClassification (en-ext) | f1 | 60.521 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | accuracy | 56.863 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | ap | 12.906 |
| Classification | MTEB AmazonCounterfactualClassification (ja) | f1 | 46.686 |
Using it via the API
Once AxForge deploys udever-bloom for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (udever-bloom 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":"udever-bloom","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.