Positional Encoding / Mã hóa Vị trí

✍️

📖 Positional Encoding

Definition (English):

Positional encoding injects sequence order information into transformer models, which are inherently permutation-invariant. Sinusoidal encoding (original Transformer) uses fixed sine/cosine functions. Learned positional embeddings are trained with the model. Relative positional encoding (ALiBi, RoPE) encodes distance between tokens. ALiBi adds bias based on distance; RoPE rotates embeddings. RoPE dominates modern LLMs.


📖 Mã hóa Vị trí

Định nghĩa (Tiếng Việt):

Mã hóa vị trí tiêm thông tin thứ tự chuỗi vào mô hình transformer, vốn không phụ thuộc hoán vị. Mã hóa sin (Transformer gốc) sử dụng hàm sin/cos cố định. Nhúng vị trí được học được huấn luyện cùng mô hình. Mã hóa vị trí tương đối (ALiBi, RoPE) mã hóa khoảng cách giữa token. ALiBi thêm bias dựa trên khoảng cách; RoPE quay nhúng. RoPE chiếm ưu thế trong LLM hiện đại.


📂 Phân loại: NLP Tech

Hỏi AI Edu?