DeepSeek-V2.5-1210: файнтюн базовой DeepSeek-V2.5.
Файнтюн модели DeepSeek-V2.5 с 236 млрд. параметров с улучшенными показателями в математических вычислениях, программировании, генерации текста и рассуждении. В модели также оптимизированы функции загрузки файлов и обобщения веб-страниц.
Точность решения задач с DeepSeek-V2.5-1210 на LiveCodebench выросла с 29,2% до 34,38% относительно родительской DeepSeek-V2.5, в математических тестах MATH-500 с 74.8% до 82.8%.
DeepSeek-V2.5-1210 поддерживает function calling и использует обновленный шаблон чата для расширения возможностей модели.
⚠️ Чтобы использовать модель в инференсе с BF16 требуется 8 GPU c 80 GB VRAM каждый.
▶️Пример инференса DeepSeek-V2.5-1210 на Transformers:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
model_name = "deepseek-ai/DeepSeek-V2.5-1210"
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)
📌Лицензирование: MIT License.
https://huggingface.co/deepseek-ai/DeepSeek-V2.5-1210
#AI #ML #LLM #DeepSeek