How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="daeunj/DeepSeek-V2-Lite-FP8-GPTQ", trust_remote_code=True)
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("daeunj/DeepSeek-V2-Lite-FP8-GPTQ", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("daeunj/DeepSeek-V2-Lite-FP8-GPTQ", trust_remote_code=True, device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

DeepSeek V2 Lite FP8 GPTQ

This checkpoint was produced with block-wise GPTQ using FP8 E4M3 weights.

Typical pipeline:

bash scripts/download_model.sh --model_name deepseek-v2-lite
python tests/stage5_quantize_model.py --model_path models/DeepSeek-V2-Lite --quant_format fp8 --seq_len 4096
python tests/stage7_save_modelopt.py --model_path models/DeepSeek-V2-Lite-FP8 --output_dir models/DeepSeek-V2-Lite-FP8-modelopt --stage5_results results/stage5_DeepSeek-V2-Lite_fp8_quantize.json

Evaluate quality against the BF16 baseline before deployment:

python tests/stage4_baseline_perplexity.py --model_path models/DeepSeek-V2-Lite --seq_len 4096
python tests/stage6_eval_perplexity.py --model_path models/DeepSeek-V2-Lite-FP8 --quant_format fp8 --seq_len 4096
Downloads last month
26
Safetensors
Model size
16B params
Tensor type
BF16
·
F8_E4M3
·
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for daeunj/DeepSeek-V2-Lite-FP8-GPTQ

Quantized
(25)
this model