Downloads · 30 days
13
31% of all-time downloads
minhxthanh/DeepSeek-R1-Distill-Llama-8B-VN-History
DeepSeek-R1-Distill-Llama-8B-VN-History is a machine learning model from minhxthanh. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
DeepSeek-R1-Distill-Llama-8B-VN-History is a specialized Vietnamese history assistant based on DeepSeek-R1-Distill-Llama-8B, fine-tuned on the comprehensive Vietnam-History-15k dataset containing 15,000 high-quality V…
Downloads · 30 days
13
31% of all-time downloads
All-time downloads
42
Public
Parameters
8B
16.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
DeepSeek-R1-Distill-Llama-8B-VN-History is a specialized Vietnamese history assistant based on DeepSeek-R1-Distill-Llama-8B, fine-tuned on the comprehensive Vietnam-History-15k dataset containing 15,000 high-quality Vietnamese history question-answer pairs.
["o_proj", "v_proj", "gate_proj", "q_proj", "down_proj", "up_proj", "k_proj"]from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "minhxthanh/DeepSeek-R1-Distill-Llama-8B-VN-History"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Example usage
prompt = "Phân tích ý nghĩa của chiến thắng Bạch Đằng năm 1288?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_length=512,
temperature=0.7,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The model uses a specialized chat template optimized for Vietnamese history Q&A:
<|begin▁of▁sentence|>{{ if .System }}{{ .System }}{{ end }}{{ range .Messages }}{{ if eq .Role "user" }}<|User|>{{ .Content }}<|Assistant|>{{ else if eq .Role "assistant" }}{{ .Content }}<|end▁of▁sentence|>{{ end }}{{ end }}
Bạn là trợ lý am hiểu lịch sử Việt Nam. Trả lời bằng tiếng Việt, chính xác, súc tích; nêu mốc thời gian và nhân vật then chốt khi phù hợp.
User: Vì sao xảy ra sự kiện Đổi Mới (1986)? Nêu bối cảnh và nguyên nhân chính.
Assistant: Bối cảnh trước 1986: Cải cách kinh tế sang thị trường định hướng XHCN là phản ứng trước sức ép thời cuộc. Nguyên nhân chính gồm mâu thuẫn quyền lực, xâm lược/đe dọa bên ngoài và nhu cầu khẳng định chủ quyền. Kết cục: tăng trưởng, mở cửa hội nhập.
User: So sánh vai trò lịch sử của Lê Lợi và Nguyễn Huệ (Quang Trung).
Assistant: Cả hai đều tạo bước ngoặt: Lê Lợi (thế kỷ XV) với lãnh đạo khởi nghĩa Lam Sơn, giành độc lập 1428; Nguyễn Huệ (Quang Trung) (thế kỷ XVIII) với đại phá quân Thanh 1789, cải cách giáo dục và quân sự. Điểm khác nằm ở bối cảnh thời đại và phương thức hành động.
Based on Llama architecture with the following specifications:
The Vietnam-History-15k dataset covers comprehensive Vietnamese historical periods:
This model excels at:
{
"model_type": "llama",
"architectures": ["LlamaForCausalLM"],
"torch_dtype": "bfloat16",
"max_position_embeddings": 131072,
"rope_scaling": {
"factor": 8.0,
"high_freq_factor": 4.0,
"low_freq_factor": 1.0,
"original_max_position_embeddings": 8192,
"rope_type": "llama3"
},
"vocab_size": 128256
}
This model inherits the license from the base DeepSeek-R1-Distill-Llama-8B model. Please refer to the original model's licensing terms for usage guidelines.
@misc{deepseek-r1-distill-llama-8b-vn-history,
title={DeepSeek-R1-Distill-Llama-8B-VN-History: A Vietnamese History Specialist},
author={minhxthanh},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/minhxthanh/DeepSeek-R1-Distill-Llama-8B-VN-History}
}
@dataset{vietnam_history_15k,
title={Vietnam-History-15k: Vietnamese History Question-Answer Dataset},
author={minhxthanh},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/datasets/minhxthanh/Vietnam-History-15k}
}