/ Модель

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

Контекст
163 840 токенов
Параметры
18,1 млрд
Лицензия
Своя лицензия
Архитектура
deepseek_v2 · dense
Опубликована
18 июл 2024

DeepSeek-V2-Chat-0628

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

Диалоговая модель DeepSeek на 18,1 млрд параметров для генерации текста, программирования, математики, перевода и ответов по документам.

6 187скачиваний за 30 дней186лайковвеса обновлены18 июл 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

DeepSeek-V2-Chat-0628 — улучшенная версия диалоговой модели DeepSeek-V2-Chat, разработанная DeepSeek. Она предназначена для общения по инструкциям и генерации текста, включая помощь с программированием, математическими задачами, переводом и ответами на вопросы по документам в сценариях RAG. Модель построена на архитектуре DeepSeek-V2 и содержит 18,1 млрд параметров; заявленная длина контекста — 163 840 токенов. В репозитории веса представлены в формате safetensors.

В карточке сообщается об улучшении результатов относительно предыдущей версии на HumanEval, MATH и BBH, а также об оптимизации следования инструкциям в системной части диалога. Для запуска BF16 версии локально README указывает требования в 8 GPU по 80 ГБ памяти. Лицензия в метаданных обозначена как other, поэтому условия использования следует проверять в документах лицензии репозитория.

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

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

Ограничения

Для локального вывода BF16 README указывает требование в 8 GPU по 80 ГБ памяти. Лицензия обозначена как other; перед использованием нужно проверить условия в документах репозитория.

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

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

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

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

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

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

Открыть на Hugging Face

DeepSeek-V2-Chat-0628

1. Introduction

DeepSeek-V2-Chat-0628 is an improved version of DeepSeek-V2-Chat. For model details, please visit DeepSeek-V2 page for more information.

DeepSeek-V2-Chat-0628 has achieved remarkable performance on the LMSYS Chatbot Arena Leaderboard:

Overall Ranking: #11, outperforming all other open-source models.

Coding Arena Ranking: #3, showcasing exceptional capabilities in coding tasks.

Hard Prompts Arena Ranking: #3, demonstrating strong performance on challenging prompts.

2. Improvement

Compared to the previous version DeepSeek-V2-Chat, the new version has made the following improvements:

BenchmarkDeepSeek-V2-ChatDeepSeek-V2-Chat-0628Improvement
HumanEval81.184.8+3.7
MATH53.971.0+17.1
BBH79.783.4+3.7
IFEval63.877.6+13.8
Arena-Hard41.668.3+26.7
JSON Output (Internal)7885+7

Furthermore, the instruction following capability in the "system" area has been optimized, significantly enhancing the user experience for immersive translation, RAG, and other tasks.

3. How to run locally

To utilize DeepSeek-V2-Chat-0628 in BF16 format for inference, 80GB*8 GPUs are required.

Inference with Huggingface's Transformers

You can directly employ Huggingface's Transformers for model inference.

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig

model_name = "deepseek-ai/DeepSeek-V2-Chat-0628"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
# `max_memory` should be set based on your devices
max_memory = {i: "75GB" for i in range(8)}
# `device_map` cannot be set to `auto`
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, device_map="sequential", torch_dtype=torch.bfloat16, max_memory=max_memory, attn_implementation="eager")
model.generation_config = GenerationConfig.from_pretrained(model_name)
model.generation_config.pad_token_id = model.generation_config.eos_token_id

messages = [
    {"role": "user", "content": "Write a piece of quicksort code in C++"}
]
input_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
outputs = model.generate(input_tensor.to(model.device), max_new_tokens=100)

result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)
print(result)

The complete chat template can be found within tokenizer_config.json located in the huggingface model repository.

Note: The chat template has been updated compared to the previous DeepSeek-V2-Chat version.

An example of chat template is as belows:

<|begin▁of▁sentence|><|User|>{user_message_1}<|Assistant|>{assistant_message_1}<|end▁of▁sentence|><|User|>{user_message_2}<|Assistant|>

You can also add an optional system message:

<|begin▁of▁sentence|>{system_message}

<|User|>{user_message_1}<|Assistant|>{assistant_message_1}<|end▁of▁sentence|><|User|>{user_message_2}<|Assistant|>

Inference with vLLM (recommended)

To utilize vLLM for model inference, please merge this Pull Request into your vLLM codebase: https://github.com/vllm-project/vllm/pull/4650.

from transformers import AutoTokenizer
from vllm import LLM, SamplingParams

max_model_len, tp_size = 8192, 8
model_name = "deepseek-ai/DeepSeek-V2-Chat-0628"
tokenizer = AutoTokenizer.from_pretrained(model_name)
llm = LLM(model=model_name, tensor_parallel_size=tp_size, max_model_len=max_model_len, trust_remote_code=True, enforce_eager=True)
sampling_params = SamplingParams(temperature=0.3, max_tokens=256, stop_token_ids=[tokenizer.eos_token_id])

messages_list = [
    [{"role": "user", "content": "Who are you?"}],
    [{"role": "user", "content": "Translate the following content into Chinese directly: DeepSeek-V2 adopts innovative architectures to guarantee economical training and efficient inference."}],
    [{"role": "user", "content": "Write a piece of quicksort code in C++."}],
]

prompt_token_ids = [tokenizer.apply_chat_template(messages, add_generation_prompt=True) for messages in messages_list]

outputs = llm.generate(prompt_token_ids=prompt_token_ids, sampling_params=sampling_params)

generated_text = [output.outputs[0].text for output in outputs]
print(generated_text)

4. License

This code repository is licensed under the MIT License. The use of DeepSeek-V2 Base/Chat models is subject to the Model License. DeepSeek-V2 series (including Base and Chat) supports commercial use.

5. Citation

@misc{deepseekv2,
      title={DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model}, 
      author={DeepSeek-AI},
      year={2024},
      eprint={2405.04434},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

6. Contact

If you have any questions, please raise an issue or contact us at service@deepseek.com.

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

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

GPU в ailist

vLLM

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

Подбираем GPU…

Класс архитектуры
DeepseekV2ForCausalLM
Ревизия весов
5d09e27

0 моделей