/ Модель

Характеристики

Контекст
8 194 токена
Параметры
659 млн
Архитектура
xlm-roberta · dense
Базовая модель
bge-m3
Библиотека
sentence-transformers
Опубликована
3 мар 2025

instruction_template_retrieval_embedding

ЭмбеддингиТекст → embedding8 профессий

Многоязычная модель эмбеддингов для семантического поиска шаблонов инструкций FineTemplates по документам и их фрагментам.

147скачиваний за 30 дней0лайковвеса обновлены30 янв 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

FineInstructions Instruction Template Retrieval Embedding — модель эмбеддингов для поиска шаблонов инструкций FineTemplates, разработанная в рамках проекта FineInstructions. Она сопоставляет документ или его фрагменты с подходящими шаблонами инструкций; благодаря симметричному поиску также подходит для поиска документов по описанию документа, совместимого с шаблоном.

Модель дообучена на синтетических данных с помощью DataDreamer на базе BAAI/bge-m3. Это плотная модель семейства XLM-RoBERTa с 658,7 млн параметров, рассчитанная на контекст до 8194 токенов. Она создаёт текстовые эмбеддинги для семантического поиска и сравнения сходства предложений; заявлена библиотека Sentence Transformers, веса доступны в формате safetensors.

Подходит для поиска шаблонов по целым документам и их разделам, а также для обратного поиска документов по описанию шаблона. README не сообщает конкретный перечень языков и лицензию, поэтому их условия здесь не уточняются.

Сценарии применения

  • поиск подходящего шаблона инструкции по целому документу
  • поиск шаблонов по отдельным разделам документа
  • поиск документов по описанию, совместимому с шаблоном инструкции
  • ранжирование фрагментов и шаблонов по семантическому сходству

Ограничения

README не приводит оценки качества и перечень поддерживаемых языков. Лицензия в предоставленных данных не указана.

Для каких профессий подходит8

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

FineInstructionsCoverImage

✨ Note: For all FineInstructions resources please visit: https://huggingface.co/fineinstructions


Given a document, this retrieval embedding model helps retrieve instruction templates from FineTemplates relevant to various chunks / sections of a document or an entire document.

Note: This retrieval embedding is symmetric, so it can also be used to retrieve relevant documents to a compatible_document_description of an instruction template.

Requirements

datasets
faiss
huggingface_hub
numpy
pandas
sentence_transformers

Simple Usage Example

import importlib
import json
from huggingface_hub import hf_hub_download


def download_and_import_module(module_name, variable):
    module = importlib.util.module_from_spec(
        importlib.util.spec_from_file_location(
            module_name,
            hf_hub_download(
                repo_id="fineinstructions/instruction_template_retrieval_embedding",
                filename=f"{module_name}.py",
            ),
        )
    )
    module.__spec__.loader.exec_module(module)
    return getattr(module, variable)


# Import the retriever helper class
InstructionTemplateRetriever = download_and_import_module("instruction_template_retriever", "InstructionTemplateRetriever")

# Prepare an example document
EXAMPLE_DOC = """
Title: Surprising Facts about Pigeons
Submitted On: September 24, 2008

Fact 1:
During World War I, a homing pigeon named Cher Ami played a critical role in saving nearly 200 soldiers who were trapped behind enemy lines.
Despite being injured by enemy fire, Cher Ami managed to deliver a crucial message that led to their rescue. For this act of bravery, the 
French government awarded the pigeon the Croix de Guerre, a military medal of honor. Cher Ami became a symbol of courage and the extraordinary
utility of pigeons in wartime communication.

Fact 2:
Pigeons possess impressive cognitive abilities, one of the most surprising being their capacity for self-recognition in mirrors. This
trait is rare in the animal kingdom and is often considered a marker of higher intelligence. Experiments have shown that pigeons can distinguish
themselves from other birds when looking into a mirror, suggesting a level of self-awareness previously thought to be unique to primates and a
few other animals.

Fact 3:
Thanks to centuries of selective breeding, there are now more than 300 recognized breeds of domestic pigeon. These range from show pigeons with
elaborate feather patterns and head crests to performance breeds used in tumbling and racing. The sheer variety reflects the bird’s long history
as a companion species to humans.

Fact 4:
The Ancient Romans were known for their elaborate grooming rituals, and pigeons played an unexpected role in their beauty routines. Specifically,
they used pigeon droppings as a bleaching agent to style and lighten their hair. This unusual practice was part of the broader Roman obsession with
fashion and appearance, demonstrating how even the most unexpected materials found a place in early cosmetic treatments.
"""


# Retrieve relevant instruction templates to different chunks / sections of a document
retriever = InstructionTemplateRetriever(
    coverage_chunks=4, sigma=0.05, alpha=1.0    # Ensure instruction templates cover information in the document with 4 chunks/sections
)
print(json.dumps(retriever.search(document=EXAMPLE_DOC), indent=4))

# ******************************************************
# Retrieval results look like:
# ******************************************************

# Instruction Templates for Entire Document:
#    - "What's something <fi>a few word description of something remarkable or noteworthy</fi> you can tell me"

# Instruction Templates for Chunk 1/4 of the Document:
#    - "write a <fi>a few word description of the type of message</fi> for <fi>a significant achievement or milestone</fi>"

# Instruction Templates for Chunk 2/4 of the Document:
#    - "how are <fi>a type of organism or entity</fi> so <fi>exceptionally strong or notable in some way</fi>?"

# Instruction Templates for Chunk 3/4 of the Document:
#    - "what are the common <fi>a type of organism, creature, or entity</fi>?"

# Instruction Templates for Chunk 4/4 of the Document:
#    - "how did <fi>a group of people</fi> <fi>perform a common practice or activity</fi>"

# ******************************************************
# Increasing diversity:
# -----------------------
# You can increase diversity using the `reweight` parameter
# to increase diversity in instruction length like so:
# `print(json.dumps(retriever.search(document=EXAMPLE_DOC, reweight=True), indent=4))`
# ******************************************************

# ******************************************************
# Documentation:
# -----------------------
# You can read the full documentation of the `InstructionTemplateRetriever.search` method:
# by opening/reading the instruction_template_retriever.py file here:
# https://huggingface.co/fineinstructions/instruction_template_retrieval_embedding/tree/main
# ******************************************************

This model was trained with a synthetic dataset with DataDreamer 🤖💤. The synthetic dataset card and model card can be found here. The training arguments can be found here.


If you use this project in your research please cite:

@article{patel2026fineinstructions,
  title={FineInstructions: Scaling Synthetic Instructions to Pre-Training Scale},
  author={Patel, Ajay and Raffel, Colin and Callison-Burch, Chris},
  journal={arXiv preprint arXiv:2601.22146},
  year={2026},
  archivePrefix={arXiv},
  primaryClass={cs.CL},
  doi={10.48550/arXiv.2601.22146}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
XLMRobertaModel
Ревизия весов
e528b0b

0 моделей