/ Модель

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

Контекст
2 048 токенов
Параметры
131 млн
Лицензия
Apache 2.0
Архитектура
mistral · dense
Опубликована
13 июл 2024

Lite-Mistral-150M-v2-Instruct

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

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

965скачиваний за 30 дней47лайковвеса обновлены14 сен 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Lite-Mistral-150M-v2-Instruct — компактная языковая модель OuteAI на архитектуре Mistral с плотной архитектурой и примерно 131,3 млн параметров по метаданным. Она предназначена для генерации текста в диалоговом формате и рассчитана на работу на устройствах с ограниченными ресурсами. Модель обучалась примерно на 8 млрд токенов; заявленный контекст — 2048 токенов. Для диалога требуется использовать указанный в карточке шаблон с ролями system, user и assistant.

Модель может отвечать на простые вопросы и поддерживать несложные диалоги, однако из-за небольшого размера способна терять контекст в многоходовом общении и выдавать непоследовательные или неточные ответы, особенно в сложных и тонких сценариях. Репозиторий содержит веса Safetensors. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Lite-Mistral-150M-v2-Instruct

This is a Lite series model based on the Mistral architecture, comprising approximately 157 million parameters. The primary goal of this 150 million parameter model was to develop a compact and efficient model capable of operating on a wide range of devices, while maintaining a reasonable level of functionality and coherence for its small size. A smaller model scale may lead to challenges in preserving context over multi-turn conversations. Consequently, there is a risk of inconsistent or inaccurate responses.

The model was trained on ~8 billion tokens.

Lite-Mistral-150M-v2-Instruct Lite-Mistral-150M-v2-Instruct-GGUF

Improvements from v1:

  • Extended Training: Further refinement of the model, resulting in improved benchmark performance and overall text generation quality.
  • Tokenizer changes.

Chat format

[!IMPORTANT] This model is sensitive to the chat template used. Ensure you use the correct template:

<s>system
[System message]</s>
<s>user
[Your question or message]</s> 
<s>assistant
[The model's response]</s>

How coherent is the 150M model?

Let's look at real-world examples:

<s>user
What is the capital of France?</s> 
<s>assistant
The capital of France is Paris.</s> 
<s>user
What is the capital of Spain?</s>
<s>assistant
The capital of Spain is Madrid, which is known for its beautiful architecture and rich history.</s>
<s>user
Who wrote the play "Romeo and Juliet"?</s>
<s>assistant
The play "Romeo and Juliet" was written by William Shakespeare.</s>
<s>system
You are a helpful assistant.</s>
<s>user
I'd like to learn about language models. Can you break down the concept for me?</s>
<s>assistant
Of course! Language models are computer programs designed to mimic human language, which is the way humans understand and interact with each other.
They use algorithms to analyze data and generate responses that are similar to how humans do on their own.</s>
[Input for the model]
<s>user
Let's roleplay. I'll be a customer at a restaurant, and you be the waiter. Ready?</s> 
<s>assistant
Certainly! I'll play the role of a waiter. Please go ahead and start the roleplay when you're ready.</s> 
<s>user
Hello, I'd like to see the menu please.</s> 
<s>assistant
Good evening, sir! Welcome to our restaurant. Here's our menu for today. May I recommend our chef's special, the grilled salmon with lemon butter sauce? Let me know if you have any questions about our dishes.</s> 
<s>user
I'll have the salmon. What wines do you recommend to go with it?</s> 

[Model's response]
<s> assistant
To go with your salmon, we suggest a pair of red-tailed or white-tailed jackfights. The grilled salmon is creamy and has a nice acidity. The lemon butter sauce is a great addition to this dish.</s>

The model shows some promise in understanding context related to simple requests, but it's clear that it still struggles with more complex or nuanced situations.

Benchmarks:

Usage with HuggingFace transformers

The model can be used with HuggingFace's transformers library:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

model = AutoModelForCausalLM.from_pretrained("OuteAI/Lite-Mistral-150M-v2-Instruct").to(device)
tokenizer = AutoTokenizer.from_pretrained("OuteAI/Lite-Mistral-150M-v2-Instruct")

def generate_response(message: str, temperature: float = 0.4, repetition_penalty: float = 1.1) -> str:
    # Apply the chat template and convert to PyTorch tensors
    messages = [
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": message}
    ]
    input_ids = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True, return_tensors="pt"
    ).to(device)

    # Generate the response
    output = model.generate(
        input_ids,
        max_length=512,
        temperature=temperature,
        repetition_penalty=repetition_penalty,
        do_sample=True
    ) 

    # Decode the generated output
    generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
    return generated_text

message = "I'd like to learn about language models. Can you break down the concept for me?"
response = generate_response(message)
print(response)

Risk Disclaimer

By using this model, you acknowledge that you understand and assume the risks associated with its use. You are solely responsible for ensuring compliance with all applicable laws and regulations. We disclaim any liability for problems arising from the use of this open-source model, including but not limited to direct, indirect, incidental, consequential, or punitive damages. We make no warranties, express or implied, regarding the model's performance, accuracy, or fitness for a particular purpose. Your use of this model is at your own risk, and you agree to hold harmless and indemnify us, our affiliates, and our contributors from any claims, damages, or expenses arising from your use of the model.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей