Ghi chép về model & code
Chia sẻ kiến thức về ML, AI và kỹ thuật.
ML/AI
10 bài- 01AbliterationKỹ thuật loại bỏ vĩnh viễn "refusal direction" khỏi weights của LLM bằng cách project nó ra khỏi các write projection matrices — model vẫn coherent và capable nhưng không còn khả năng từ chối bất kỳ request nào.
- 02Activation SteeringInject một vector vào hidden states của model tại inference time để điều hướng behavior — không thay đổi weights, reversible ngay lập tức, và có thể apply có điều kiện theo context.
- 03Neuron, Circuit & Feature EditsHầu hết các kỹ thuật chỉnh sửa model đều có chung một giả định ngầm: "chúng ta không cần hiểu model, chỉ cần tìm chỗ để thay đổi." Mechanistic interpretability từ chối giả định đó.
- 04Preference Learning - DPO & RLHFNhóm kỹ thuật dùng để thay đổi broad behavioral preference của language model: helpfulness, refusal đúng ngữ cảnh, tone, và hallucination style.
- 05Task Vectors & Model MergingKhi bạn fine-tune một model, thực chất bạn đang dịch chuyển một điểm trong không gian hàng tỷ chiều — từ vị trí base đến vị trí mới mang skill cụ thể.
- 06Evaluation Framework"Hoạt động trên 5 test cases" không phải eval. Evaluation Framework là bộ metrics, thresholds, prompts, scripts và reports dùng để chứng minh một model intervention có hiệu quả thật hay chỉ nhìn tốt trên demo.
- 07Knowledge Editing — ROME & MEMITKnowledge editing giống như sửa một thẻ trong từ điển bên trong model. Nếu model tin rằng "Eiffel Tower nằm ở Rome", ta muốn sửa thành "Eiffel Tower nằm ở Paris" mà không cần fine-tune lại toàn bộ model.
- 08LLM Model Editing — Map of Content
- 09LoRA & PEFTLoRA không train lại toàn bộ model. Nó đóng băng base model và học một delta nhỏ hơn rất nhiều so với full fine-tune.
- 10Machine UnlearningMachine unlearning cố làm model "quên" một nhóm thông tin: PII, copyrighted text, hazardous knowledge, hoặc records cần xóa theo yêu cầu compliance.
Code Tutorial
7 bài- 01Async và Sync trong PythonHọc async/sync trong Python qua 21+ component tương tác — threading, multiprocessing, asyncio và khi nào nên dùng gì.
- 02Deep Dive Python — DashboardBản đồ học Python thực chiến: async, concurrency, resource control, profiling và FastAPI architecture.
- 03Deep Dive Python 01 — Cơ BảnNền tảng async Python: sync vs async, event loop, coroutine và khi nào nên dùng gì.
- 04Deep Dive Python 02 — Đồng ThờiThreading, multiprocessing, asyncio — chọn đúng mô hình cho từng bài toán.
- 05Deep Dive Python 03 — Resource ControlKiểm soát tài nguyên: semaphore, rate limiting, backpressure và worker pool patterns.
- 06Deep Dive Python 04 — Đo Hiệu NăngProfiling Python: cProfile, line_profiler, memory_profiler và cách đọc kết quả.
- 07Deep Dive Python 05 — FastAPI ArchitectureFastAPI production architecture: lifespan, dependency injection, background tasks và graceful shutdown.