Model reference · open weights

F2LLM

Embeddings codefuse-ai Embeddings 8 builds Open weights 31k dl/mo

F2LLM is an open-weight embedding model from codefuse-ai. F2LLM-v2-4B (BF16) weighs 8.0 GB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • F2LLM-v2-14B is a 14.0B parameter multilingual embedding model developed by codefuse-ai for feature extraction tasks.
  • It supports more than 200 languages and has a context length of 40960 tokens.
  • The model is released under the apache-2.0 licence.

Summary of the codefuse-ai/F2LLM-v2-14B model card, 2026-10-01. The estimate below is for another build of the family.

What it is

Released bycodefuse-ai
Released2026-03-10
Parameters14.0B
VRAM8.0 GB for the weights

What it runs on

Memory and cards for F2LLM-v2-4B (BF16)

8.0 GBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
F2LLM-v2-14B ↗ 14.0BBF16 28.0 GBRTX 5090 32 GB
F2LLM-v2-80M ↗ 80MBF16 160 MBRTX 3060 12 GB
F2LLM-v2-0.6B ↗ 596MBF16 1.2 GBRTX 3060 12 GB
F2LLM-v2-1.7B ↗ 1.7BBF16 3.4 GBRTX 3060 12 GB
F2LLM-v2-330M ↗ 334MBF16 669 MBRTX 3060 12 GB
F2LLM-v2-4B (above) ↗ 4.0BBF16 8.0 GBRTX 3060 12 GB
F2LLM-v2-8B ↗ 7.6BBF16 15.1 GBRTX 4090 24 GB
F2LLM-v2-160M ↗ 159MBF16 318 MBRTX 3060 12 GB

From the model card

What codefuse-ai says about F2LLM

Read the model card

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.

ModelBaseInstruct
80M🤗F2LLM-v2-80M
160M🤗F2LLM-v2-160M
330M🤗F2LLM-v2-330M
0.6B🤗F2LLM-v2-0.6B-Preview🤗F2LLM-v2-0.6B
1.7B🤗F2LLM-v2-1.7B-Preview🤗F2LLM-v2-1.7B
4B🤗F2LLM-v2-4B-Preview🤗F2LLM-v2-4B
8B🤗F2LLM-v2-8B-Preview🤗F2LLM-v2-8B
14B🤗F2LLM-v2-14B-Preview🤗F2LLM-v2-14B

Performance

The F2LLM-v2 family set a new state-of-the-art on a wide range of MTEB benchmarks, including Code, European, Scandinavian, German, French, Spanish, Polish, Dutch, Japanese, Vietnamese, Thai, Indic, Persian, among others.

For details, refer to the MTEB leaderboard.

Usage

With Sentence Transformers

To encode text with the Sentence Transformers library:

from sentence_transformers import SentenceTransformer
model = SentenceTransformer("codefuse-ai/F2LLM-v2-14B", 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)
# (5120,) (4, 5120)
# Compute cosine similarity between the query and documents
similarity = model.similarity(query_embedding, document_embeddings)
print(similarity)
# tensor([[0.5773, 0.8323, 0.7229, 0.8062]])

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-14B"
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, 5120]) torch.Size([4, 5120])
# Compute cosine similarity between the query and documents
similarity = query_embedding @ document_embeddings.T
print(similarity)
# tensor([[0.5781, 0.8281, 0.7227, 0.8047]], device='cuda:1',
#        dtype=torch.bfloat16, gra

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms