/ Модель

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

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

prem-1B

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

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

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Prem-1B — компактная языковая модель семейства Llama, разработанная Prem AI. Модель содержит 1 млрд параметров, имеет архитектуру LlamaForCausalLM и контекстное окно до 8192 токенов; для работы доступны веса в формате Safetensors и библиотека Transformers.

Модель предназначена для генерации текста и приложений с дополненной поиском генерацией (RAG), где она может учитывать предоставленные во время работы сведения. Серия включает варианты для диалогового взаимодействия в роли виртуального помощника; предварительно обученные варианты можно адаптировать к другим задачам генерации естественного языка. В README заявлена ориентация на английский язык.

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

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

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

Ограничения

В приведённых бенчмарках Prem-1B показывает более низкий средний результат, чем TinyLlama-1.1B-Chat-v1.0. Возможны риски и смещения; README рекомендует учитывать их при использовании.

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

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

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

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

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

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

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
Ревизия весов
6e67914

0 моделей