/ Модель

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

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

zefiro-7b-sft-ITA

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

Итальянская чат-модель семейства Mistral с 7,1 млрд параметров для генерации диалоговых ответов и создания специализированных разговорных приложений.

27скачиваний за 30 дней0лайковвеса обновлены21 фев 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Zefiro-7b-sft-ITA — модель с 7,1 млрд параметров, разработанная giux78 для проекта MII Community и дообученная методом SFT для общения на итальянском языке. Это плотная авторегрессионная модель семейства Mistral, созданная на основе mistralai/Mistral-7B-v0.1 с применением подходов Zephyr и Alignment Handbook; в README также упоминается влияние работы над Llamantino. Модель поддерживает генерацию текста и рассчитана на контекст до 32 768 токенов.

Модель предназначена для диалогов на итальянском языке и может служить основой для более специализированных разговорных приложений. Для обучения использовался отфильтрованный набор UltraChat-ITA, переведённый вариант UltraChat с синтетическими диалогами. Лицензия — Apache 2.0.

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

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

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

Ограничения

Модель не проходила RLHF-выравнивание по человеческим предпочтениям и может выдавать проблемные ответы. Перевод обучающих данных мог внести ошибки в синтаксис и смысл.

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

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

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

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

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

Открыть на Hugging Face

Model Card for zefiro-7b-sft-ITA

Last Update: 20/02/2024

Zefiro is a SFT fine tuned model for the Italian language based on Zefiro-base-7b-ita . To create a set of open source models and datasets suited for italian language is the aim of the project and this is the first experiment. The model can be used as base model for more specific conversationl tasks for Italian language

Model Details

Zefiro is a porting of the Zephyr model to the italian language using the wonderful recipes from alignment-handbook . It has also taken ispiration and insights from the Llamantino model developed by Università di Bari. For the implementation we combined different approaches from the two models mentioned but also from the wondeful communtity of open source.

Model description

Code

I followed the alingnment handbook from HuggingfaceH4 team , I just changed the base model and some parameters

Computation

It has been trained on two A100 from seeweb.it who sponsered the training. I strongly suggest is one of the cheapest and solid GPUs provider.

Evaluations:

ModelArc-cHellaSMMULAVG
Mixtral 7x852.875.170.966.26666667
LLama2 70b49.470.965.161.8
zefiro-dpo-7b52.6967.0950.856.86
zefiro-base-7b51.0763.4752.9755.83666667
zefiro-sft-7b50.9862.7151.9655.21666667
LLama1 34B42.965.449.052.43333333

Intended uses & limitations

The model was initially fine-tuned on a filtered and preprocessed version of UltraChat-ITA that is a filtered version of the UltraChat dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT.

Here's how you can run the model using Transformers from 🤗 :

# Install transformers from source - only needed for versions <= v4.34
# pip install git+https://github.com/huggingface/transformers.git
# pip install accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "mii-community/zefiro-7b-sft-ITA"
model = AutoModelForCausalLM.from_pretrained(model_id)
model.to('cuda')
tokenizer = AutoTokenizer.from_pretrained(model_id, padding_side="left")


sys_prompt = "Sei un assistente disponibile, rispettoso e onesto. " \
         "Rispondi sempre nel modo piu' utile possibile, pur essendo sicuro. " \
         "Le risposte non devono includere contenuti dannosi, non etici, razzisti, sessisti, tossici, pericolosi o illegali. " \
         "Assicurati che le tue risposte siano socialmente imparziali e positive. " \
         "Se una domanda non ha senso o non e' coerente con i fatti, spiegane il motivo invece di rispondere in modo non corretto. " \
         "Se non conosci la risposta a una domanda, non condividere informazioni false."

messages = [{ 'content' : sys_prompt, 'role' : 'assistant'}, 
            {'content' : 'Crea una lista su cosa mangiare a pranzo ogni giorno della settimana a pranzo e cena', 'role' : 'user'}]


def generate_text(sys_prompt, user_prompt):
    messages = [{ 'content' : sys_prompt, 'role' : 'assistant'}, 
            {'content' : user_prompt, 'role' : 'user'}]
    prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
    model_inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
    generated_ids = model.generate(**model_inputs, max_new_tokens=1024)
    return tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]


generate_text(sys_prompt, 'cosa ne pensi della politica italiana?')

Bias, Risks, and Limitations

Zefiro-7b-sft-ITA has not been aligned to human preferences for safety within the RLHF phase or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). It is also unknown what the size and composition of the corpus was used to train the base model (mistralai/Mistral-7B-v0.1), however it is likely to have included a mix of Web data and technical sources like books and code. See the Falcon 180B model card for an example of this.

Training Data

We used UltraChat-ITA as training data that is a filtered version of the UltraChat. For translating the dataset we combined different tools and API we are also evaluating the best approach for translating many more datasets. We have seen that the translation phase is critical and can introduce incorrect syntax and semantics.

Summary

Zefiro-7b-beta-ITA-v0.1 is finetuned version of mistral-7b using the zephyr approach for the italian language.

Citation

@misc{tunstall2023zephyr,
      title={Zephyr: Direct Distillation of LM Alignment}, 
      author={Lewis Tunstall and Edward Beeching and Nathan Lambert and Nazneen Rajani and Kashif Rasul and Younes Belkada and Shengyi Huang and Leandro von Werra and Clémentine Fourrier and Nathan Habib and Nathan Sarrazin and Omar Sanseviero and Alexander M. Rush and Thomas Wolf},
      year={2023},
      eprint={2310.16944},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

@misc{basile2023llamantino,
      title={LLaMAntino: LLaMA 2 Models for Effective Text Generation in Italian Language}, 
      author={Pierpaolo Basile and Elio Musacchio and Marco Polignano and Lucia Siciliani and Giuseppe Fiameni and Giovanni Semeraro},
      year={2023},
      eprint={2312.09993},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Model Card Authors

giux78

Model Card Contact

**ale.ercolani@gmail.com

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей