Instructions to use seamon67/F2LLM-v2-1.7B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use seamon67/F2LLM-v2-1.7B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Use Docker
docker model run hf.co/seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
- LM Studio
- Jan
- Ollama
How to use seamon67/F2LLM-v2-1.7B-GGUF with Ollama:
ollama run hf.co/seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
- Unsloth Studio
How to use seamon67/F2LLM-v2-1.7B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for seamon67/F2LLM-v2-1.7B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for seamon67/F2LLM-v2-1.7B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for seamon67/F2LLM-v2-1.7B-GGUF to start chatting
- Pi
How to use seamon67/F2LLM-v2-1.7B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "seamon67/F2LLM-v2-1.7B-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use seamon67/F2LLM-v2-1.7B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "seamon67/F2LLM-v2-1.7B-GGUF:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use seamon67/F2LLM-v2-1.7B-GGUF with Docker Model Runner:
docker model run hf.co/seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
- Lemonade
How to use seamon67/F2LLM-v2-1.7B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Run and chat with the model
lemonade run user.F2LLM-v2-1.7B-GGUF-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use seamon67/F2LLM-v2-1.7B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default seamon67/F2LLM-v2-1.7B-GGUF:Q8_0
Run Hermes
hermes
- Atomic Chat
About
This model was converted to GGUF format from codefuse-ai/F2LLM-v2-1.7B using llama.cpp (release b10269). Refer to the original model card for more details on the model.
Original Model Card
F2LLM-v2-1.7B
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.
| Model | Base | Instruct |
|---|---|---|
| 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 |
Usage
With Sentence Transformers
To encode text with the Sentence Transformers library:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("codefuse-ai/F2LLM-v2-1.7B", 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)
# (2048,) (4, 2048)
# Compute cosine similarity between the query and documents
similarity = model.similarity(query_embedding, document_embeddings)
print(similarity)
# tensor([[0.6735, 0.8418, 0.7513, 0.8602]])
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-1.7B"
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, 2048]) torch.Size([4, 2048])
# Compute cosine similarity between the query and documents
similarity = query_embedding @ document_embeddings.T
print(similarity)
# tensor([[0.6797, 0.8477, 0.7539, 0.8633]], 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},
}
- Downloads last month
- -
8-bit
Model tree for seamon67/F2LLM-v2-1.7B-GGUF
Base model
Qwen/Qwen3-1.7B-Base