Downloads · 30 days
17
15% of all-time downloads
522H0134-NguyenNhatHuy/DeepSeek-R1-Distill-Qwen-1.5B-SFT
DeepSeek-R1-Distill-Qwen-1.5B-SFT is a text generation model from 522H0134-NguyenNhatHuy. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This model is a fine-tuned version of unsloth/deepseek-r1-distill-qwen-1.5b-unsloth-bnb-4bit using LoRA + PEFT, targeting Vietnamese open-domain, instruction-following chat. It is aligned for safe, helpful, and fluent…
Downloads · 30 days
17
15% of all-time downloads
All-time downloads
111
Public
Repo size
85.3 MB
Likes
0
Public
Click a slice to open those files.
.safetensors73.9 MB · 87%
From the Hugging Face model README
This model is a fine-tuned version of unsloth/deepseek-r1-distill-qwen-1.5b-unsloth-bnb-4bit using LoRA + PEFT, targeting Vietnamese open-domain, instruction-following chat. It is aligned for safe, helpful, and fluent conversations in Vietnamese through supervised fine-tuning on high-quality prompt-response pairs.
The model was evaluated on a Vietnamese test set of 1,000 prompts (60% safe / 40% adversarial) adapted from JailBreak, HarmBench, and OpenAssistant.
Detoxify was used to filter harmful generations during evaluation.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load base model and LoRA adapter
tokenizer = AutoTokenizer.from_pretrained("unsloth/deepseek-r1-distill-qwen-1.5b-unsloth-bnb-4bit")
base_model = AutoModelForCausalLM.from_pretrained("unsloth/deepseek-r1-distill-qwen-1.5b-unsloth-bnb-4bit")
model = PeftModel.from_pretrained(base_model, "522H0134-NguyenNhatHuy/DeepSeek-R1-Distill-Qwen-1.5B-SFT")
# Chat example
prompt = "Xin chào, bạn có thể giúp tôi học tiếng Anh không?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=150)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))