alt.freeweights.embed / F2LLM-v2-160M-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.embedSubject:

F2LLM-v2-160M-ONNX

Date: 2026-11-15Commit: 7202b3cSigned: 2DC28CC7B26A283B ✓

Feature extraction model. Onnx weights, 2.54 GB in all. Published by onnx-community under Apache-2.0.

embed2.54GBF2LLM-v2-160M-ONNXonnxpermissive
FactsParamsnot statedSize2.54 GBFormatsonnxTaskfeature extractionLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/F2LLM-v2-160M-ONNX
# manifest sha256 84e0bce8e04d… · 2.54 GB · 18 files
$ fw verify ./F2LLM-v2-160M-ONNX onnx-community/F2LLM-v2-160M-ONNX
From sourceHosted (signed)onnx-community/F2LLM-v2-160M-ONNXLast check: 2026-11-15 05:22 UTC

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

Quantized of F2LLM-v2-160M.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Evaluate with

Scan with

Overview

Size
2.54 GB
Weights
160 MB (smallest of 8 ONNX variants)
Parameters
not stated
Formats
onnx
Task
feature extraction
License
Apache-2.0 (permissive)
Files
18, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Base model: codefuse-ai/F2LLM-v2-160M

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 05:22 UTCpassed

Model card

From the publisher at commit 7202b3c. Shown as plain text with links; images open at the publisher.

F2LLM-v2-160M (ONNX)#

This is an ONNX version of codefuse-ai/F2LLM-v2-160M. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js#

See the pipeline documentation for feature-extraction: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.FeatureExtractionPipeline


F2LLM-v2-160M#

F2LLM-v2 is a family of general-purpose, multilingual embedding models in 8 distinct sizes ranging from 80M to 14B. Trained on a curated composite of 60 million publicly available high-quality data, F2LLM-v2 supports more than 200 languages, with a particular emphasis on previously underserved mid- and low-resource languages.

F2LLM-v2 is fully open. We release base models in 5 sizes, instruct models in 8 sizes, the training data, the training code, and intermediate checkpoints. The three smallest instruct models are pruned and trained from the 0.6B base model.

Usage#

With Sentence Transformers#

To encode text with the Sentence Transformers library:

from sentence_transformers import SentenceTransformer
model = SentenceTransformer("codefuse-ai/F2LLM-v2-160M", device="cuda:0", model_kwargs={"torch_dtype": "bfloat16"})
# Some sample query and documents
query = "What is F2LLM used for?"
documents = [
    'We present F2LLM, a family of fully open embedding LLMs that achieve a strong balance between model size, training data, and embedding performance.',
    'F2LLM is a model for computing text embeddings that can be used for various NLP tasks such as information retrieval, semantic search, and text classification.',
    'F2LLM 是 CodeFuse 开源的系列嵌入模型。',
    'F2LLM — это модель вычисления встраивания текста, которую можно использовать для различных задач НЛП, таких как поиск информации, семантический поиск и классификация текста.'
]
# Encode the query and documents separately. The encode_query method uses the query prompt
query_embedding = model.encode_query(query)
document_embeddings = model.encode_document(documents)
print(query_embedding.shape, document_embeddings.shape)
# (640,) (4, 640)
# Compute cosine similarity between the query and documents
similarity = model.similarity(query_embedding, document_embeddings)
print(similarity)
# tensor([[0.6373, 0.7239, 0.6302, 0.7509]])
With Transformers#

Or directly with the Transformers library:

from transformers import AutoModel, AutoTokenizer
import torch
import torch.nn.functional as F
model_path = "codefuse-ai/F2LLM-v2-160M"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModel.from_pretrained(model_path, torch_dtype=torch.bfloat16, device_map={'': 0})
query = "What is F2LLM used for?"
query_prompt = "Instruct: Given a question, retrieve passages that can help answer the question.\nQuery: "
documents = [
    'We present F2LLM, a family of fully open embedding LLMs that achieve a strong balance between model size, training data, and embedding performance.',
    'F2LLM is a model for computing text embeddings that can be used for various NLP tasks such as information retrieval, semantic search, and text classification.',
    'F2LLM 是 CodeFuse 开源的系列嵌入模型。',
    'F2LLM — это модель вычисления встраивания текста, которую можно использовать для различных задач НЛП, таких как поиск информации, семантический поиск и классификация текста.'
]
def encode(sentences):
    batch_size = len(sentences)
    # the tokenizer will automatically add eos token
    tokenized_inputs = tokenizer(sentences, padding=True, return_tensors='pt').to(model.device)
    last_hidden_state = model(**tokenized_inputs).last_hidden_state
    eos_positions = tokenized_inputs.attention_mask.sum(dim=1) - 1
    embeddings = last_hidden_state[torch.arange(batch_size, device=model.device), eos_positions]
    embeddings = F.normalize(embeddings, p=2, dim=1)
    return embeddings
