Instructions to use evilfreelancer/FRIDA-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use evilfreelancer/FRIDA-GGUF with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("evilfreelancer/FRIDA-GGUF") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use evilfreelancer/FRIDA-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="evilfreelancer/FRIDA-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("evilfreelancer/FRIDA-GGUF", dtype="auto") - llama-cpp-python
How to use evilfreelancer/FRIDA-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="evilfreelancer/FRIDA-GGUF", filename="FRIDA-bf16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use evilfreelancer/FRIDA-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf evilfreelancer/FRIDA-GGUF:BF16 # Run inference directly in the terminal: llama-cli -hf evilfreelancer/FRIDA-GGUF:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf evilfreelancer/FRIDA-GGUF:BF16 # Run inference directly in the terminal: llama-cli -hf evilfreelancer/FRIDA-GGUF:BF16
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 evilfreelancer/FRIDA-GGUF:BF16 # Run inference directly in the terminal: ./llama-cli -hf evilfreelancer/FRIDA-GGUF:BF16
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 evilfreelancer/FRIDA-GGUF:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf evilfreelancer/FRIDA-GGUF:BF16
Use Docker
docker model run hf.co/evilfreelancer/FRIDA-GGUF:BF16
- LM Studio
- Jan
- Ollama
How to use evilfreelancer/FRIDA-GGUF with Ollama:
ollama run hf.co/evilfreelancer/FRIDA-GGUF:BF16
- Unsloth Studio new
How to use evilfreelancer/FRIDA-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 evilfreelancer/FRIDA-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 evilfreelancer/FRIDA-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for evilfreelancer/FRIDA-GGUF to start chatting
- Docker Model Runner
How to use evilfreelancer/FRIDA-GGUF with Docker Model Runner:
docker model run hf.co/evilfreelancer/FRIDA-GGUF:BF16
- Lemonade
How to use evilfreelancer/FRIDA-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull evilfreelancer/FRIDA-GGUF:BF16
Run and chat with the model
lemonade run user.FRIDA-GGUF-BF16
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf evilfreelancer/FRIDA-GGUF:# Run inference directly in the terminal:
llama-cli -hf evilfreelancer/FRIDA-GGUF: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 evilfreelancer/FRIDA-GGUF:# Run inference directly in the terminal:
./llama-cli -hf evilfreelancer/FRIDA-GGUF: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 evilfreelancer/FRIDA-GGUF:# Run inference directly in the terminal:
./build/bin/llama-cli -hf evilfreelancer/FRIDA-GGUF:Use Docker
docker model run hf.co/evilfreelancer/FRIDA-GGUF:Model Card for FRIDA GGUF
FRIDA is a full-scale finetuned general text embedding model inspired by denoising architecture based on T5. The model is based on the encoder part of FRED-T5 model and continues research of text embedding models (ruMTEB, ru-en-RoSBERTa). It has been pre-trained on a Russian-English dataset and fine-tuned for improved performance on the target task.
For more model details please refer to our technical report [TODO].
Usage
The model can be used as is with prefixes. It is recommended to use CLS pooling. The choice of prefix and pooling depends on the task.
We use the following basic rules to choose a prefix:
"search_query: "and"search_document: "prefixes are for answer or relevant paragraph retrieval"paraphrase: "prefix is for symmetric paraphrasing related tasks (STS, paraphrase mining, deduplication)"categorize: "prefix is for asymmetric matching of document title and body (e.g. news, scientific papers, social posts)"categorize_sentiment: "prefix is for any tasks that rely on sentiment features (e.g. hate, toxic, emotion)"categorize_topic: "prefix is intended for tasks where you need to group texts by topic"categorize_entailment: "prefix is for textual entailment task (NLI)
To better tailor the model to your needs, you can fine-tune it with relevant high-quality Russian and English datasets.
Below are examples of texts encoding using the Transformers and SentenceTransformers libraries.
Ollama
ollama pull evilfreelancer/FRIDA:f16
import json
import requests
import numpy as np
OLLAMA_HOST = "http://localhost:11434"
MODEL_NAME = "evilfreelancer/FRIDA:f16"
def get_embedding(text):
payload = {
"model": MODEL_NAME,
"input": text
}
response = requests.post(
f"{OLLAMA_HOST}/api/embed",
data=json.dumps(payload, ensure_ascii=False),
headers={"Content-Type": "application/x-www-form-urlencoded"}
)
response.raise_for_status()
return np.array(response.json()["embeddings"][0])
def normalize(vectors):
vectors = np.atleast_2d(vectors)
norms = np.linalg.norm(vectors, axis=1, keepdims=True)
norms[norms == 0] = 1.0
return vectors / norms
def cosine_diag_similarity(a, b):
return np.sum(a * b, axis=1)
inputs = [
#
"paraphrase: В Ярославской области разрешили работу бань, но без посетителей",
"categorize_entailment: Женщину доставили в больницу за ее жизнь сейчас борются врачи.",
"search_query: Сколько программистов нужно, чтобы вкрутить лампочку?",
#
"paraphrase: Ярославским баням разрешили работать без посетителей",
"categorize_entailment: Женщину спасают врачи.",
"search_document: Чтобы вкрутить лампочку нужно три программиста.",
]
size = int(len(inputs)/2)
embeddings = normalize(np.array([get_embedding(text) for text in inputs]))
sim_scores = cosine_diag_similarity(embeddings[:size], embeddings[size:])
print(sim_scores.tolist())
Authors
- SaluteDevices AI for B2C RnD Team.
- Artem Snegirev: HF profile, Github;
- Anna Maksimova HF profile;
- Aleksandr Abramov: HF profile, Github, Kaggle Competitions Master
- Pavel Rykov: HF profile, Github - creator of GGUF version
Citation
@misc{TODO
}
Limitations
The model is designed to process texts in Russian, the quality in English is unknown. Maximum input text length is limited to 512 tokens.
- Downloads last month
- 288
1-bit
2-bit
8-bit
16-bit
32-bit
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf evilfreelancer/FRIDA-GGUF:# Run inference directly in the terminal: llama-cli -hf evilfreelancer/FRIDA-GGUF: