/ Модель

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

Контекст
32 768 токенов
Параметры
7,1 млрд
Размер весов
14,5 ГБ
Лицензия
Apache 2.0
Архитектура
mistral · dense
Базовая модель
OpenHermes-2.5-Mistral-7B
Библиотека
Bunkatopics
Опубликована
12 янв 2024

TopicNeuralHermes-2.5-Mistral-7B

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

Диалоговая модель Mistral с 7,1 млрд параметров, дообученная на тематически отобранных данных DPO для генерации текста и ответов на общие вопросы.

32скачиваний за 30 дней6лайковвеса обновлены20 янв 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

TopicNeuralHermes 2.5 Mistral 7B — диалоговая языковая модель на архитектуре Mistral с 7,1 млрд параметров, созданная дообучением teknium/OpenHermes-2.5-Mistral-7B. Разработчик отобрал подмножество данных DPO с помощью тематического моделирования: в обучающую выборку вошли темы, обнаруженные в принятых ответах ChatGPT, но не в отклонённых ответах Llama. Для дообучения использовано около одной шестой исходных данных.

Модель предназначена для генерации текста и ответов в диалоге на разнообразные темы, включая общие знания, общественные и естественные науки, бизнес, образ жизни и анализ фильмов. Поддерживает контекст до 32 768 токенов; опубликована в формате safetensors и может запускаться через LM Studio и другие интерфейсы. Карточка не подтверждает, что модель специализирована на перечисленных темах или превосходит базовую модель. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

image/png

Model description

TopicNeuralHermes 2.5 Mistral 7B is a refined model developed through fine-tuning with a specific subset of data, selected via Topic Modeling Techniques using Bunkatopics, as a continuing from OpenHermes 2.5.

The model was trained on a refined DPO dataset. The objective was to train the model on a small portion of the DPO data. To achieve this, we compared two datasets used to train the reward model: the rejected Llama answers and the accepted ChatGPT answers from the DPO dataset. We then conducted topic modeling on both datasets, keeping only the topics that existed in the accepted dataset but not in the rejected one. Our hypothesis is that these topics encapsulate the main differences between the two answering styles.

This method allows for quicker convergence with significantly less data (around 1/6 of the initial dataset). The Dataset can be found at bunkalab/topic_based_chatml_dpo_pairs

Special thanks to mlabonne for creating the colab notebook that facilitated the DPO Strategy.

Results of the model can be found here: We do as well as similar models with way less data and computing power :)

image/png

Topic Analysis

We applied the topic modeling method to both datasets, extracting 30 topics from each. These topics were characterized using the 10 most specific unigrams or bigrams. We then compared the two sets of topics (30 from each dataset) and retained those in the accepted dataset that shared fewer than 2 terms with any topic in the rejected dataset

We found the 13 distinctive following topics described by 10 terms each:

Emotional Dynamics: feelings, Quinn, Austin, minority women, teaching, schools, individual, personality, backgrounds, triggers.

Global Knowledge Queries: question, information, geography, news articles, Step, answer, capital city, pipeline system, country, analogy.

Digital Interactions and Queries: questions, question, PersonX, modem, answers, effect relationship, Quora, browser, answer, e-commerce.

Business and Cybersecurity: email, businesses, initiatives, innovation, advertising papers, spam, breaches, antivirus, payments, prospects.

Lifestyle and Wellness: sleep, exercise, gifts, shopping, Casey, stores, stress, headaches, options, mood.

Wildlife Ecology: birds, prey, animals, species, infection, nest, eggs, bacteria, insects, kitty condo.

Environmental Science and Climate: temperature, gases, greenhouse, emissions, perturbation, sulfur, dioxide, climate change, water, heat.

Maritime and Mechanical Engineering: ship, bowling, propulsion, beam width, Filing cabinet, LED, lane, containment area, lawnmower, rotors.

Cultural and Social Dynamics: Lindsey, museum, Kate, Rachel, Jason, Alex, Erin, conversation, Laura, exhibits.

Political Media Analysis: media platforms, election, politics, teenagers, elections, White House, Barack Obama, nation, Confederate, depression.

International Relations and Policy: cooperation, EU, nations, alliance, NATO, European Union, member states, policy, monarch, Brexit.

Astrophysics and Physical Sciences: electrons, km, Moon, acceleration, orbit, friction, current, asteroid, electron, collector emitter.

Film Critique and Analysis: movie review, film, reviewer, sentiment, critic, flaws, DVD, plot, opinion, originality.

While those topics are not domain-specific, they did not appear right away in the rejected dataset. Further research need to undersand the reason behind the prominence of those topics in the accepted dataset.

Usage

You can run this model using LM Studio or any other frontend.

You can also run this model using the following code:

import transformers
from transformers import AutoTokenizer

# Format prompt
message = [
    {"role": "system", "content": "You are a helpful assistant chatbot."},
    {"role": "user", "content": "What is Topic Modeling?"}
]
tokenizer = AutoTokenizer.from_pretrained('charlesdedampierre/TopicNeuralHermes-2.5-Mistral-7B')
prompt = tokenizer.apply_chat_template(message, add_generation_prompt=True, tokenize=False)

# Create pipeline
pipeline = transformers.pipeline(
    "text-generation",
    model='charlesdedampierre/TopicNeuralHermes-2.5-Mistral-7B',
    tokenizer=tokenizer
)

# Generate text
sequences = pipeline(
    prompt,
    do_sample=True,
    temperature=0.7,
    top_p=0.9,
    num_return_sequences=1,
    max_length=200,
)
print(sequences[0]['generated_text'])

Training hyperparameters

LoRA:

  • r=16
  • lora_alpha=16
  • lora_dropout=0.05
  • bias="none"
  • task_type="CAUSAL_LM"
  • target_modules=['k_proj', 'gate_proj', 'v_proj', 'up_proj', 'q_proj', 'o_proj', 'down_proj']

Training arguments:

  • per_device_train_batch_size=4
  • gradient_accumulation_steps=4
  • gradient_checkpointing=True
  • learning_rate=5e-5
  • lr_scheduler_type="cosine"
  • max_steps=200
  • optim="paged_adamw_32bit"
  • warmup_steps=100

DPOTrainer:

  • beta=0.1
  • max_prompt_length=1024
  • max_length=1536

You can find the results of the running on Weights & Biases: https://wandb.ai/bunka/huggingface/runs/xq59p47g?workspace=user-charlesdedampierre

Model Family Tree

image/png

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
MistralForCausalLM
Ревизия весов
4bcb627

0 моделей