Đánh giá chất lượng mô hình + Các kỹ thuật finetune tham số tối ưu - PEFT + Chữa bài tập
Parameter-Efficient Fine-Tuning - PEFT
LORA
Lượng tử hóa mô hình
Chắt lọc tri thức mô hình
Tỉa tham số
Thực hành thư viện Unsolth
1. Nội dung
1.1. Đánh giá mô hình ngôn ngữ
1.2. Slide Parameter-Efficient Fine-Tuning - PEFT
1.3. Flash Attention
Cơ chế
Lập trình
Team thực hiện Benchmark Multiheaded Attention thường của Transformer và FlashAttention để tối ưu truy cập memory của GPU.
Kết quả sau 1000 lần thực hiện thì FlashAttention nhanh hơn khoảng gấp rưỡi so với Attention thông thường.
BenchMark này được thực hiện trên GPU T4 Google Colab.
P/S: trong Pytorch hàm scaled_dot_product_attention đã sử dụng Attention.
Notebook và kết quả: https://colab.research.google.com/drive/1-HjN3McMS_boMyBZFAt1TP7NLoRUd346?usp=sharing
1.4. Thực hành
Fine tune mô hình ngôn ngữ chất lượng thấp
https://colab.research.google.com/drive/1oumKQcX9mqjGUm_j6b9W1BGVXFJ4Y6NI?usp=sharing
Adapter Injection
https://huggingface.co/docs/peft/en/developer_guides/low_level_api