Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
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"defget_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])
defnormalize(vectors):
vectors = np.atleast_2d(vectors)
norms = np.linalg.norm(vectors, axis=1, keepdims=True)
norms[norms == 0] = 1.0return vectors / norms
defcosine_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())
FRIDA-GGUF huggingface.co is an AI model on huggingface.co that provides FRIDA-GGUF's model effect (), which can be used instantly with this evilfreelancer FRIDA-GGUF model. huggingface.co supports a free trial of the FRIDA-GGUF model, and also provides paid use of the FRIDA-GGUF. Support call FRIDA-GGUF model through api, including Node.js, Python, http.
FRIDA-GGUF huggingface.co is an online trial and call api platform, which integrates FRIDA-GGUF's modeling effects, including api services, and provides a free online trial of FRIDA-GGUF, you can try FRIDA-GGUF online for free by clicking the link below.
evilfreelancer FRIDA-GGUF online free url in huggingface.co:
FRIDA-GGUF is an open source model from GitHub that offers a free installation service, and any user can find FRIDA-GGUF on GitHub to install. At the same time, huggingface.co provides the effect of FRIDA-GGUF install, users can directly use FRIDA-GGUF installed effect in huggingface.co for debugging and trial. It also supports api for free installation.