Instructions to use hao3435/Deepseek_fine_tune_8B_checkpoints with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hao3435/Deepseek_fine_tune_8B_checkpoints with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/deepseek-r1-distill-llama-8b-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "hao3435/Deepseek_fine_tune_8B_checkpoints") - Transformers
How to use hao3435/Deepseek_fine_tune_8B_checkpoints with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hao3435/Deepseek_fine_tune_8B_checkpoints") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hao3435/Deepseek_fine_tune_8B_checkpoints", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hao3435/Deepseek_fine_tune_8B_checkpoints with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hao3435/Deepseek_fine_tune_8B_checkpoints" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hao3435/Deepseek_fine_tune_8B_checkpoints", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hao3435/Deepseek_fine_tune_8B_checkpoints
- SGLang
How to use hao3435/Deepseek_fine_tune_8B_checkpoints with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "hao3435/Deepseek_fine_tune_8B_checkpoints" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hao3435/Deepseek_fine_tune_8B_checkpoints", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "hao3435/Deepseek_fine_tune_8B_checkpoints" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hao3435/Deepseek_fine_tune_8B_checkpoints", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use hao3435/Deepseek_fine_tune_8B_checkpoints with Docker Model Runner:
docker model run hf.co/hao3435/Deepseek_fine_tune_8B_checkpoints
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