/ Модель

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

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

mistral_v1

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

Экспериментальная текстовая генеративная модель семейства Mistral для ответов на инструкции, суммаризации, извлечения информации и других языковых задач.

66скачиваний за 30 дней5лайковвеса обновлены4 мар 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

vikash06/mistral_v1 — текстовая генеративная модель семейства Mistral, представленная автором как модель для непосредственного использования. В README указано, что её экспериментально обучали на небольшом наборе данных, чтобы оценить влияние более длительного обучения на качество. В метаданных указаны 7,1 млрд параметров, архитектура MistralForCausalLM, контекст 32 768 токенов и формат safetensors.

Модель предназначена для генерации текста по инструкциям, включая творческое письмо, ответы на вопросы по предоставленному фрагменту и общим знаниям, суммаризацию, извлечение информации и классификацию. README сообщает о 1000 примерах для каждой категории и приводит результаты оценки на HellaSwag и AI2 Reasoning Challenge, но подробный технический отчёт обещан позднее.

Автор README описывает модель как дообученную на базе Llama 2, однако метаданные указывают архитектуру Mistral; точная связь с базовой моделью требует осторожной интерпретации. Модель распространяется по лицензии MIT. Обучение на небольшом экспериментальном наборе ограничивает основания ожидать стабильного качества на широком круге задач; подробностей о языках обучения и оценке в карточке нет.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

This model is trained on experimental basis on a small dataset to assess whether training longer on a smaller dataset has a good performance or not.

Model Details

vikash06/llama-2-7b-small-model--> Finetuned model on llama2

Uses

Creative Writing: Write a question or instruction that requires a creative, open-ended written response.

The instruction should be reasonable to ask of a person with general world knowledge and should not require searching. In this task, your prompt should give very specific instructions to follow. Constraints, instructions, guidelines, or requirements all work, and the more of them the better.

Closed QA: Write a question or instruction that requires factually correct response based on a passage of text from Wikipedia.

The question can be complex and can involve human-level reasoning capabilities, but should not require special knowledge. To create a question for this task include both the text of the question as well as the reference text in the form.

Open QA: Write a question that can be answered using general world knowledge or at most a single search.

This task asks for opinions and facts about the world at large and does not provide any reference text for consultation.

Summarization: Give a summary of a paragraph from Wikipedia.

Please don't ask questions that will require more than 3-5 minutes to answer. To create a question for this task include both the text of the question as well as the reference text in the form.

Information Extraction: These questions involve reading a paragraph from Wikipedia and extracting information from the passage.

Everything required to produce an answer (e.g. a list, keywords etc) should be included in the passages. To create a question for this task include both the text of the question as well as the reference text in the form.

Classification: These prompts contain lists or examples of entities to be classified, e.g. movie reviews, products, etc.

In this task the text or list of entities under consideration is contained in the prompt (e.g. there is no reference text.). You can choose any categories for classification you like, the more diverse the better.

Brainstorming: Think up lots of examples in response to a question asking to brainstorm ideas

Direct Use

The model is intnded for direct use

How to Get Started with the Model

import torch

import pandas as pd

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("vikash06/llama-2-7b-small-model")

model = AutoModelForCausalLM.from_pretrained("vikash06/llama-2-7b-small-model", torch_dtype=torch.float16, device_map="cuda:0")

print (model)

def generate_training_prompt(instruction,context):

return f"""
Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction: {instruction}

### Context:
{context.strip()}


""".strip()

data1 ={"instruction": "When was the first Reading railway station opened?", "context": "Reading railway station is a major transport hub in Reading, Berkshire, England. It is on the northern edge of the town centre, near the main retail and commercial areas and the River Thames, 36 miles (58 km) from London Paddington. The first Reading station was opened on 30 March 1840 as the temporary western terminus of the original line of the Great Western Railway (GWR). Reading is the ninth-busiest station in the UK outside London and the second busiest interchange station outside London with over 3.8 million passengers changing trains at the station annually.", "response": "The first Reading railway station was opened on the 30th of March, 1840.", "category": "closed_qa"}

prompt = generate_training_prompt(data1["instruction"],data1["context"])

input_ids = tokenizer(prompt, return_tensors="pt", truncation=True).input_ids.cuda(0)

outputs = model.generate(input_ids=input_ids, max_new_tokens=128, do_sample=True, top_p=0.9,temperature=0.3)

resp = tokenizer.batch_decode(outputs.detach().cpu().numpy(), skip_special_tokens=True)[0][len(prompt):].split("\n")

resp = [x for x in resp if x!='']

print(resp)

Training Data

1000 samples were carefully selected from each of the category.

Training Procedure

We used the below libraries to finetune the llama2-7b: torch==2.1.0

transformers==4.35.2

peft@git+https://github.com/huggingface/peft.git bitsandbytes==0.41.1 trl @ git+https://github.com/lvwerra/trl.git@34e6948d459540a21f80c5be227fb4da039dd97a

We used batch size 0f 2 on 50 epochs

Evaluation

We performed hellaswag task using evaluation library of EleutherAI: https://github.com/EleutherAI/lm-evaluation-harness

below are the results:

image/png

Environmental Impact

Carbon Emitted: 0.432 kg/kWh Offset: 0% hardware: a6000 48GB(3) hours: 28

Technical Report

Detail writeup coming soon

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

MetricValue
Avg.45.85
AI2 Reasoning Challenge (25-Shot)47.01
HellaSwag (10-Shot)67.58
MMLU (5-Shot)48.68
TruthfulQA (0-shot)37.53
Winogrande (5-shot)64.80
GSM8k (5-shot)9.48

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей