/ Модель

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

Контекст
2 048 токенов
Архитектура
mixformer-sequential · dense
Библиотека
transformers
Опубликована
12 сен 2023

phi-1_5_Wizard_Vicuna_uncensored

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

Экспериментальное дообучение Phi-1.5 для генерации диалоговых ответов в формате Vicuna.

119скачиваний за 30 дней27лайковвеса обновлены21 сен 2023

Бенчмарки

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

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

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

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

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

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

jphme/phi-1_5_Wizard_Vicuna_uncensored — экспериментальная дообученная версия Phi-1.5 от Microsoft, созданная автором репозитория на подмножестве набора ehartford/wizard_vicuna_70k_unfiltered. Модель предназначена для генерации ответов в формате диалога ShareGPT/Vicuna и может работать на CPU; архитектура — MixFormer Sequential, формат весов — PyTorch, контекст — до 2048 токенов.

Её можно использовать для экспериментов с чат-ответами и локальным запуском небольшой языковой модели. README предупреждает, что обучение проведено на части датасета и модель не предназначена для production. Также модель может не останавливать генерацию самостоятельно; для завершения ответа требуется настроить eos_token_id или критерий остановки. Лицензия в предоставленных данных не указана.

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

  • эксперименты с генерацией ответов чат-ботом
  • локальный запуск языковой модели на CPU
  • создание диалоговых ответов в формате ShareGPT/Vicuna

Ограничения

Модель экспериментальная, обучена лишь на подмножестве датасета и не предназначена для production. Генерация может не останавливаться автоматически; в README рекомендуется настроить eos_token_id или критерий остановки.

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

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

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

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

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

Открыть на Hugging Face

Phi 1.5 Wizard Vicuna Experimental

Experimental Finetune on Microsoft's Phi 1.5. This is highly experimental, only trained on a subset of the 70k Wizard Vicuna dataset and not meant for production use.

This model also runs reasonably fast on CPU!

Will update with later checkpoints later.

Prompt Format

ShareGPT / Vicuna (without newlines):

A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: This is a question? ASSISTANT: Here is my answer"

Code Example

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("jphme/phi-1_5_wizzard_vicuna_uncensored", trust_remote_code=True, torch_dtype=torch.bfloat16).to("cuda")
tokenizer = AutoTokenizer.from_pretrained("jphme/phi-1_5_wizzard_vicuna_uncensored", trust_remote_code=True, torch_dtype=torch.bfloat16)
prompt_template=("A chat between a curious user and an artificial intelligence assistant. "
"The assistant gives helpful, detailed, and polite answers to the user's questions. "
"USER: {prompt} ASSISTANT:")

inputs = tokenizer(
    prompt_template.format(prompt="What is 1+1?"), 
    return_tensors="pt", return_attention_mask=False).to('cuda')
outputs = model.generate(
    **inputs, max_length=200, 
    do_sample=True, 
    temperature=0.5, 
    top_p=0.95, 
    use_cache=True, 
    repetition_penalty=1.1, 
    #can try to uncomment this if model doesn't end
    #eos_token_id=tokenizer.eos_token_id
)
text = tokenizer.batch_decode(outputs,skip_special_tokens=True)[0]
print(text)

The model doesn't stop by itself (this could be an issue due to eos/bos tokens being identical), so you can try to explicitly set the eos_token_id (see above) or use a custom stopping criteria.

You can remove .to("cuda") to let the model run without a GPU!

Examples

A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: Who was president of the USA in 1995? ASSISTANT: The president of the United States at that time was Bill Clinton (...)

A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: Write a python function that returns the fibonacci sequence ASSISTANT:The Fibonacci sequence is a series of numbers where each number after the first two are obtained by adding the two preceding ones together (starting from 0). So the sequence goes 0, 1, 1, 2, 3, 5, 8, 13, 21... Here's a Python function that generates the nth term in the Fibonacci sequence:

def fibonacci(n):
 if n <= 1:
 return n
 else:
 f = [0,1]
 for i in range(2, n+1):
 f.append(f[-1]+f[-2])
 return f[-1]

This function takes as input n, which represents the (...) (this function works with corrected intendation)

A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: What is (500+12)/4? ASSISTANT:The answer to this expression is 7.5. (...) Some potential here ;-)...

Thanks

Thanks to Microsoft for releaseing Phi 1.5, Eric Hartford for releasing the Wizard Vicuna dataset, Winglian for his great work on Axolotl that I use for finetuning and Teknium for some Phi finetuning discussion.

License

The original licenses of the dataset and model applies. No warranty whatsoever, this model is only intended for research purposes.

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
MixFormerSequentialForCausalLM
Ревизия весов
04dc770

0 моделей