Downloads · 30 days
25
37% of all-time downloads
Deepak7376/DeepSeek-R1-Distill-Qwen-1.5B-bnb-4bit
DeepSeek-R1-Distill-Qwen-1.5B-bnb-4bit is a text generation model from Deepak7376. Use it when you need the model to write or continue text.
Downloads · 30 days
25
37% of all-time downloads
All-time downloads
68
Public
Parameters
1.8B
1.6 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.6 GB · 99%
How the weights are stored.
U81.4B · 74%
From the Hugging Face model README
This is a 4-bit quantized version of the DeepSeek-R1-Distill-Qwen-1.5B model using bitsandbytes quantization.
deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5BNF4)transformersfrom transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_id = "Deepak7376/DeepSeek-R1-Distill-Qwen-1.5B-bnb-4bit"
bnb_config_4bit = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_use_double_quant=True,
)
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config_4bit)
tokenizer = AutoTokenizer.from_pretrained(model_id)
pipe = pipeline(
'text-generation',
model=model,
tokenizer=tokenizer,
max_length=1024,
truncation=True,
do_sample=True,
temperature=0.6,
top_p=0.95,
)
messages = [
{"role": "user", "content": "suggest me top movies in 2021? <think>\n"},
]
pipe(messages)
or
from transformers import pipeline
pipe = pipeline("text-generation", model="Deepak7376/DeepSeek-R1-Distill-Qwen-1.5B-bnb-4bit")
messages = [
{"role": "user", "content": "suggest me top movies in 2021? <think>\n"},
]
pipe(messages)
Quantizing the model significantly reduces memory usage while maintaining good performance. Here are the memory footprints:
| Model Version | Memory Usage |
|---|---|
| Base Model | ~3.5GB |
| 4-bit Quantized | ~1.5GB |
This model follows the apache-2.0 license.