/ Модель

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

Контекст
8 192 токена
Параметры
1 млрд
Лицензия
Apache 2.0
Архитектура
llama · dense
Библиотека
transformers
Опубликована
6 мая 2024

prem-1B-chat

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

Компактная англоязычная чат-модель Prem AI на базе Llama для диалогов и генерации ответов в приложениях с поиском по внешним данным.

37скачиваний за 30 дней6лайковвеса обновлены1 сен 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Prem-1B-chat — диалоговая версия компактной языковой модели Prem-1B, разработанной Prem AI на архитектуре Llama. Модель содержит 1 млрд параметров, работает через Transformers и принимает текст, генерируя текстовые ответы. Для неё заявлено контекстное окно до 8192 токенов.

Модель дообучена для общения в формате виртуального помощника и предназначена прежде всего для англоязычных сценариев, включая ответы на вопросы по материалам, переданным во время работы приложения, и многоходовые диалоги. Разработчики позиционируют серию Prem-1B как небольшую модель для RAG-приложений, где сведения поступают из внешних документов, а не только из параметров модели. В README приведены результаты сравнительных тестов; по указанным оценкам Prem-1B-chat уступает TinyLlama-1.1B-Chat-v1.0 в среднем по перечисленным бенчмаркам.

В репозитории указана лицензия Apache 2.0; README также ссылается на Prem-1B Community License и Acceptable Use Policy, поэтому перед коммерческим использованием следует проверить применимые условия. Модель рассчитана на английский язык; качество на других языках не заявлено. Как и другие небольшие языковые модели, она может ошибаться и выдавать предвзятые или недостоверные ответы.

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

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

Ограничения

Модель компактная, а приведённые в README сравнительные оценки ниже, чем у TinyLlama-1.1B-Chat-v1.0; ответы могут быть ошибочными или предвзятыми. Предназначение и качество для языков, кроме английского, не заявлены; условия применения сверяйте с упомянутыми в README Prem-1B Community License и Acceptable Use Policy.

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

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

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

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

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

Открыть на Hugging Face

Model Details

With great enthusiasm, we unveil the Prem-1B series, open-source, multipurpose large language models developed by Prem AI. This cutting-edge SLM offers the open community and enterprises the opportunity to harness capabilities that were once exclusively available through closed model APIs, empowering them to build their own advanced language models. Our objective is to develop a model that excels at Retrieval-Augmented Generation (RAG). While Large Language Models (LLMs) store a vast amount of information within their parameters, RAG operates differently by ingesting information during runtime. This approach suggests that for RAG applications, we may not require models of immense size. With this initiative, we aim to create a Small Language Model (SLM) with an extended context length of 8192 tokens, enabling it to handle multi-turn conversations effectively. This endeavor represents our inaugural attempt to craft an SLM tailored for RAG tasks.

Model Description

This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.

  • Developed by: https://premai.io/
  • Model type: Llama
  • Language(s) (NLP): Python
  • License: Apache License 2.0

Uses

The Prem-1B language model is designed for commercial and research applications involving the English language. The instruction-tuned versions of the model are tailored for conversational interactions akin to a virtual assistant. On the other hand, the pretrained variants can be fine-tuned and adapted for various natural language generation tasks beyond just dialogue.

Out-of-Scope Use

The model must not be used in any manner that violates applicable laws or regulations, including trade compliance laws. It is also prohibited to use the model in any way that goes against the Acceptable Use Policy and the Prem-1B Community License. While the base model is intended for English language use, developers are permitted to fine-tune the Prem-1B models for other languages, provided they comply with the Prem-1B Community License and the Acceptable Use Policy.

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases, and limitations of the model. More information needed for further recommendations.

How to Get Started with the Model

Using AutoModelForCausalLM and AutoTokenizer

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("prem-research/prem-1B-chat")
model = AutoModelForCausalLM.from_pretrained('prem-research/prem-1B-chat', torch_dtype=torch.bfloat16)
model = model.to('cuda')

# Setup terminators
terminators = [tokenizer.eos_token_id, tokenizer.encode('<|eot_id|>', add_special_tokens=False)[0]]

# Prepare the prompt
messages = [
    {
        "role": "system",
        "content": "You are a helpful AI assistant. You should give concise responses to very simple questions, but provide thorough responses to more complex and open-ended questions."
    },
    {
        'role': 'user',
        'content': 'Help me understand machine learning.'
    }
]

prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)

# Generate
inputs = tokenizer(prompt, return_attention_mask=False, return_tensors="pt", add_special_tokens=False)
input_ids = inputs['input_ids']
input_ids = input_ids.to(model.device)
res = model.generate(input_ids=input_ids, max_new_tokens=400, pad_token_id=tokenizer.pad_token_id, eos_token_id=terminators)
generated_text = tokenizer.decode(res[0][input_ids.shape[1]:], skip_special_tokens=True).strip()
print(generated_text)

Using pipelines:

import torch
from transformers import pipeline

# Load the pipeline
pipe = pipeline("text-generation", model="prem-research/prem-1B-chat", torch_dtype=torch.bfloat16, device=0)

# Prepare prompt
messages = [
    {
        "role": "system",
        "content": "You are a helpful AI assistant. You should give concise responses to very simple questions, but provide thorough responses to more complex and open-ended questions."
    },
    {
        'role': 'user',
        'content': 'Help me understand machine learning.'
    }
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)

# Setup terminators
terminators = [pipe.tokenizer.eos_token_id, pipe.tokenizer.encode('<|eot_id|>', add_special_tokens=False)[0]]

# Generate
outputs = pipe(prompt, max_new_tokens=400, do_sample=True, temperature=0.7, top_k=50, top_p=0.95, pad_token_id=pipe.tokenizer.pad_token_id, eos_token_id=terminators)
print(outputs[0]["generated_text"][len(prompt):])

Training Details

Training Data

Mentioned in blogpost: https://blog.premai.io/introducing-prem-1b/

Training Procedure

Mentioned in blogpost: https://blog.premai.io/introducing-prem-1b/

Training Hyperparameters

Mentioned in blogpost: https://blog.premai.io/introducing-prem-1b/

Evaluation

Results

ModelAvgArc-cArc-eHellaswagMMLUObqaPiqaWinogrande
prem-1B42.6424.7457.4042.0124.7521.0072.1456.43
prem-1B-chat41.7624.4853.3240.2825.2722.2070.8955.88
TinyLlama-1.1B-Chat-v1.046.1630.0361.5346.5624.7225.8074.2160.29
opt-1.3b42.9423.3757.4441.4924.8623.2071.4958.72
pythia-1b40.7124.3156.9037.7223.2018.8070.6253.43

image/png

Environmental Impact

  • Hardware Type: H100 GPUs
  • Hours used: 8500

Model Architecture and Objective

Llama based

Compute Infrastructure

16-H100 GPUs

Hardware

H100 GPUs

Software

PyTorch, transformers, PyTorch Lightning

Citation

https://blog.premai.io/introducing-prem-1b/

Model Card Authors

https://huggingface.co/goku, https://huggingface.co/nsosio, https://huggingface.co/ucalyptus, https://huggingface.co/filopedraz

Model Card Contact

https://huggingface.co/goku, https://huggingface.co/nsosio, https://huggingface.co/ucalyptus, https://huggingface.co/filopedraz

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей