Model Card for hao3435/Deepseek_fine_tune_8B_checkpoints

Đây là một mô hình ngôn ngữ lớn được tinh chỉnh (fine-tuned) bằng kỹ thuật LoRA từ model unsloth/deepseek-r1-distill-llama-8b-unsloth-bnb-4bit. Mô hình được tối ưu hóa cho các tác vụ sinh văn bản (text-generation), đặc biệt là với tiếng Việt.

Model Details

Model Description

  • Developed by: hao3435
  • Model type: Large Language Model (LLM) fine-tuned with PEFT/LoRA.
  • Language(s) (NLP): Vietnamese, English
  • License: Apache 2.0
  • Finetuned from model: unsloth/deepseek-r1-distill-llama-8b-unsloth-bnb-4bit

Model Sources

  • Repository: https://huggingface.co/hao3435/Deepseek_fine_tune_8B_checkpoints

Uses

Direct Use

Mô hình này có thể được sử dụng trực tiếp cho các tác vụ sinh văn bản đa dạng, bao gồm:

  • Trả lời câu hỏi (Question Answering)
  • Viết và sáng tạo nội dung
  • Tóm tắt văn bản
  • Hỗ trợ lập trình cơ bản

Out-of-Scope Use

Mô hình không nên được sử dụng để đưa ra các quyết định quan trọng hoặc cung cấp lời khuyên chuyên môn (y tế, pháp lý, tài chính). Kết quả do mô hình tạo ra cần được kiểm chứng vì có thể chứa thông tin không chính xác (hallucination).

Bias, Risks, and Limitations

Mô hình được huấn luyện trên một tập dữ liệu tùy chỉnh, do đó có thể kế thừa các thiên kiến (bias) có trong dữ liệu đó. Người dùng cần cẩn trọng và đánh giá kết quả một cách kỹ lưỡng trước khi sử dụng trong các ứng dụng thực tế.

How to Get Started with the Model

Sử dụng đoạn mã sau để tải và chạy mô hình với thư viện unsloth.

from unsloth import FastLanguageModel
import torch

# Các tham số để tải model 4-bit
fourbit_params = {
    "load_in_4bit": True,
    "bnb_4bit_quant_type": "nf4",
    "bnb_4bit_use_double_quant": True,
    "bnb_4bit_compute_dtype": torch.bfloat16,
}

# Tải model gốc và thêm adapter LoRA
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "unsloth/deepseek-r1-distill-llama-8b-unsloth-bnb-4bit",
    max_seq_length = 2048,
    dtype = None,
    **fourbit_params
)

# Thêm adapter từ repo của bạn
model.load_adapter("hao3435/Deepseek_fine_tune_8B_checkpoints")

# --- Soạn prompt ---
# Sử dụng template của Alpaca/Vicuna
prompt_template = """Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
{}

### Response:
{}"""

prompt = prompt_template.format(
    "Viết một bài thơ về thành phố Hồ Chí Minh.", # Instruction của bạn
    "" # Để trống phần response
)

# --- Chạy inference ---
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256, use_cache=True)
response = tokenizer.batch_decode(outputs)

print(response[0])
@misc{hao3435_deepseek_finetune_2024,
  author = {hao3435},
  title = {Deepseek 8B Vietnamese Fine-tuned},
  year = {2025},
  publisher = {Hugging Face},
  journal = {Hugging Face repository},
  howpublished = {\url{[https://huggingface.co/hao3435/Deepseek_fine_tune_8B_checkpoints](https://huggingface.co/hao3435/Deepseek_fine_tune_8B_checkpoints)}},
}
Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support