Top-K and Top-P Sampling / Lấy mẫu Top-K và Top-P
📖 Top-K and Top-P Sampling
Definition (English):
Top-K sampling restricts token selection to the K most probable tokens, eliminating low-probability options. Top-P (nucleus) sampling selects from the smallest set of tokens whose cumulative probability exceeds P. Top-P is more adaptive (adjusts vocabulary size dynamically). Both reduce degenerate outputs compared to pure sampling. Typical settings: Top-K=50, Top-P=0.9-0.95 combined with temperature.
📖 Lấy mẫu Top-K và Top-P
Định nghĩa (Tiếng Việt):
Lấy mẫu Top-K giới hạn lựa chọn token vào K token có xác suất cao nhất, loại bỏ tùy chọn xác suất thấp. Lấy mẫu Top-P (nucleus) chọn từ tập token nhỏ nhất trong đó xác suất tích lũy vượt P. Top-P thích ứng hơn (điều chỉnh kích thước từ vựng động). Cả hai giảm đầu ra thoái hóa so với lấy mẫu thuần. Thiết lập điển hình: Top-K=50, Top-P=0.9-0.95 kết hợp với temperature.
📂 Phân loại: Techniques
HỆ SINH THÁI CiCC