Downloads · 30 days
35
24% of all-time downloads
ModelCloud/DeepSeek-V2-Chat-0628-gptq-4bit
DeepSeek-V2-Chat-0628-gptq-4bit is a text generation model from ModelCloud. Use it when you need the model to write or continue text. It is set up for transformers.
This model has been quantized using GPTQModel.
Downloads · 30 days
35
24% of all-time downloads
All-time downloads
144
Public
Parameters
236B
125 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors125 GB · 100%
How the weights are stored.
I32235B · 100%
From the Hugging Face model README
This model has been quantized using GPTQModel.
You can use GPTQModel for model inference.
import torch
from transformers import AutoTokenizer, GenerationConfig
from gptqmodel import GPTQModel
model_name = "ModelCloud/DeepSeek-V2-Chat-0628-gptq-4bit"
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(2)}
# `device_map` cannot be set to `auto`
model = GPTQModel.from_quantized(model_name, trust_remote_code=True, device_map="sequential", max_memory=max_memory, torch_dtype=torch.float16, 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_ids=input_tensor.to(model.device), max_new_tokens=100)
result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)
print(result)