From: BAAI <huggingface.co/BAAI>Newsgroups: alt.freeweights.embedSubject:

LLARA-beir

Date: 2026-11-15Commit: 07eeb3eSigned: 2DC28CC7B26A283B ✓

Sentence similarity model with 6.7B parameters. Safetensors weights, 27.0 GB in all. Published by BAAI under MIT.

6.7B params27.0GBLLARA-beirsafetensorspermissive
FactsParams6.7BSize27.0 GBFormatssafetensorsTasksentence similarityLicenseMITFrom sourcepermissive
$ fw get BAAI/LLARA-beir
# manifest sha256 cbe28eb8ba64… · 27.0 GB · 16 files
$ fw verify ./LLARA-beir BAAI/LLARA-beir
From sourceHosted (signed)BAAI/LLARA-beirLast check: 2026-11-15 04:14 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Evaluate with

Overview

Size
27.0 GB
Weights
27.0 GB (safetensors)
Parameters
6.7B
Formats
safetensors
Task
sentence similarity
License
MIT (permissive)
Files
16, each with a sha256
Publisher
BAAI
Added
2026-11-15
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 04:14 UTCpassed

Model card

From the publisher at commit 07eeb3e. Shown as plain text with links; images open at the publisher.

For more details please refer to our github repo: https://github.com/FlagOpen/FlagEmbedding

LLARA (paper)#

In this project, we introduce LLaRA:

  • EBAE: Embedding-Based Auto-Encoding.
  • EBAR: Embedding-Based Auto-Regression.

Usage#

import torch
from transformers import AutoModel, AutoTokenizer, LlamaModel

def get_query_inputs(queries, tokenizer, max_length=512):
    prefix = '"'
    suffix = '", predict the following passage within eight words: <s9><s10><s11><s12><s13><s14><s15><s16>'
    prefix_ids = tokenizer(prefix, return_tensors=None)['input_ids']
    suffix_ids = tokenizer(suffix, return_tensors=None)['input_ids'][1:]
    queries_inputs = []
    for query in queries:
        inputs = tokenizer(query,
                           return_tensors=None,
                           max_length=max_length,
                           truncation=True,
                           add_special_tokens=False)
        inputs['input_ids'] = prefix_ids + inputs['input_ids'] + suffix_ids
        inputs['attention_mask'] = [1] * len(inputs['input_ids'])
        queries_inputs.append(inputs)
    return tokenizer.pad(
            queries_inputs,
            padding=True,
            max_length=max_length,
            pad_to_multiple_of=8,
            return_tensors='pt',
        )

def get_passage_inputs(passages, tokenizer, max_length=512):
    prefix = '"'
    suffix = '", summarize the above passage within eight words: <s1><s2><s3><s4><s5><s6><s7><s8>'
    prefix_ids = tokenizer(prefix, return_tensors=None)['input_ids']
    suffix_ids = tokenizer(suffix, return_tensors=None)['input_ids'][1:]
    passages_inputs = []
    for passage in passages:
        inputs = tokenizer(passage,
                           return_tensors=None,
                           max_length=max_length,
                           truncation=True,
                           add_special_tokens=False)
        inputs['input_ids'] = prefix_ids + inputs['input_ids'] + suffix_ids
        inputs['attention_mask'] = [1] * len(inputs['input_ids'])
        passages_inputs.append(inputs)
    return tokenizer.pad(
            passages_inputs,
            padding=True,
            max_length=max_length,
            pad_to_multiple_of=8,
            return_tensors='pt',
        )

# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained('BAAI/LLARA-beir')
model = AutoModel.from_pretrained('BAAI/LLARA-beir')

# Define query and passage inputs
query = "What is llama?"
title = "Llama"
passage = "The llama is a domesticated South American camelid, widely used as a meat and pack animal by Andean cultures since the pre-Columbian era."
query_input = get_query_inputs([query], tokenizer)
passage_input = get_passage_inputs([passage], tokenizer)


with torch.no_grad():
    # compute query embedding
    query_outputs = model(**query_input, return_dict=True, output_hidden_states=True)
    query_embedding = query_outputs.hidden_states[-1][:, -8:, :]
    query_embedding = torch.mean(query_embedding, dim=1)
    query_embedding = torch.nn.functional.normalize(query_embedding, dim=-1)

    # compute passage embedding
    passage_outputs = model(**passage_input, return_dict=True, output_hidden_states=True)
    passage_embeddings = passage_outputs.hidden_states[-1][:, -8:, :]
    passage_embeddings = torch.mean(passage_embeddings, dim=1)
    passage_embeddings = torch.nn.functional.normalize(passage_embeddings, dim=-1)

    # compute similarity score
    score = query_embedding @ passage_embeddings.T
    print(score)

