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

LLARA-document

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

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

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

# 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 KBe960888f3a27ce504114fafd1de83627df5cfefc8e15fa323e61b588ded63c77
added_tokens.json282 B016b6142839687bc01faf22cadb0852447d9cfb2017e438c57e89276f49cadc9
config.json675 B87144c83d54bda32bceeb6e595610d3013d31d9c1a1bb02cdd6e681a3db0658f
generation_config.json183 Be6a8b31d1455428bdbaec7a67be677f1a262c47e859eb35c7229957f118751da
model-00001-of-00006.safetensors4.84 GB7fe42c2d0e4edc77e245af12989d840ece8acc6846cd60b9b8112db191415401
model-00002-of-00006.safetensors4.86 GBcb42adf24404fd8c1ce48c739d07a796e883b861f82ea3082adb50d68601b051
model-00003-of-00006.safetensors4.86 GB77066a23f566c60c53939e445de01405092f5cf36f0dde9f4e7578a431c0eae1
model-00004-of-00006.safetensors4.86 GB0143744d1ee664494221af65d4f05e2dfa3d31955c62e062571552ff02ad8d45
model-00005-of-00006.safetensors4.86 GBb9b74b9d33a5df95205924c8f5d89ac66e5100db6da4abfdca4b79ea7ef4c54c
model-00006-of-00006.safetensors2.68 GB4c7ee40d360f005d92cb4816a5e98da39fabd187b1c714d0736eea9ea2af80fc
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
f03b549725 pinned now2026-11-15 04:14 UTC16 files · 27.0 GB

Use it

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

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

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