/ Модель

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

Контекст
8 192 токена
Параметры
7,5 млрд
Размер весов
16,1 ГБ
Лицензия
MIT
Архитектура
llama · dense
Базовая модель
Meta-Llama-3-8B
Библиотека
transformers
Опубликована
24 фев 2025

USP

Генерация текстаТекст → текст3 профессии

USP — дообученная на базе LLaMA 3 8B модель для симуляции профилированных пользователей в многоходовых диалогах с LLM.

56скачиваний за 30 дней2лайкавеса обновлены13 мар 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

USP (User Simulator with Implicit Profiles) — модель-симулятор пользователей, разработанная авторами проекта USP. Она генерирует реалистичные реплики в диалогах с большими языковыми моделями, воспроизводя различное поведение пользователей на основе заданных профилей. Модель построена на архитектуре LLaMA 3 8B и дообучена методами Conditional Supervised Fine-Tuning и Reinforcement Learning with Cycle Consistency.

USP предназначена для создания многоходовых диалоговых сценариев и оценки поведения LLM в симулированных взаимодействиях. Это плотная авторегрессионная языковая модель с 7,5 млрд параметров; метаданные указывают контекст до 8192 токенов, тогда как README рекомендует ограничивать вход 4096 токенами во избежание ухудшения качества. Модель оптимизирована для английского языка; качество на других языках может быть нестабильным. Лицензия — MIT.

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

  • генерация реплик пользователя для симуляции диалогов с LLM
  • создание многоходовых диалогов для оценки чат-ботов
  • воспроизведение разных стилей поведения пользователей по заданным профилям

Ограничения

Модель оптимизирована для английского языка, и качество на других языках может варьироваться. README рекомендует не превышать 4096 токенов, хотя метаданные указывают нативный контекст 8192 токена.

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

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

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

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

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

Открыть на Hugging Face

User Simulator Model

Overview

GitHub repository for exploring the source code and additional resources: https://github.com/wangkevin02/USP

Our User Simulator with Implicit Profiles (USP) replicates human-like conversational behavior in interactions with large language models (LLMs). By emulating diverse user dynamics based on predefined profiles, it reconstructs realistic user-LLM dialogues, leveraging the LLaMA-3-base-8B architecture with Conditional Supervised Fine-Tuning (SFT) and Reinforcement Learning with Cycle Consistency (RLCC). For a detailed methodology and insights, refer to Our Paper.

Note: Our model is subject to the following constraints:

  1. Maximum Context Length: Supports up to 4,096 tokens. Exceeding this may degrade performance; keep inputs within this limit for best results.

  2. Language Limitation: Optimized for English. Non-English performance may vary due to limited training data.

Sample Implementation

Below is a concise example of using the User Simulator to generate user utterances, ideal for recreating scenarios or evaluating multi-turn dialogues based on specific profiles.

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
# Define the model path
model_path = "/your/path/to/USP"  

# Initialize tokenizer with specific configurations
tokenizer = AutoTokenizer.from_pretrained(model_path, padding_side="left", trust_remote_code=True)
tokenizer.pad_token = tokenizer.eos_token

# Define model configuration
model_config = {
    "pretrained_model_name_or_path": model_path,
    "trust_remote_code": True,
    "torch_dtype": torch.bfloat16,
    "device_map": "cuda",
    "attn_implementation": "flash_attention_2"
}

# Load the pre-trained model with specified configurations
model = AutoModelForCausalLM.from_pretrained(**model_config)
model.eval()

# Define conversation messages
user_profile = """
You have a knack for planning exciting adventures, particularly when it comes to exploring new destinations on a budget. Your current focus is on organizing a cost-effective vacation to a warm, beach-filled location. You're actively seeking recommendations for such a getaway, with a particular interest in places like Phuket, Thailand. You're keen on discovering the must-visit spots in Phuket without breaking the bank, and you're looking for advice on how to make the most of your trip within your budget constraints. Your love for travel is evident in your habit of meticulously planning vacations in advance, ensuring you maximize both the experience and the value for money.

Your personality shines through in your conscientious approach to planning, where every detail is considered and nothing is left to chance. You're open-minded and adventurous, always eager to dive into new experiences and embrace what each destination has to offer. Your inquisitive nature means you're always asking questions, seeking out the best advice to enhance your journeys. You communicate with an informal and friendly style, making it easy for others to share their knowledge and insights with you. This combination of traits makes you not only a savvy traveler but also a delightful companion on any adventure.
""".strip()
messages = [
        [
     {"role": "system", "content": f"You are engaging in a conversation with an AI assistant. Your profile is: 
{user_profile}
 You can say anything you want, either based on the profile or something brand new.

"},
     ],
    [
     {"role": "system", "content": f"You are engaging in a conversation with an AI assistant. Your profile is: 
{user_profile}
 You can say anything you want, either based on the profile or something brand new.

"},
     {"role": "user", "content": "I want to go on vacation to a warm place. Do you have any recommendations?"},
     {"role": "assistant", "content": "Sure! If you like beaches, Maldives or Bali are great options. If you're into culture, consider Tuscany in Italy or Santorini in Greece. Which type of destination do you prefer?"},
     ]

]


def generated_user_utt(msgs, model, tokenizer):
    with torch.no_grad():
        input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
        inputs = tokenizer.batch_encode_plus(input_text, return_tensors="pt", truncation=True, padding=True, max_length=4096).to(model.device)
        input_ids = inputs["input_ids"]
        outputs = model.generate(
            **inputs, 
            pad_token_id=tokenizer.eos_token_id,
            eos_token_id=tokenizer.eos_token_id,
            max_new_tokens=4096, 
            repetition_penalty=1.2)
        generated_ids = [
            output[len(input_):] 
            for input_, output in zip(input_ids, outputs)
        ]
        response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
    return response 

# Generate responses for the provided messages
responses = generated_user_utt(messages, model, tokenizer)
print(f"Generated response: {responses}")

# >>> Expected Output:
# >>> ['I am thinking about going away for vacation', 'How about phucket thailand']
# >>> The first output initiates a topic based on the system-defined user profile.
# >>> The second output extends the conversation based on the given profile and context to mimic the user's behavior.

Citation

If you find this model useful, please cite:

@misc{wang2025knowbettermodelinghumanlike,
      title={Know You First and Be You Better: Modeling Human-Like User Simulators via Implicit Profiles}, 
      author={Kuang Wang and Xianfei Li and Shenghao Yang and Li Zhou and Feng Jiang and Haizhou Li},
      year={2025},
      eprint={2502.18968},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2502.18968}, 
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
69e4659

0 моделей