# Encode the query and documents
query_embedding = encode([query_prompt + query])
document_embeddings = encode(documents)
print(query_embedding.shape, document_embeddings.shape)
# torch.Size([1, 640]) torch.Size([4, 640])
# Compute cosine similarity between the query and documents
similarity = query_embedding @ document_embeddings.T
print(similarity)
# tensor([[0.6367, 0.7227, 0.6328, 0.7500]], device='cuda:0',
#        dtype=torch.bfloat16, grad_fn=<MmBackward0>)
Prompts#

The model supports custom instructions in the following format:

Instruct: your_instruction
Query:

In general, for retrieval and reranking tasks:

  • use the prompt for queries
  • do not prepend the prompt to documents/passages

For symmetric tasks such as STS, clustering, and bitext mining, you can encode the documents either with or without prompts. The model is trained to support both scenarios.

Intermediate Checkpoints#

To facilitate future research, we release intermediate checkpoints in the intermediate_checkpoints branch.

Citation#

@misc{f2llm-v2,
      title={F2LLM-v2: Inclusive, Performant, and Efficient Embeddings for a Multilingual World}, 
      author={Ziyin Zhang and Zihan Liao and Hang Yu and Peng Di and Rui Wang},
      year={2026},
      eprint={2603.19223},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2603.19223}, 
}

Files

18 files · 2.54 GBWeights 160 MB (smallest of 8 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 18 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md8.12 KBe1901cdaeb619a136dd3553a0b2173b7ecf77313b657ca542b9a704847426551
added_tokens.json707 Bc0284b582e14987fbd3d5a2cb2bd139084371ed9acbae488829a1c900833c680
chat_template.jinja4.17 KBa55ee1b1660128b7098723e0abcd92caa0788061051c62d51cbe87d9cf1974d8
config.json932 B60c9a032823af24e25cc0f209012f0af389f4e8f9e67fb2f512f6e5cc7d04954
merges.txt1.67 MB8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
onnx/model.onnx637 MBf724c53101dc84bf86a88dd52f36a1c4994950aa12166ca4d7d18e27eaebc948
onnx/model_bnb4.onnx428 MBb8e73b4d93ff3dff6aa905437666c9629cdc44a18672e7c9d1569b72ac5eb6bf
onnx/model_fp16.onnx319 MBab1476b938b6599f3a4ac206f7baf00bbdc781b2925c1448fc30f2ea90094ed0
onnx/model_int8.onnx160 MB040e946127292da324f7100b50a6315ce7fdef5d2bf381a6c9b487369b54b38c
onnx/model_q4.onnx428 MBb8e73b4d93ff3dff6aa905437666c9629cdc44a18672e7c9d1569b72ac5eb6bf
onnx/model_q4f16.onnx230 MBbb2fea1a99723fc66a350e25a68d2f4057f6daea8f806c7227169273b064918a
onnx/model_quantized.onnx160 MB040e946127292da324f7100b50a6315ce7fdef5d2bf381a6c9b487369b54b38c
onnx/model_uint8.onnx160 MB97784eee805373dd17147757035a14d050d0a0de1ee431a7a7ff4cca6eb009b7
special_tokens_map.json613 B76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
tokenizer.json11.4 MB38360d5a512a43641b36d6fba2df87b8a3f5464c6b5c76f03e82d6d795175566
tokenizer_config.json5.40 KB443bfa629eb16387a12edbf92a76f6a6f10b2af3b53d87ba1550adfcf45f7fa0
vocab.json2.78 MBca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
7202b3cd72 pinned now2026-11-15 05:22 UTC18 files · 2.54 GB

Use it

$ fw get onnx-community/F2LLM-v2-160M-ONNX
# manifest sha256 84e0bce8e04d… · 2.54 GB · 18 files
$ fw verify ./F2LLM-v2-160M-ONNX onnx-community/F2LLM-v2-160M-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/F2LLM-v2-160M-ONNX.json --dir ./F2LLM-v2-160M-ONNX $ python3 fw.py verify ./F2LLM-v2-160M-ONNX ./onnx-community__F2LLM-v2-160M-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/F2LLM-v2-160M-ONNX --revision 7202b3cd72a7f11b4bea90d6c41b67423281360b --local-dir ./F2LLM-v2-160M-ONNX

License

Name
Apache License 2.0
Id
Apache-2.0
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
e1901cdaeb619a136dd3553a0b2173b7ecf77313b657ca542b9a704847426551
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: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.embedSubject: F2LLM-v2-160M-ONNXDate: 2026-11-15Commit: 7202b3cSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/F2LLM-v2-160M-ONNX
Pinned commit
7202b3cd72a7f11b4bea90d6c41b67423281360b
Manifest
F2LLM-v2-160M-ONNX.json · .minisig
Manifest sha256
84e0bce8e04d1e25385ef93b7258921bf20aa49c48a8f9d10f6417e3bc89e9d8
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:22 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/F2LLM-v2-160M-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/F2LLM-v2-160M-ONNX.json.minisig $ minisign -Vm F2LLM-v2-160M-ONNX.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

Parent

codefuse-ai/F2LLM-v2-160M · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/F2LLM-v2-160M-ONNX
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. F2LLM-v2-160M-ONNX.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