alt.freeweights.embed / LLARA-passage
From: BAAI <huggingface.co/BAAI>Newsgroups: alt.freeweights.embedSubject:

LLARA-passage

Date: 2026-11-15Commit: c378214Signed: 2DC28CC7B26A283B ✓

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

6.7B params27.0GBLLARA-passagesafetensorspermissive
FactsParams6.7BSize27.0 GBFormatssafetensorsTasksentence similarityLicenseMITFrom sourcepermissive
$ fw get BAAI/LLARA-passage
# manifest sha256 bd8fbda14aac… · 27.0 GB · 16 files
$ fw verify ./LLARA-passage BAAI/LLARA-passage
From sourceHosted (signed)BAAI/LLARA-passageLast 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 c378214. 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-passage')
model = AutoModel.from_pretrained('BAAI/LLARA-passage')

# 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.30 KB611af51e960307f29589e932ab9cdf3c0ea586d9e3810548ff41bae7ce32b588
added_tokens.json282 B016b6142839687bc01faf22cadb0852447d9cfb2017e438c57e89276f49cadc9
config.json674 B0fff35afbb9bf0ea36e209dd463ebcb408be15960ffebc062c4a6849f80b1eb0
generation_config.json183 Be6a8b31d1455428bdbaec7a67be677f1a262c47e859eb35c7229957f118751da
model-00001-of-00006.safetensors4.84 GB08917b721eff50cddced8431c3e19070e9dfde0228105825f09104076f10cd80
model-00002-of-00006.safetensors4.86 GBbe4d340703f74d57cf0afb718e8bbd4ae2f010f4321d048bb2e79d3c10834de3
model-00003-of-00006.safetensors4.86 GB100f2466b2cd63a722c4a1b642c036b3af8325d395083f32b05525209889a010
model-00004-of-00006.safetensors4.86 GBa9b9f5252a0569f38ad26bc110e672f0827ce8c6bb45badec485baf56cd9f300
model-00005-of-00006.safetensors4.86 GB83ecd44ddee1707ce039f420098f1362347d36cbb900da6d49483fb1d30c5e74
model-00006-of-00006.safetensors2.68 GB28270f4fbbce5af5e2b4a2a2a09ad60f4dc321e7c641675bef21ec5e91dce46a
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
c37821475a pinned now2026-11-15 04:14 UTC16 files · 27.0 GB

Use it

$ fw get BAAI/LLARA-passage
# manifest sha256 bd8fbda14aac… · 27.0 GB · 16 files
$ fw verify ./LLARA-passage BAAI/LLARA-passage
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/BAAI/LLARA-passage.json --dir ./LLARA-passage $ python3 fw.py verify ./LLARA-passage ./BAAI__LLARA-passage.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download BAAI/LLARA-passage --revision c37821475a9c93aedde1d5a16fdcab7eb1a7baf4 --local-dir ./LLARA-passage
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-passage", revision="c37821475a9c93aedde1d5a16fdcab7eb1a7baf4") model = AutoModel.from_pretrained("BAAI/LLARA-passage", revision="c37821475a9c93aedde1d5a16fdcab7eb1a7baf4", 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
611af51e960307f29589e932ab9cdf3c0ea586d9e3810548ff41bae7ce32b588
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-passageDate: 2026-11-15Commit: c378214Signed: 2DC28CC7B26A283B ✓
Upstream
BAAI/LLARA-passage
Pinned commit
c37821475a9c93aedde1d5a16fdcab7eb1a7baf4
Manifest
LLARA-passage.json · .minisig
Manifest sha256
bd8fbda14aaca4f91906e74924b50bd4d32ca9ab6daac4b8679bfe223e548c8f
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-passage.json $ curl -O https://freeweights.allternit.com/manifests/BAAI/LLARA-passage.json.minisig $ minisign -Vm LLARA-passage.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-passage
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. LLARA-passage.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