Acknowledgement#

Thanks to the authors of open-sourced datasets, including MSMARCO, BEIR, etc. Thanks to the open-sourced libraries like Pyserini.

Citation#

If you find this repository useful, please consider giving a star :star: and citation

@misc{li2023making,
      title={Making Large Language Models A Better Foundation For Dense Retrieval}, 
      author={Chaofan Li and Zheng Liu and Shitao Xiao and Yingxia Shao},
      year={2023},
      eprint={2312.15503},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Files

16 files · 27.0 GBWeights 27.0 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 16 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md4.29 KB21dc29c7a2bf494ab3040c3282c15d14cb10e9b293de5458251cc2e9265a6d40
added_tokens.json282 B016b6142839687bc01faf22cadb0852447d9cfb2017e438c57e89276f49cadc9
config.json671 B99d6cdb5fb0432426aeaaa27b69c451080f4bbd9669dcde4ce6d7f4396e598fe
generation_config.json183 Be6a8b31d1455428bdbaec7a67be677f1a262c47e859eb35c7229957f118751da
model-00001-of-00006.safetensors4.84 GBd6fccd8125fbe08012de41b19f254477b4fb7653016d54f63a4cf05d6344a058
model-00002-of-00006.safetensors4.86 GB2ab32cbdc54b39e8f04666421c5e6ad181b59954cf257a9d131d55ebb16e1268
model-00003-of-00006.safetensors4.86 GB9ca1bfeacefd35b9dd1c801c45fa0ad809071faccdd99253e4cf5255cf38ee9b
model-00004-of-00006.safetensors4.86 GB0b027c43b746337990b12d3f0f6f7b2c2dc0524cd632738eab22557bc0446be0
model-00005-of-00006.safetensors4.86 GB54890415310f56758951b79a88be1592fba4bd5168053f379c59c4a6e7f1bd25
model-00006-of-00006.safetensors2.68 GB8f8fb6aa36b09ed23b828f92500c76dc784a22511661bd2200e76cf79d9c52a7
model.safetensors.index.json23.9 KB8702ec2443c70f3a5b1b979283c3b6b1ad03163867f20fe0029f45596ad1b178
special_tokens_map.json788 B5b35e6a8afba9c3a68c2b9e8ce6a8e08b12e802d6598f1c0614bd581e5f0e5ab
tokenizer.json1.85 MBb259868279429164efcd99dd22603414e35e6a53bc85f9de67e97b8f420624b5
tokenizer.model500 KB9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
tokenizer_config.json3.95 KB20307db7bad20b6ca451459693ad7f0687fca16cb176d16d819f459d796c273a
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
07eeb3ef23 pinned now2026-11-15 04:14 UTC16 files · 27.0 GB

Use it

$ fw get BAAI/LLARA-beir
# manifest sha256 cbe28eb8ba64… · 27.0 GB · 16 files
$ fw verify ./LLARA-beir BAAI/LLARA-beir
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/BAAI/LLARA-beir.json --dir ./LLARA-beir $ python3 fw.py verify ./LLARA-beir ./BAAI__LLARA-beir.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download BAAI/LLARA-beir --revision 07eeb3ef23de13190a8d6d8e6bcac399aeb2e73d --local-dir ./LLARA-beir
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("BAAI/LLARA-beir", revision="07eeb3ef23de13190a8d6d8e6bcac399aeb2e73d") model = AutoModel.from_pretrained("BAAI/LLARA-beir", revision="07eeb3ef23de13190a8d6d8e6bcac399aeb2e73d", device_map="auto")

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
21dc29c7a2bf494ab3040c3282c15d14cb10e9b293de5458251cc2e9265a6d40
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: BAAI <huggingface.co/BAAI>Newsgroups: alt.freeweights.embedSubject: LLARA-beirDate: 2026-11-15Commit: 07eeb3eSigned: 2DC28CC7B26A283B ✓
Upstream
BAAI/LLARA-beir
Pinned commit
07eeb3ef23de13190a8d6d8e6bcac399aeb2e73d
Manifest
LLARA-beir.json · .minisig
Manifest sha256
cbe28eb8ba64c77049bc2f7d8cb48cc418badd8d39c21d30d2725e914d44fc54
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:14 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/BAAI/LLARA-beir.json $ curl -O https://freeweights.allternit.com/manifests/BAAI/LLARA-beir.json.minisig $ minisign -Vm LLARA-beir.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download BAAI/LLARA-beir
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. LLARA-beir.json. Provenance. Takedown history: none.
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens