/ Модель

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

Параметры
3,1 млрд
Размер весов
11,9 ГБ
Архитектура
rwkv · dense
Опубликована
4 мая 2023

rwkv-raven-3b

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

Разговорная языковая модель RWKV-4 Raven на 3,1 млрд параметров для генерации текста по запросам в специальном формате диалога.

107скачиваний за 30 дней8лайковвеса обновлены15 мая 2023

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

RWKV-4 Raven — разговорная версия языковой модели семейства RWKV, проектом руководит Бо Пэн. Модель с плотной архитектурой RWKV и 3,1 млрд параметров предназначена для генерации текста в формате диалога. Для Raven требуется специальный формат запроса; модель можно запускать через Transformers и PyTorch на CPU или GPU, в том числе в половинной точности и на нескольких GPU.

В карточке RWKV описывается как рекуррентная архитектура с производительностью, сопоставимой с трансформерами, параллельным обучением и эффективным выводом. Указанный в README «бесконечный» контекст — качественное заявление, а не подтверждённый размер окна. В метаданных в качестве набора данных указан The Pile. Карточка не сообщает лицензию и не приводит измерений качества; модель создана в 2023 году.

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

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

Ограничения

Для Raven нужен специальный формат промпта. В README не приведены оценка качества, подтверждённый размер контекста или лицензия.

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

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

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

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

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

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

Открыть на Hugging Face

RWKlogo.png

Model card for RWKV-4 | 3B parameters chat version (Raven)

RWKV is a project led by Bo Peng. Learn more about the model architecture in the blogposts from Johan Wind here and here. Learn more about the project by joining the RWKV discord server.

Table of contents

  1. TL;DR
  2. Model Details
  3. Usage
  4. Citation

TL;DR

Below is the description from the original repository

RWKV is an RNN with transformer-level LLM performance. It can be directly trained like a GPT (parallelizable). It's combining the best of RNN and transformer - great performance, fast inference, saves VRAM, fast training, "infinite" ctx_len, and free sentence embedding.

Model Details

The details of the architecture can be found on the blogpost mentioned above and the Hugging Face blogpost of the integration.

Usage

Convert the raw weights to the HF format

You can use the convert_rwkv_checkpoint_to_hf.py script by specifying the repo_id of the original weights, the filename and the output directory. You can also optionally directly push the converted model on the Hub by passing --push_to_hub flag and --model_name argument to specify where to push the converted weights.

python convert_rwkv_checkpoint_to_hf.py --repo_id RAW_HUB_REPO --checkpoint_file RAW_FILE --output_dir OUTPUT_DIR --push_to_hub --model_name dummy_user/converted-rwkv

Generate text

You can use the AutoModelForCausalLM and AutoTokenizer classes to generate texts from the model. Expand the sections below to understand how to run the model in different scenarios: The "Raven" models needs to be prompted in a specific way, learn more about that in the integration blogpost.

Running the model on a CPU

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("RWKV/rwkv-raven-3b")
tokenizer = AutoTokenizer.from_pretrained("RWKV/rwkv-raven-3b")

prompt = "\nIn a shocking finding, scientist discovered a herd of dragons living in a remote, previously unexplored valley, in Tibet. Even more surprising to the researchers was the fact that the dragons spoke perfect Chinese."

inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(inputs["input_ids"], max_new_tokens=40)
print(tokenizer.decode(output[0].tolist(), skip_special_tokens=True))

Running the model on a single GPU

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("RWKV/rwkv-raven-3b").to(0)
tokenizer = AutoTokenizer.from_pretrained("RWKV/rwkv-raven-3b")

prompt = "\nIn a shocking finding, scientist discovered a herd of dragons living in a remote, previously unexplored valley, in Tibet. Even more surprising to the researchers was the fact that the dragons spoke perfect Chinese."

inputs = tokenizer(prompt, return_tensors="pt").to(0)
output = model.generate(inputs["input_ids"], max_new_tokens=40)
print(tokenizer.decode(output[0].tolist(), skip_special_tokens=True))

Running the model in half-precision, on GPU

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("RWKV/rwkv-raven-3b", torch_dtype=torch.float16).to(0)
tokenizer = AutoTokenizer.from_pretrained("RWKV/rwkv-raven-3b")

prompt = "\nIn a shocking finding, scientist discovered a herd of dragons living in a remote, previously unexplored valley, in Tibet. Even more surprising to the researchers was the fact that the dragons spoke perfect Chinese."

inputs = tokenizer(prompt, return_tensors="pt").to(0)
output = model.generate(inputs["input_ids"], max_new_tokens=40)
print(tokenizer.decode(output[0].tolist(), skip_special_tokens=True))

Running the model multiple GPUs

# pip install accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("RWKV/rwkv-raven-3b", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("RWKV/rwkv-raven-3b")

prompt = "\nIn a shocking finding, scientist discovered a herd of dragons living in a remote, previously unexplored valley, in Tibet. Even more surprising to the researchers was the fact that the dragons spoke perfect Chinese."

inputs = tokenizer(prompt, return_tensors="pt").to(0)
output = model.generate(inputs["input_ids"], max_new_tokens=40)
print(tokenizer.decode(output[0].tolist(), skip_special_tokens=True))

Citation

If you use this model, please consider citing the original work, from the original repo here

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей