Downloads · 30 days
5
19% of all-time downloads
Marvis12957/ai_in_action_lab21_attn_only
ai_in_action_lab21_attn_only is a machine learning model from Marvis12957. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Adapter đối chứng cho bài lab 21 — Fine-tuning LLMs (LoRA/QLoRA). Cùng dữ liệu, cùng epochs với aiinactionlab21 (cấu hình đúng), nhưng LoRA chỉ gắn vào 2 loại module (q, v) thay vì 12 loại (text-linear). Rank được nân…
Downloads · 30 days
5
19% of all-time downloads
All-time downloads
27
Public
Repo size
130 MB
Likes
0
Public
Click a slice to open those files.
.safetensors130 MB · 100%
From the Hugging Face model README
Adapter đối chứng cho bài lab 21 — Fine-tuning LLMs (LoRA/QLoRA). Cùng dữ liệu, cùng epochs
với ai_in_action_lab21 (cấu hình
đúng), nhưng LoRA chỉ gắn vào 2 loại module (q, v) thay vì 12 loại (text-linear). Rank được
nâng lên 283 để khớp ngân sách tham số với run correct (lệch 0.025%).
Tác giả: Trần Văn Hiếu · MSSV 2A202602030
| Hạng mục | Giá trị |
|---|---|
| Base model | unsloth/Qwen3.5-4B |
| Vị trí LoRA | q, v (2 module) |
| Rank (r) | 283 |
| Trainable params | 32,456,704 |
| Learning rate | 1e-4 |
| Epochs / steps | 2 / 30 |
| Precision | 16-bit |
| Metric | Giá trị |
|---|---|
| target accuracy | 0.970 |
| format validity | 1.000 |
| latency | 921.3 ms |
So với run correct (0.965), chênh lệch 0.005 trên n = 50 nằm trong nhiễu đo — không đủ để
kết luận vị trí gắn adapter nào tốt hơn. Kết luận rút ra: ngân sách tham số (rank × số vị
trí gắn) là đòn bẩy chính, không phải bản thân vị trí gắn LoRA — miễn ngân sách tham số
được giữ khớp.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
BASE = "unsloth/Qwen3.5-4B"
model = AutoModelForCausalLM.from_pretrained(BASE, device_map="auto")
model = PeftModel.from_pretrained(model, "Marvis12957/ai_in_action_lab21_attn_only")