Downloads · 30 days
48
7% of all-time downloads
khoin68/Qwen2.5-Coder-7B-Vietnamese-LoRA
Qwen2.5-Coder-7B-Vietnamese-LoRA is a text generation model from khoin68. 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.
<p align="center" <img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="160"/ <br <bTrọng số LoRA Adapter (~100MB) tối ưu hóa tiếng Việt & Dev Slang cho Qwe…
Downloads · 30 days
48
7% of all-time downloads
All-time downloads
669
Public
Repo size
334 MB
Likes
0
Public
Click a slice to open those files.
.safetensors323 MB · 97%
From the Hugging Face model README
Đây là bộ trọng số LoRA Adapter (v1.0) siêu nhẹ (~100MB) được huấn luyện bằng Unsloth (QLoRA 4-bit) trên nền tảng unsloth/Qwen2.5-Coder-7B-Instruct-bnb-4bit.
k, ko, dc, ae, mn, bh, z b, fix bug, sập sv, dính cors, nuốt lỗi....# VAI TRÒ & MỤC TIÊU, code sạch có comment tiếng Việt, xử lý ngoại lệ an toàn).import torch
from unsloth import FastLanguageModel
# 1. Tải Model gốc kèm LoRA Adapter
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "khoin68/Qwen2.5-Coder-7B-Vietnamese-LoRA",
max_seq_length = 2048,
dtype = None,
load_in_4bit = True,
)
# 2. Bật chế độ suy luận nhanh
FastLanguageModel.for_inference(model)
# 3. Gửi câu hỏi thử nghiệm
messages = [
{"role": "system", "content": "Bạn là chuyên gia lập trình. TUYỆT ĐỐI chỉ trả lời bằng Tiếng Việt và Code chuẩn mực."},
{"role": "user", "content": "ae cho hỏi code nodejs call api bên thứ 3 hay bị timeout thì xử lý sao z b?"}
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda") outputs = model.generate(input_ids=inputs, max_new_tokens=512, temperature=0.6, top_p=0.9) print(tokenizer.batch_decode(outputs)[0]) Cách 2: Sử dụng LoRA này để Huấn luyện tiếp nối (Continued Fine-Tuning) Bạn có thể dùng bản LoRA này làm "điểm xuất phát" để nạp thêm dữ liệu riêng của bạn mà không cần train lại từ đầu: code
from unsloth import FastLanguageModel
# Nạp bản LoRA đã học tiếng Việt
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "khoin68/Qwen2.5-Coder-7B-Vietnamese-LoRA",
max_seq_length = 2048,
load_in_4bit = True,
)
# Gắn LoRA mới và nạp thêm dataset của bạn vào train tiếp!
model = FastLanguageModel.get_peft_model(
model,
r = 32,
target_modules = ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"],
lora_alpha = 32,
lora_dropout = 0,
bias = "none",
use_gradient_checkpointing = "unsloth",
random_state = 3407,
)
⚙️ 4. THÔNG SỐ HUẤN LUYỆN (HYPERPARAMETERS) Base Architecture: Qwen2.5-Coder-7B LoRA Rank ( r r ): 32 | LoRA Alpha ( α α ): 32 | Dropout: 0.0 Trainable Parameters: 80,740,352 (1.05% tổng tham số) Optimizer: AdamW 8-bit Hardware: Tesla T4 GPU (Google Cloud / Colab) 📜 5. BẢN QUYỀN & TÁC GIẢ Phát triển và huấn luyện bởi: @khoin68. Tối ưu hóa mã nguồn mở: Unsloth AI Team & Alibaba Cloud Qwen Team.