‹

A Short History of Paying Attention — ประวัติศาสตร์ย่อของการใส่ใจ

A Short History of Paying Attention — ​ประวัติศาสตร์​ย่อ​ของ​การใส่ใจ

For the team — a map of the road already walked, so the road ahead is easier to see. ​สำหรับ​ทีม — ​แผนที่​เส้นทาง​ที่​เดินผ่าน​มา​แล้ว ​เพื่อให้​มองเห็น​เส้นทาง​ข้างหน้า​ได้​ง่าย​ขึ้น

2026-07-31

Sourced from a working canon of attention research kept by the author; a handful of small narrative gaps — 2014, the 2018–2020 scale era, and the 2019 origin of the "efficiency wars" — filled with directly-cited web sources. Technical terms stay in English on purpose; that's house style.


Table of Contents / ​สารบัญ

  1. 2014 — Learning Where to Look / ​การเรียนรู้​ว่า​จะ​มอง​ตรงไหน
  2. 2017 — Attention Is All You Need
  3. 2018–2020 — Same Recipe, Bigger Kitchen / ​สูตร​เดิม ​ครัว​ใหญ่​ขึ้น
  4. 2019–2021 — The Efficiency Wars / ​สงคราม​ประสิทธิภาพ
  5. 2022 — FlashAttention: The Hardware Turn / ​จุด​เปลี่ยน​ที่​ฮาร์ดแวร์
  6. 2023 — Serving It for Real / ​เสิร์ฟ​ของจริง​ให้ได้
  7. 2023–2024 — Mixture-of-Experts Goes Mainstream / MoE ​กลายเป็น​กระแส​หลัก
  8. 2024 — DeepSeek's Compression Trick (MLA) / ​กลเม็ด​บีบ​อัด​ของ DeepSeek
  9. 2025 — Trainable Sparsity & Linear Attention's Comeback / Sparsity ​ที่​เท​รน​มา​แต่ต้น ​กับ​การคัมแบ็ก​ของ Linear Attention
  10. 2026 — Four Labs, Four Bets / ​สี่​แล็บ ​สี่​เดิมพัน
  11. The Future Five / ​ห้า​อนาคต​ที่​กำลังจะ​มาถึง
  12. Inside Logy / ​ข้างใน​ตัว Logy

1. 2014 — Learning Where to Look / ​การเรียนรู้​ว่า​จะ​มอง​ตรงไหน

EN Machine translation in 2014 worked by squeezing an entire source sentence into one fixed-size vector, then unpacking it into the target language — and it fell apart on long sentences, because that one vector had to hold everything at once. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio proposed a fix: let the decoder, at each output word, look back and "align" with the specific source words that mattered right then, instead of relying on a single squeezed summary. They called the scoring mechanism that computed this alignment "attention," though the name wouldn't become famous for another three years. The model still used recurrent networks (RNNs) underneath — attention was a patch on top of them, not yet a replacement. But the core idea — let the model choose what to look at, instead of forcing everything through one bottleneck — is the seed every later chapter in this book grows from.

TH ​ปีค.ศ. 2014 ​การแปล​ภาษา​ด้วย​เครื่อง​ยัง​ทำงาน​แบบ​บีบ​ทั้ง​ประโยค​ต้นทาง​ให้​เหลือ​เป็น​เวกเตอร์​ก้อน​เดียว ​แล้ว​ค่อย​คลี่​ออกมา​เป็น​ภาษา​ปลายทาง — ​พอ​ประโยค​ยาว​ขึ้น​มัน​พัง​ทันที ​เพราะ​เวกเตอร์​ก้อน​เดียว​ต้อง​แบก​ทุกอย่าง​ไว้​พร้อมกัน Bahdanau, Cho ​และ Bengio ​เสนอ​ทางแก้​ว่า ​ให้ decoder ​มอง "​ย้อนกลับ" ​ไปหา​คำ​ต้นทาง​ที่​เกี่ยวข้อง​ตรงจุด​นั้น​ได้​เลย​ใน​แต่ละ​คำ​ที่​กำลัง​แปล ​แทนที่จะ​พึ่ง​เวกเตอร์​สรุป​ก้อน​เดียว ​กลไก​ให้คะแนน​ว่า​คำ​ไหน​ควร​มอง​นี้แหละ​ที่​พวกเขา​เรียก​ว่า "attention" — ​แม้​ชื่อ​นี้​จะ​ยัง​ไม่​ดัง​จนกว่า​จะ​ผ่าน​ไป​อีก 3 ​ปี ​ตอนนั้น​โมเดล​ยัง​ใช้ RNN ​เป็น​แกน​หลัก​อยู่ attention ​เป็น​แค่​ของ​แต่ง​เสริม ​ยัง​ไม่​ใช่​ตัว​ที่มา​แทนที่​ทั้ง​ระบบ ​แต่​ไอเดีย​แกนกลาง — ​ให้​โมเดล​เลือก​เอง​ว่า​จะ​มอง​ตรงไหน ​แทนที่จะ​ยัด​ทุกอย่าง​ผ่าน​คอขวด​เดียว — ​คือ​เมล็ดพันธุ์​ที่​ทุก​บท​ต่อจากนี้​ใน​เล่ม​นี้​งอก​ออกมา

Example: Translating a 40-word sentence by first memorizing it as one 10-digit number would be absurd — attention lets the translator glance back at the actual words instead, right when needed. ​ตัวอย่าง: ​จะ​แปล​ประโยค​ยาว 40 ​คำ ​โดย​ท่อง​มัน​ให้​เหลือ​เป็น​เลข 10 ​หลัก​ก่อน​คง​บ้า​ไป​แล้ว — attention ​ทำให้​ผู้แปล​ย้อน​ไปดู​คำ​จริงๆ ​ได้​เลย ​ตรง​จังหวะ​ที่​ต้อง​ใช้

2014 · Bahdanau, Cho & Bengio, "Neural Machine Translation by Jointly Learning to Align and Translate" — arXiv:1409.0473


2. 2017 — Attention Is All You Need

EN In 2017, a team at Google (Vaswani et al.) asked a radical question: what if you threw away the recurrent network entirely and built a model out of nothing but attention? Their answer was the Transformer — every token computes a query, a key, and a value, and attends directly to every other token in the sequence, all in parallel, with no step-by-step recurrence at all. That single change unlocked a training speedup that recurrence had quietly been blocking for years, because parallel matrix multiplication is exactly what GPUs are built for. The paper introduced self-attention as the load-bearing mechanism, plus multi-head attention (several attention "views" running side by side) and an encoder-decoder built entirely from these blocks. Almost a decade later, every architecture in this book — no matter how exotic — still gets compared back to this one as the baseline. Nobody has replaced self-attention outright; every later idea wraps it, compresses it, or interleaves it with something cheaper.

TH ​ปี 2017 ​ทีม​จาก Google (Vaswani ​และ​คณะ) ​ตั้งคำถาม​ที่​ถือว่า​สุดโต่ง​ตอนนั้น — ​ถ้า​ตัด recurrent network ​ทิ้ง​ทั้งหมด ​แล้ว​สร้าง​โมเดล​ขึ้น​จาก attention ​ล้วนๆ ​ล่ะ ​จะ​เป็น​ยังไง ​คำตอบ​คือ Transformer — ​ทุก token ​คำนวณ query, key, value ​ของ​ตัวเอง ​แล้ว "​มอง" ​ไป​ยัง token ​อื่น​ทุก​ตัว​ใน​ลำดับ​ได้​โดยตรง ​พร้อมกัน​หมด​ทุก​ตัว ​ไม่ต้อง​ไล่​ทีละ​สเต็ป​แบบ recurrence ​อีกต่อไป ​การเปลี่ยน​จุด​เดียว​นี้​ปลดล็อก​ความเร็ว​ใน​การเท​รน​ที่ recurrence ​เคย​เป็น​คอขวด​มา​นาน ​เพราะ​การคูณ​เมทริกซ์​แบบ​ขนาน​คือ​สิ่ง​ที่ GPU ​ถูก​ออกแบบ​มา​ให้​ทำ​อยู่แล้ว ​เปเปอร์​นี้​เสนอ self-attention ​เป็น​กลไก​หลัก ​บวก​กับ multi-head attention (attention ​หลาย "​มุมมอง" ​ทำงาน​คู่ขนาน​กัน) ​และ​โครงสร้าง encoder-decoder ​ที่​สร้าง​จาก​บล็อก​เหล่านี้​ล้วนๆ ​เกือบ​สิบ​ปี​ให้หลัง ​ทุก​สถาปัตยกรรม​ใน​เล่ม​นี้ ​ต่อให้​แปลกใหม่​แค่​ไหน ​ก็​ยัง​ถูก​เทียบ​กลับมา​ที่​ตัว​นี้​เป็น baseline ​อยู่ดี ​ไม่​มี​ใคร​แทนที่ self-attention ​ได้​เต็มๆ ​มี​แต่​ห่อ​มัน​ไว้ ​บีบ​ให้​เล็ก​ลง ​หรือ​สลับ​ใช้​ร่วมกับ​กลไก​ที่​ถูก​กว่า

Example: Instead of one reader scanning a paragraph strictly in order, imagine 100 readers scanning the whole page at once, each asking a slightly different question — that's roughly multi-head self-attention, one layer at a time. ​ตัวอย่าง: ​แทนที่จะ​มี​คนอ่าน​คนเดียว​ไล่​อ่าน​ย่อหน้า​ทีละ​บรรทัด ​ลอง​นึก​ภาพ​คน 100 ​คน​กวาด​สายตา​อ่าน​ทั้ง​หน้า​พร้อมกัน ​แต่ละคน​ถาม​คำถาม​ต่างกัน​นิดหน่อย — ​นั่นแหละ​คือ multi-head self-attention ​คร่าวๆ ​ใน​หนึ่ง​เลเยอร์

2017 · Vaswani et al., "Attention Is All You Need" — arXiv:1706.03762


3. 2018–2020 — Same Recipe, Bigger Kitchen / ​สูตร​เดิม ​ครัว​ใหญ่​ขึ้น

EN Once the Transformer existed, the next question wasn't "how does attention work" but "how big can we make this, and what happens." In late 2018, Google's BERT used the Transformer's encoder side, pre-trained on masked-word prediction over huge unlabeled text, and became the new default starting point for almost every language-understanding task. OpenAI pushed the decoder side instead — GPT, then GPT-2 — showing that a Transformer trained simply to predict the next word, at growing scale, started doing things nobody explicitly taught it. By 2020, GPT-3 took that bet to 175 billion parameters and showed a new trick: few-shot learning from nothing but examples in the prompt, no retraining required. Attention itself barely changed in these years — the 2017 architecture mostly held steady. What changed was everything around it: data, parameter count, and compute, scaled by orders of magnitude, revealing that the same mechanism got qualitatively more capable simply by getting bigger.

TH ​พอ Transformer ​เกิดขึ้น​แล้ว ​คำถาม​ต่อไป​ไม่​ใช่ "attention ​ทำงาน​ยังไง" ​อีกต่อไป ​แต่​กลายเป็น "​จะ​ขยาย​ให้​ใหญ่​ได้​แค่​ไหน ​แล้ว​จะ​เกิด​อะไร​ขึ้น" ​ปลายปี 2018 BERT ​ของ Google ​ใช้​ฝั่ง encoder ​ของ Transformer ​เท​รน​แบบ​ทาย​คำ​ที่​ถูก​ปิด​ไว้​จาก​ข้อความ​มหาศาล​ที่​ไม่​มี label ​แล้ว​กลายเป็น​จุด​ตั้งต้น​มาตรฐาน​ใหม่​ของ​งาน​ด้าน​ภาษา​แทบ​ทุกชนิด ​ฝั่ง OpenAI ​เดิน​อีก​ทาง ​เลือก​ฝั่ง decoder ​แทน — GPT ​แล้ว​ต่อ​ด้วย GPT-2 — ​พิสูจน์​ว่า Transformer ​ที่​เท​รน​มา​แค่​ให้​ทาย​คำ​ถัดไป ​พอ​ขยาย​สเกล​ขึ้น​เรื่อยๆ ​กลับ​เริ่ม​ทำ​สิ่ง​ที่​ไม่​มี​ใคร​สอน​มัน​ตรงๆ ​ได้​เอง ​พอ​ถึง​ปี 2020 GPT-3 ​เดิมพัน​ไป​ที่ 175 ​พัน​ล้าน​พารามิเตอร์ ​แล้ว​โชว์​กลเม็ด​ใหม่​คือ few-shot learning ​เรียน​จาก​แค่​ตัวอย่าง​ใน​พร​อมต์ ​ไม่ต้อง​เท​รน​ใหม่​เลย ​ช่วงนี้​ตัว attention ​เอง​แทบ​ไม่​เปลี่ยน ​สถาปัตยกรรม​จาก​ปี 2017 ​ยัง​นิ่ง​อยู่ ​สิ่ง​ที่​เปลี่ยน​คือ​ทุกอย่าง​รอบๆ ​มัน​ต่างหาก — ​ข้อมูล ​จำนวน​พารามิเตอร์ ​และ compute ​ถูก​ขยาย​เป็น​หลายเท่า​ตัว ​จน​พิสูจน์​ให้​เห็น​ว่า​กลไก​เดิม​เป๊ะๆ ​เก่ง​ขึ้น​แบบ​ก้าว​กระโดด​ได้ ​แค่​เพราะ​ทำให้​มัน​ใหญ่​ขึ้น

Example: Same recipe, bigger kitchen — BERT and GPT-1/2 proved the Transformer recipe worked; GPT-3 proved that scaling the kitchen 100× changed what came out of it, not just how fast. ​ตัวอย่าง: ​สูตร​เดิม ​แค่​ครัว​ใหญ่​ขึ้น — BERT ​กับ GPT-1/2 ​พิสูจน์​ว่า​สูตร Transformer ​ใช้ได้​จริง ​ส่วน GPT-3 ​พิสูจน์​ว่า​แค่​ขยาย​ครัว​ให้​ใหญ่​ขึ้น 100 ​เท่า ​ของ​ที่​ออกมา​จาก​ครัว​ก็​เปลี่ยนไป​เลย ​ไม่​ใช่​แค่​เร็ว​ขึ้น

2018–2020 · Devlin et al., "BERT" — arXiv:1810.04805 · Brown et al., "GPT-3: Language Models are Few-Shot Learners" — arXiv:2005.14165


4. 2019–2021 — The Efficiency Wars / ​สงคราม​ประสิทธิภาพ

EN Full self-attention costs grow quadratically with sequence length — double the text, quadruple the compute — and by 2019 that ceiling was the obvious next problem to attack. OpenAI's Sparse Transformer opened the wave that April, factorizing the attention matrix so cost grew closer to n√n than n². A flood of variants followed in 2020: Reformer approximated attention with hashing, Linformer projected it to low rank, Performer used random-feature kernels, and Longformer/BigBird mixed local windows with a handful of fixed global tokens. Google's own "Long Range Arena" benchmark that same year lined many of these up side by side on long-sequence tasks, and the results were sobering — most saved real memory and speed, but at a meaningful quality cost, and none became the new default. The industry's real bottleneck, it would later turn out, wasn't FLOPs at all — it was memory movement, a problem this entire generation of papers wasn't built to solve. So most of this generation quietly stopped being used at frontier scale, even though the papers are still cited constantly as the historical record of what got tried. The lesson that survived: approximating the attention matrix is one lever, but it's not the only — or even the best — one.

TH ​ต้นทุน​ของ self-attention ​เต็ม​รูปแบบ​โต​แบบ​ยกกำลัง​สอง​ตาม​ความยาว​ของ sequence — ​ข้อความ​ยาว​ขึ้น 2 ​เท่า compute ​ต้อง​เพิ่ม 4 ​เท่า ​พอ​ถึง​ปี 2019 ​เพดาน​นี้​ก็​ชัดเจน​แล้ว​ว่า​เป็นปัญหา​ถัดไป​ที่​ต้อง​แก้ Sparse Transformer ​ของ OpenAI ​เปิด​คลื่น​ลูก​นี้​ตั้งแต่​เดือน​เมษายน​ปี​นั้น ​ด้วย​การแยกตัว attention matrix ​ให้​ต้นทุน​ใกล้เคียง n√n ​มากกว่า n² ​ปี 2020 ​มี​ตัวแปร​พรั่งพรู​ตามมาเพียบ — Reformer ​ใช้ hashing ​มา​ประมาณค่า attention, Linformer ​โปรเจกต์​ลง low rank, Performer ​ใช้ random-feature kernel ​ส่วน Longformer ​กับ BigBird ​ผสม local window ​เข้ากับ global token ​จำนวน​หนึ่ง ​เบนช์​มาร์ก "Long Range Arena" ​ของ Google ​ปี​เดียวกัน ​เอา​โมเดล​พวก​นี้​มา​เทียบ​กัน​แบบ​เห็นภาพ​ชัด​บน​งาน sequence ​ยาวๆ ​ผล​ออกมา​ค่อนข้าง​จริงจัง — ​ส่วนใหญ่​ประหยัด​ความจำ​และ​เร็ว​ขึ้น​จริง ​แต่​แลก​กับ​คุณภาพ​ที่​หาย​ไป​พอสมควร ​ไม่​มี​ตัว​ไหน​กลายเป็น​ค่า​เริ่มต้น​ใหม่ ​ปัญหา​คอขวด​จริง​ของ​อุตสาหกรรม ​ซึ่ง​จะ​รู้กัน​ชัด​ใน​อีก​ไม่​กี่​ปี​ถัดมา ​กลับ​ไม่​ใช่ FLOPs ​เลย ​แต่​เป็นการ​ขน​ย้าย​ข้อมูล​ใน​หน่วยความจำ ​ซึ่ง​เป็น​โจทย์​ที่​เปเปอร์​ยุค​นี้​ทั้ง​รุ่น​ไม่​ได้​ถูก​ออกแบบ​มา​แก้ ​โมเดล​กลุ่ม​นี้​ส่วนใหญ่​จึง​ค่อยๆ ​เลิก​ถูก​ใช้​ใน​ระดับ frontier ​แม้​เปเปอร์​จะ​ยัง​ถูก​อ้างอิง​ตลอด​ใน​ฐานะ​บันทึก​ว่า​ไอเดีย​ไหน​เคย​ถูก​ลอง​มา​แล้ว​บ้าง ​บทเรียน​ที่​เหลือ​รอด​มา​คือ ​การประมาณ​ค่า attention matrix ​เป็น​แค่​คันโยก​หนึ่ง ​ไม่​ใช่​คันโยก​เดียว ​หรือ​ด้วยซ้ำ​คันโยก​ที่​ดี​ที่สุด

Example: A dozen inventors race to build a cheaper engine by removing parts — several succeed at "cheaper," almost none keep "drives just as well," and the real bottleneck turns out to be traffic (memory bandwidth), not the engine (FLOPs). ​ตัวอย่าง: ​นักประดิษฐ์​สิบ​กว่า​คน​แข่ง​กัน​สร้าง​เครื่องยนต์​ให้​ถูก​ลง​ด้วย​การถอด​ชิ้นส่วน​ออก ​หลาย​คน​ทำได้ "​ถูก​ลง" ​จริง ​แต่​แทบ​ไม่​มี​ใคร​รักษา "​วิ่ง​ดี​เหมือนเดิม" ​ไว้​ได้ ​แล้ว​คอขวด​จริง​กลับกลาย​เป็น​รถติด (​แบนด์วิดท์​หน่วยความจำ) ​ไม่​ใช่​ตัว​เครื่องยนต์ (FLOPs)

2019–2021 · Child, Gray, Radford & Sutskever, "Sparse Transformer" — arXiv:1904.10509 · Tay et al., "Long Range Arena" — arXiv:2011.04006


5. 2022 — FlashAttention: The Hardware Turn / ​จุด​เปลี่ยน​ที่​ฮาร์ดแวร์

EN By 2022, the field's efficiency instinct changed direction entirely. Instead of approximating attention to make it cheaper, Tri Dao and colleagues asked a different question: what if we compute the exact same attention, with zero quality loss, just smarter about where the numbers live during the computation? Their answer, FlashAttention, tiles the computation so it stays inside a GPU's small, fast on-chip memory (SRAM) instead of constantly writing and reading the full attention matrix from slower high-bandwidth memory. The result was a large speedup with no approximation at all — free performance, which is rare in this field. Within a couple of years it became the single most-deployed efficiency trick in modern AI infrastructure, quietly running underneath almost every serious training or inference job on NVIDIA hardware. FlashAttention has since gone through three more generations (FA2, FA3, FA4), each tuned to newer GPU hardware — but it has never run natively on Apple Silicon, a gap that matters later in this book.

TH ​พอ​ถึง​ปี 2022 ​สัญชาตญาณ​เรื่อง​ประสิทธิภาพ​ของ​วงการ​ก็​เปลี่ยน​ทิศ​ไป​เลย ​แทนที่จะ​ประมาณค่า attention ​ให้​ถูก​ลง Tri Dao ​กับ​ทีม​ตั้งคำถาม​ใหม่ — ​ถ้า​เรา​คำนวณ attention ​แบบ​เป๊ะๆ ​เหมือนเดิม​ทุกอย่าง ​ไม่​เสีย​คุณภาพ​เลย​สักนิด ​แค่​ฉลาด​ขึ้น​เรื่อง​ว่า​ตัวเลข​ควร​อยู่​ตรงไหน​ระหว่าง​คำนวณ​ล่ะ ​คำตอบ​ของ​พวกเขา​คือ FlashAttention ​ซึ่ง tile ​การคำนวณ​ให้​อยู่​ใน​หน่วยความจำ​เร็ว​บน​ชิป GPU (SRAM) ​แทนที่จะ​เขียน​อ่าน attention matrix ​เต็มตัว​จาก​หน่วยความจำ​แบนด์วิดท์​สูง​ที่​ช้า​กว่า​ตลอดเวลา ​ผลลัพธ์​คือ​เร็ว​ขึ้น​มาก​แบบ​ไม่ต้อง​ประมาณค่า​อะไร​เลย ​เป็น performance ​ที่​ได้มา​ฟรีๆ ​ซึ่ง​หา​ได้​ยาก​มาก​ใน​วงการ​นี้ ​ภายใน​ไม่​กี่​ปี ​มัน​กลายเป็น​เทคนิค​ด้าน​ประสิทธิภาพ​ที่​ถูก​ใช้งาน​กว้างขวาง​ที่สุด​ใน​โครงสร้างพื้นฐาน AI ​สมัยใหม่ ​วิ่ง​อยู่​เงียบๆ ​เบื้องหลัง​งาน​เท​รน​หรือ inference ​จริงจัง​แทบ​ทุก​งาน​บน​ฮาร์ดแวร์ NVIDIA ​จากนั้น FlashAttention ​พัฒนา​ต่อ​อีก 3 ​รุ่น (FA2, FA3, FA4) ​แต่ละ​รุ่น​ปรับ​จูน​ให้​เข้ากับ​ฮาร์ดแวร์ GPU ​รุ่นใหม่ๆ ​แต่​ไม่​เคย​รัน​แบบเน​ทีฟ​บน Apple Silicon ​เลย​สัก​รุ่น — ​ช่องว่าง​นี้​สำคัญ​มาก​ใน​บท​หลังๆ ​ของ​เล่ม​นี้

Example: It's the difference between re-fetching one ingredient from a far pantry for every single step of a recipe, versus laying out everything needed on the counter first — same dish, same recipe, far less walking. ​ตัวอย่าง: ​เหมือน​ความต่าง​ระหว่าง​การวิ่ง​ไป​หยิบ​วัตถุดิบ​จาก​ตู้​ไกลๆ ​ทีละขั้น​ตอน​ของ​สูตร​อาหาร ​กับ​การจัด​ทุกอย่าง​ที่​ต้อง​ใช้​มา​วาง​บน​เคาน์เตอร์​ไว้​ก่อน​เลย — ​จาน​เดิม ​สูตร​เดิม ​แต่​เดิน​น้อยลง​เยอะ

2022 · Dao et al., "FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness," NeurIPS — arXiv:2205.14135


6. 2023 — Serving It for Real / ​เสิร์ฟ​ของจริง​ให้ได้

EN By 2023, the field had a new problem: attention worked, and scaling worked, but actually serving these models to real users at long context was its own unsolved engineering challenge. Four separate fixes landed the same year, each attacking a different part of the problem. Grouped-Query Attention (GQA) let many query heads share just a couple of key/value heads, shrinking the KV cache that grows with every generated token. PagedAttention (used in vLLM) stopped treating that KV cache as one giant reserved memory block and instead paged it the way an operating system manages RAM, nearly eliminating waste. StreamingLLM discovered a model could generate forever over a live stream if it kept a small handful of "sink" tokens from the very start, alongside a sliding window of recent ones. Ring Attention showed how to split a sequence across many machines for training on contexts too long for any single accelerator's memory. None of these changed what attention computes — they changed what it costs to actually run, which turned out to be the more urgent problem.

TH ​พอ​ถึง​ปี 2023 ​วงการ​เจอ​ปัญหา​ใหม่ — attention ​ใช้งาน​ได้ดี ​การขยาย​สเกล​ก็ได้​ผล ​แต่​การเสิร์ฟ​โมเดล​พวก​นี้​ให้​ผู้ใช้​จริง​ที่ context ​ยาวๆ ​กลับเป็น​โจทย์​วิศวกรรม​อีก​ก้อน​ที่​ยัง​ไม่​มี​ใคร​แก้​ได้ ​ปี​เดียวกัน​นั้น​มีทาง​แก้ 4 ​อย่าง​ลง​พร้อมกัน ​แต่ละ​อย่าง​จัดการ​คนละ​ส่วน​ของ​ปัญหา Grouped-Query Attention (GQA) ​ให้ query head ​หลาย​ตัว​ใช้ key/value head ​ร่วมกัน​แค่​ไม่​กี่​ตัว ​ทำให้ KV cache ​ที่​โต​ขึ้น​ทุก token ​ที่​สร้าง​มี​ขนาดเล็ก​ลง PagedAttention (​ที่​ใช้​ใน vLLM) ​เลิก​มองว่า KV cache ​เป็น​บล็อก​ความจำ​ก้อน​ใหญ่​ที่​ต้อง​จอง​ไว้​ล่วงหน้า ​แล้ว​เปลี่ยน​มา​แบ่ง​เป็น​หน้าๆ ​แบบ​ที่ OS ​จัดการ RAM ​แทน ​ลด​ความสูญเปล่า​ไป​เกือบ​หมด StreamingLLM ​ค้นพบ​ว่า​โมเดล​สร้าง​ข้อความ​ต่อไป​เรื่อยๆ ​ไม่​มี​ที่​สิ้นสุด​ได้ ​ถ้า​เก็บ token "sink" ​หยิบมือ​หนึ่ง​จาก​จุดเริ่มต้น​ไว้​เสมอ ​คู่​กับ sliding window ​ของ token ​ล่าสุด ​ส่วน Ring Attention ​โชว์​วิธี​ตัด​แบ่ง sequence ​ข้าม​หลาย​เครื่อง ​สำหรับ​เท​รน​บน context ​ที่​ยาว​เกิน​กว่า​หน่วยความจำ​ของ​การ์ด​ใบ​เดียว​จะ​รับ​ไหว ​ไม่​มี​อัน​ไหน​เปลี่ยน​สิ่ง​ที่ attention ​คำนวณ​เลย ​มี​แต่​เปลี่ยน​ต้นทุน​ของ​การรัน​จริง ​ซึ่ง​กลายเป็น​ปัญหา​ที่​เร่งด่วน​กว่า​ด้วยซ้ำ

Example: Four plumbers fix the same house's water bill the same year — one shares pipes between rooms (GQA), one stops reserving a full tank per room (PagedAttention), one keeps a tap open so pressure never collapses (attention sinks), one splits the house across a street of houses (Ring Attention). ​ตัวอย่าง: ​ช่างประปา 4 ​คน ​แก้​บิล​ค่า​น้ำ​บ้าน​เดียวกัน​ใน​ปี​เดียวกัน — ​คน​หนึ่ง​แชร์​ท่อ​ระหว่าง​ห้อง (GQA) ​คน​หนึ่ง​เลิก​จอง​ถังน้ำ​เต็มใบ​ต่อ​ห้อง (PagedAttention) ​คน​หนึ่ง​เปิดก๊อก​ทิ้ง​ไว้​นิดหนึ่ง​ไม่​ให้แรง​ดัน​ตก (attention sinks) ​อีก​คน​ตัด​แบ่ง​บ้าน​กระจาย​ไป​ทั้ง​ซอย (Ring Attention)

2023 · Ainslie et al., "GQA" — arXiv:2305.13245 · Kwon et al., "PagedAttention / vLLM" — vllm.ai blog · Xiao et al., "StreamingLLM" — arXiv:2309.17453 · Liu, Zaharia & Abbeel, "Ring Attention" — arXiv:2310.01889


7. 2023–2024 — Mixture-of-Experts Goes Mainstream / MoE ​กลายเป็น​กระแส​หลัก

EN Mixture-of-Experts wasn't new in 2023 — Noam Shazeer had proposed sparsely-gated MoE back in 2017, and Google's Switch Transformer simplified it to routing each token to just one expert in 2021. What changed in 2023–2024 was adoption at the frontier: instead of one dense feed-forward block per layer doing all the work, labs began shipping models with many specialized expert blocks and a small router sending each token to only a handful of them. The appeal is a kind of economic trick — total parameter count (and therefore capability) can be enormous, while the compute actually spent per token stays small, because most experts sit idle for any given token. The remaining hard problem was routing: how do you keep the router from collapsing onto a few favorite experts, without distorting the model's actual training goal to force balance? DeepSeek's 2024 answer — an auxiliary-loss-free approach, where a learnable per-expert bias nudges routing based on observed load but stays outside the actual gating-weight math — became the practice other labs converged on. By 2026, the pattern is universal: every major frontier release is MoE; the question moved from "MoE or not" to "how do you route well."

TH Mixture-of-Experts ​ไม่​ใช่​ของ​ใหม่​ใน​ปี 2023 — Noam Shazeer ​เสนอ sparsely-gated MoE ​ไว้​ตั้งแต่​ปี 2017 ​แล้ว ​และ Switch Transformer ​ของ Google ​ก็​ทำให้​มัน​เรียบง่าย​ขึ้น​ด้วย​การส่ง token ​แต่ละ​ตัว​ไปหา expert ​แค่​ตัว​เดียว​ใน​ปี 2021 ​สิ่ง​ที่​เปลี่ยน​ใน​ปี 2023–2024 ​คือ​การถูก​นำไปใช้​จริง​ใน​ระดับ frontier ​แทนที่จะ​มี feed-forward block ​หนาแน่น​ตัว​เดียว​ต่อ​เลเยอร์​ทำงาน​ทั้งหมด ​แล็บ​ต่างๆ ​เริ่ม​ปล่อย​โมเดล​ที่​มี expert block ​เฉพาะทาง​จำนวนมาก ​พร้อม router ​ตัวเล็กๆ ​ที่​ส่ง token ​แต่ละ​ตัว​ไปหา​แค่​หยิบมือเดียว​จาก​ทั้งหมด ​เสน่ห์​ของ​มัน​เหมือน​กลเม็ด​ทาง​เศรษฐศาสตร์ — ​จำนวน​พารามิเตอร์​รวม (​และ​ความสามารถ) ​ใหญ่​มหาศาล​ได้ ​ในขณะที่ compute ​ที่​ใช้​จริง​ต่อ token ​ยัง​เล็ก​อยู่ ​เพราะ expert ​ส่วนใหญ่ "​ว่างงาน" ​สำหรับ token ​ใดๆ ​ก็ตาม ​ปัญหา​ที่​ยัง​เหลือ​คือ​เรื่อง routing — ​จะ​ป้องกัน​ไม่​ให้ router ​ไป​กอง​อยู่​ที่ expert ​คน​โปรด​ไม่​กี่​ตัว​ได้​ยังไง ​โดย​ไม่​บิดเบือน​เป้าหมาย​การเท​รน​จริง​ของ​โมเดล​เพื่อ​บังคับ​ความสมดุล ​คำตอบ​ของ DeepSeek ​ใน​ปี 2024 ​คือ​แนวทาง auxiliary-loss-free ​ที่​ให้ bias ​ต่อ expert ​แต่ละ​ตัว​ที่​เรียนรู้​ได้ ​คอย​ปรับ routing ​ตาม​ภาระ​งาน​ที่​สังเกตเห็น​จริง ​แต่​อยู่​นอก​สมการ​คำนวณ​น้ำหนัก gating ​จริงๆ ​กลายเป็น​แนวทาง​ที่​แล็บ​อื่นๆ ​ตามมา​บรรจบ​กัน​หมด ​พอ​ถึง​ปี 2026 ​แพท​เทิร์น​นี้​กลายเป็น​สากล — ​ทุก​โมเดล frontier ​รุ่น​ใหญ่​เป็น MoE ​หมด ​คำถาม​เปลี่ยน​จาก "​จะ​ใช้ MoE ​ไหม" ​ไป​เป็น "​จะ route ​ยังไง​ให้​ดี" ​แทน

Example: A hospital with hundreds of specialists on staff, but any single patient only ever sees a small handful of them, plus one generalist always on duty — huge total expertise, small cost per visit. ​ตัวอย่าง: ​โรงพยาบาล​ที่​มี​ผู้เชี่ยวชาญ​หลาย​ร้อย​คนใน​ทีม ​แต่​คนไข้​แต่ละคน​ได้​เจอ​แค่​หยิบมือเดียว​จาก​ทั้งหมด ​บวก​กับ​หมอ​ทั่วไป​ประจำ​อีก​หนึ่ง​คน ​ความเชี่ยวชาญ​รวม​มหาศาล ​แต่ต้น​ทุน​ต่อ​การมาหา​หมอ​หนึ่ง​ครั้ง​กลับ​เล็ก​นิดเดียว

2023–2024 · Shazeer et al. — arXiv:1701.06538 · Fedus et al., "Switch Transformer" — arXiv:2101.03961 · DeepSeek-V3 auxiliary-loss-free balancing — arXiv:2408.15664


8. 2024 — DeepSeek's Compression Trick (MLA) / ​กลเม็ด​บีบ​อัด​ของ DeepSeek

EN In May 2024, DeepSeek shipped an idea aimed squarely at the KV-cache problem GQA had only partly solved. Instead of sharing key/value heads across query heads, Multi-Head Latent Attention (MLA) compresses the keys and values for each token jointly into one small low-rank latent vector, caches only that tiny vector, and reconstructs the full keys/values back out at attention time. A companion trick — a decoupled rotary position scheme — makes sure positional information survives being compressed this way. The reported result was startling for a compression technique: MLA didn't just save memory, it matched or beat plain multi-head attention on quality, while cutting KV-cache size by roughly 7 to 14 times. That combination — smaller and better, not smaller-but-worse — is unusual enough that MLA quickly spread beyond DeepSeek, into Kimi and GLM's later model lines. It's a different lever from GQA (fewer heads) or hybrid linear attention (Logy's own approach — Logy is the local model running on the author's machine) — proof there was more than one valid way to attack the same cost problem.

TH ​เดือน​พฤษภาคม 2024 DeepSeek ​ปล่อย​ไอเดีย​ที่​เล็ง​ไป​ตรง​ปัญหา KV-cache ​ที่ GQA ​แก้​ได้​แค่​ครึ่ง​เดียว ​แทนที่จะ​แชร์ key/value head ​ข้าม query head ​แบบ GQA, Multi-Head Latent Attention (MLA) ​บีบ​อัด key/value ​ของ​แต่ละ token ​รวมกัน​ให้​เหลือ​เป็น latent vector ​เล็กๆ ​ก้อน​เดียว​แบบ low-rank ​เก็บ​แค่​เวกเตอร์​จิ๋ว​นั้น​ไว้​ใน cache ​แล้ว​ค่อย​ขยาย​กลับเป็น key/value ​เต็ม​ตอน​คำนวณ attention ​จริง ​มี​เทคนิค​คู่​กัน​คือ decoupled rotary position scheme ​ที่​ทำให้​ข้อมูล​ตำแหน่ง​ยัง​รอด​อยู่​แม้​จะ​ถูก​บีบ​แบบนี้ ​ผลลัพธ์​ที่​รายงาน​ออกมา​น่าประหลาด​ใจ​สำหรับ​เทคนิค​บีบ​อัด — MLA ​ไม่​ได้​แค่​ประหยัด​ความจำ ​แต่​คุณภาพ​ยัง​เท่า​หรือ​ดีกว่า plain multi-head attention ​ด้วย ​ในขณะที่​ลด​ขนาด KV-cache ​ลง​ราว 7–14 ​เท่า ​การได้​ทั้ง​เล็ก​ลง​และ​ดีขึ้น ​ไม่​ใช่​เล็ก​ลง​แต่​แย่​ลง ​เป็น​อะไร​ที่​แปลก​พอ​จะ​ทำให้ MLA ​แพร่​ไป​เร็ว​เกินขอบเขต DeepSeek ​เข้าไป​อยู่​ใน​โมเดล​รุ่นหลัง​ของ Kimi ​และ GLM ​ด้วย ​มัน​เป็น​คันโยก​คนละ​แบบ​กับ GQA (​ลด​จำนวน head) ​หรือ hybrid linear attention (​แนวทาง​ของ Logy ​เอง — Logy ​คือ​โมเดล​โล​คัล​ที่​รัน​อยู่​บน​เครื่อง​ของ​ผู้เขียน) — ​เป็นหลัก​ฐาน​ว่า​มี​มากกว่า​หนึ่ง​วิธี​ที่​ใช้ได้​จริง​ใน​การโจมตี​ปัญหา​ต้นทุน​เดียวกัน​นี้

Example: Instead of two people sharing one notebook (GQA), everyone writes in shorthand, and a translator expands it back to full sentences only when someone actually needs to read it (MLA). ​ตัวอย่าง: ​แทนที่จะ​มี​สอง​คน​แชร์​สมุด​จด​เล่ม​เดียวกัน (GQA) ​ทุกคน​เขียนแบบชว​เลข ​แล้ว​มี​นักแปล​คอย​ขยาย​กลับเป็น​ประโยค​เต็ม​เฉพาะตอน​ที่​มี​คน​ต้อง​อ่าน​จริงๆ (MLA)

2024 · DeepSeek-V2, "MLA" — arXiv:2405.04434 · note: Logy does not use MLA (canon §4) — its savings come from GQA + hybrid linear attention instead (see Ch.12)


9. 2025 — Trainable Sparsity & Linear Attention's Comeback / Sparsity ​ที่​เท​รน​มา​แต่ต้น ​กับ​การคัมแบ็ก​ของ Linear Attention

EN 2025 made sparsity and linear attention production-ready instead of merely clever. Native Sparse Attention (NSA), from DeepSeek, trains a model from scratch with three parallel attention branches — coarse compressed blocks, learned fine-grained selected blocks, and a local sliding window — instead of bolting sparsity onto an already-trained dense model afterward. The same month, Moonshot's MoBA applied the Mixture-of-Experts principle directly to attention: a learned router picks which blocks of the sequence each query actually needs to see. Both won major recognition that year — NSA an ACL Best Paper, MoBA a NeurIPS spotlight — and both share one lesson: efficiency trained in from scratch beats efficiency bolted on after. In parallel, a second lineage matured: Gated DeltaNet, a hybrid linear-attention layer combining gated decay with an error-correcting "delta rule," paired at a 3-to-1 ratio with ordinary full attention wrapped in a new sigmoid gate — the same gate that, not coincidentally, directly answers the attention-sink problem StreamingLLM first flagged back in 2023. This exact pairing — three parts Gated DeltaNet to one part gated full attention — is the lineage Logy is built on.

TH ​ปี 2025 ​ทำให้ sparsity ​กับ linear attention "​ใช้งาน​จริง​ได้" ​ไม่​ใช่​แค่​ฉลาด​ใน​เปเปอร์​อีกต่อไป Native Sparse Attention (NSA) ​จาก DeepSeek ​เท​รน​โมเดล​ตั้งแต่​ต้น​ด้วย attention 3 ​สาขา​คู่ขนาน — ​บล็อก​หยาบ​ที่​บีบ​อัด​ไว้ ​บล็อก​ละเอียด​ที่​เลือก​แบบ​เรียนรู้​ได้ ​และ local sliding window — ​แทนที่จะ​เอา sparsity ​ไป​แปะ​ทับ​โมเดล dense ​ที่​เท​รน​เสร็จ​แล้ว​ทีหลัง ​เดือน​เดียวกัน​นั้น MoBA ​ของ Moonshot ​เอา​หลักการ Mixture-of-Experts ​มา​ใช้กับ​ตัว attention ​ตรงๆ ​เลย — router ​ที่​เรียนรู้​ได้​เลือก​ว่า query ​แต่ละ​ตัว​ควร​เห็น​บล็อก​ไหน​ของ sequence ​บ้าง ​ทั้งคู่​ได้​รางวัล​ใหญ่​ใน​ปี​นั้น — NSA ​ได้ ACL Best Paper ​ส่วน MoBA ​ได้ NeurIPS spotlight — ​และ​ให้​บทเรียน​เดียวกัน​คือ ​ประสิทธิภาพ​ที่​ฝัง​มา​ตั้งแต่​เท​รน ​ดีกว่า​ประสิทธิภาพ​ที่​แปะ​เพิ่ม​ทีหลัง ​ในเวลาเดียวกัน ​อีก​สายพันธุ์​หนึ่ง​ก็​เติบโต​เต็มที่ ​คือ Gated DeltaNet ​เลเยอร์ linear-attention ​แบบ hybrid ​ที่รวม gated decay ​กับ "delta rule" ​คอย​แก้ error ​จับคู่​ใน​อัตราส่วน 3 ​ต่อ 1 ​กับ full attention ​ธรรมดา​ที่​ห่อ​ด้วย sigmoid gate ​ตัวใหม่ — ​ซึ่ง​ไม่​ใช่​เรื่อง​บังเอิญ​ที่ gate ​ตัว​นี้แหละ​ที่​ตอบ​โจทย์​ปัญหา attention-sink ​ที่ StreamingLLM ​เคย​ชี้​ไว้​ตั้งแต่​ปี 2023 ​การจับคู่​แบบนี้​เป๊ะๆ — Gated DeltaNet 3 ​ส่วน ​ต่อ gated full attention 1 ​ส่วน — ​คือ​สายพันธุ์​ที่ Logy ​ถูก​สร้าง​ขึ้น​มาจาก​มัน

Example: NSA/MoBA are like teaching an intern the shortcut on day one of training, instead of hiring a fully-trained expert and asking them to unlearn old habits and take shortcuts later. ​ตัวอย่าง: NSA/MoBA ​เหมือน​สอน​ทางลัด​ให้​เด็ก​ฝึกงาน​ตั้งแต่​วัน​แรก​ที่​เข้ามา​เท​รน ​แทนที่จะ​จ้าง​ผู้เชี่ยวชาญ​ที่​เท​รน​มา​เต็ม​รูปแบบ​แล้ว ​มา​ขอให้​เขา​ลืม​นิสัย​เดิม​แล้ว​หัด​ลัด​ทีหลัง

2025 · DeepSeek/Peking University/U. Washington, "NSA" — arXiv:2502.11089 · Moonshot AI/Tsinghua/Zhejiang, "MoBA" — arXiv:2502.13189 · Gated DeltaNet origin — arXiv:2412.06464 · gating fix, NeurIPS 2025 Best Paper — arXiv:2505.06708


10. 2026 — Four Labs, Four Bets / ​สี่​แล็บ ​สี่​เดิมพัน

EN By early 2026, attention architecture stopped converging and started diverging again. Within roughly a two-week window in February, four frontier labs shipped four different, incompatible bets on the same underlying problem. GLM-5 combined MLA with DeepSeek Sparse Attention; Kimi K2.5 used MLA alone, without a sparse-attention layer; Qwen3.5 (and its April successor Qwen3.6 — Logy's own lineage) bet on the hybrid Gated-DeltaNet-plus-Gated-Attention shape. And MiniMax's M2.5 did something nobody expected from a lab that had championed linear attention since 2025: it reverted to plain, full multi-head attention, reportedly "for reliability." No single scheme won outright — each is a different trade-off between memory, quality, training cost, and serving simplicity. It's a useful reminder for anyone reading a "settled best practice" claim about attention: in this field, settled claims have a short half-life, and simplicity is still, sometimes, the winning bet.

TH ​พอ​ถึง​ต้นปี 2026 ​สถาปัตยกรรม attention ​ก็​เลิก​ลู่เข้า​หา​กัน ​แล้ว​เริ่ม​แตก​ทาง​อีกครั้ง ​ใน​ช่วงเวลา​สั้นๆ ​ราว​สอง​สัปดาห์​ของ​เดือน​กุมภาพันธ์ ​แล็บ frontier 4 ​เจ้า​ปล่อยของ​พร้อมกัน 4 ​ทางเลือก​ที่​ต่างกัน​และ​เข้ากัน​ไม่​ได้ ​สำหรับ​ปัญหา​เดียวกัน​เป๊ะๆ GLM-5 ​รวม MLA ​เข้ากับ DeepSeek Sparse Attention, Kimi K2.5 ​ใช้ MLA ​ล้วนๆ ​ไม่​มี​เลเยอร์ sparse attention ​เลย, ​ส่วน Qwen3.5 (​และ​รุ่น​ต่อยอด​เดือน​เมษายน Qwen3.6 ​ที่​เป็น​สายพันธุ์​เดียว​กับ Logy) ​เดิมพัน​กับ​รูปแบบ hybrid Gated-DeltaNet ​บวก Gated-Attention ​และ M2.5 ​ของ MiniMax ​ทำ​สิ่ง​ที่​ไม่​มี​ใคร​คาดคิด​จาก​แล็บ​ที่​เชียร์ linear attention ​มา​ตั้งแต่​ปี 2025 — ​มัน​ถอยกลับ​ไป​ใช้ plain full multi-head attention ​ธรรมดา ​โดย​ให้เหตุผล​ว่า "​เพื่อ​ความน่าเชื่อถือ" ​ไม่​มี​สูตร​ไหน​ชนะ​ขาดลอย ​แต่ละ​ตัว​คือ​การแลก​เปลี่ยนคน​ละ​แบบ​ระหว่าง​ความจำ ​คุณภาพ ​ต้นทุน​การเท​รน ​และ​ความง่าย​ใน​การเสิร์ฟ ​เป็น​เครื่อง​เตือนใจ​ที่​ดี​สำหรับ​ใครก็ตาม​ที่​เจอ​คำกล่าวอ้าง​ว่า "​นี่​คือ best practice ​ที่​ลงตัว​แล้ว" ​เกี่ยวกับ attention — ​ใน​วงการ​นี้ ​คำกล่าวอ้าง​แบบ "​ลงตัว​แล้ว" ​มีอายุ​สั้น​มาก ​และ​ความเรียบง่าย​บางที ​ก็​ยัง​เป็น​เดิมพัน​ที่​ชนะ​ได้​อยู่ดี

Example: Four chefs get the same ingredients and two weeks, and come back with four completely different dishes — one of them, famous for fusion cooking, serves plain rice and calls it the safer bet. ​ตัวอย่าง: ​เชฟ 4 ​คน​ได้​วัตถุดิบ​ชุด​เดียวกัน​กับ​เวลา​สอง​สัปดาห์​เท่ากัน ​กลับมา​พร้อม​อาหาร 4 ​จาน​ที่​ต่างกัน​โดยสิ้นเชิง ​คน​หนึ่ง​ซึ่ง​ดัง​เรื่อง​อาหารฟิวชั่น ​กลับ​เสิร์ฟ​ข้าวสวย​เปล่าๆ ​แล้ว​บอก​ว่า​นี่แหละ​คือ​ทางเลือก​ที่​ปลอดภัย​กว่า

2026 · Labonne, "Qwen3.5" write-up — huggingface.co/blog/mlabonne/qwen35


11. The Future Five / ​ห้า​อนาคต​ที่​กำลังจะ​มาถึง

EN Five more ideas are alive in research right now, none of them yet the default in a shipped frontier chat model — worth knowing not because they're mainstream, but because one of them plausibly is Logy's next chapter. Adaptive Attention — let a model spend more compute on hard tokens and less on easy ones, instead of a fixed budget for every token; still research-stage, no shipped flagship uses it yet. Structured Attention — impose a designed sparsity pattern (block, graph, dilated) instead of letting the model learn where to look, trading flexibility for a guaranteed worst-case cost. Memory-Augmented Attention — give a model a separate, persistent memory beyond its attention window; Titans goes furthest, updating its own weights while reading, scaling past 2 million tokens. Multi-Modal Attention — already not the future but the present: Logy itself ships a vision encoder trained in from scratch, not bolted on afterward. Attention Compression — the strangest one: DeepSeek-OCR renders old text context as an image and reads it back with a cheap vision encoder, for roughly 10–20× fewer tokens carrying the same information.

TH ​อีก​ห้า​ไอเดีย​ที่​ยังมี​ชีวิต​อยู่​ใน​งานวิจัย​ตอนนี้ ​ยัง​ไม่​มี​อัน​ไหน​กลายเป็น​ค่า​เริ่มต้น​ของ​แชท​โมเดล frontier ​ตัว​ไหน​ที่​ปล่อย​จริง​เลย — ​ควร​รู้​ไว้​ไม่​ใช่​เพราะ​มัน​เมน​สตรีม​แล้ว ​แต่​เพราะ​มี​อัน​หนึ่ง​ที่​มีโอกาส​สูง​ว่า​จะ​เป็น​บท​ต่อไป​ของ Logy ​เอง Adaptive Attention — ​ให้​โมเดล​ทุ่ม compute ​กับ token ​ที่​ยาก​มากขึ้น ​และ​ใช้​น้อยลง​กับ token ​ที่​ง่าย ​แทนที่จะ​ให้​งบ​เท่ากัน​หมด​ทุก token ​ตอนนี้​ยังอยู่​ใน​ขั้น​วิจัย ​ยัง​ไม่​มี​โมเดล​เรือธง​ตัว​ไหน​ใช้​จริง Structured Attention — ​กำหนด sparsity pattern ​แบบ​ตายตัว​ไว้​ก่อน (block, graph, dilated) ​แทนที่จะ​ให้​โมเดล​เรียนรู้​เอง​ว่า​ควร​มอง​ตรงไหน ​แลก​ความยืดหยุ่น​กับ​ต้นทุน​ขั้น​แย่​สุด​ที่​รับประกัน​ได้​ล่วงหน้า Memory-Augmented Attention — ​ให้​โมเดล​มี​หน่วยความจำ​แยก​ต่างหาก​ที่อยู่​ได้​นาน​กว่า​หน้าต่าง attention ​ปกติ Titans ​ไป​ไกล​สุด ​ปรับ​น้ำหนัก​ตัวเอง​ระหว่าง​อ่าน​เลย ​ไป​ได้​ไกล​กว่า 2 ​ล้าน token Multi-Modal Attention — ​จริงๆ ​ไม่​ใช่ "​อนาคต" ​แล้ว ​แต่​เป็น "​ปัจจุบัน" — Logy ​เอง​มี vision encoder ​ที่​เท​รน​มา​ตั้งแต่​ต้น​ด้วยกัน ​ไม่​ใช่​ต่อเติม​ทีหลัง Attention Compression — ​ตัว​ที่​แปลกที่​สุด DeepSeek-OCR ​เรนเดอร์ context ​ข้อความ​เก่า​ให้​เป็น​ภาพ ​แล้ว​อ่าน​กลับ​ด้วย vision encoder ​ราคา​ถูก ​ได้ token ​น้อยลง​ราว 10–20 ​เท่า ​สำหรับ​ข้อมูล​ชุด​เดียวกัน

Example: DeepSeek-OCR is like photographing a page of notes instead of retyping it word-for-word — the photo (image tokens) holds almost all the same information in a fraction of the storage. ​ตัวอย่าง: DeepSeek-OCR ​เหมือน​ถ่ายรูป​หน้า​โน้ต​แทนที่จะ​พิมพ์​มัน​ใหม่​ทีละ​คำ — ​รูปถ่าย (image tokens) ​เก็บ​ข้อมูล​ได้​เกือบ​เท่าเดิม ​แต่​ใช้​พื้นที่​แค่​เศษ​เสี้ยว​เดียว

2019–2025 · Sukhbaatar et al. (Adaptive Attention precursor) — arXiv:1905.07799 · Behrouz et al., "Titans" — arXiv:2501.00663 · Qwen3.5 multimodal — HF blog, Feb 2026 · DeepSeek-OCR — arXiv:2510.18234


12. Inside Logy / ​ข้างใน​ตัว Logy

EN Every idea in this book converges, right now, inside one machine: Logy, the local AI that runs privately on the author's own Mac, with no cloud service behind it. Logy — Qwen3.6-35B-A3B — has 40 transformer layers arranged as ten repeating blocks; in each block, three layers run Gated DeltaNet (2024's hybrid linear attention, the direct descendant of the RNN this whole story started by trying to replace) and one layer runs "Gated Attention" — ordinary GQA-style full attention (16 query heads sharing just 2 key/value heads) wrapped in a 2025 sigmoid gate that fights the exact attention-sink problem StreamingLLM first flagged back in 2023. Wrapped around every one of those 40 layers sits a Mixture-of-Experts feed-forward block: 256 experts total, but only 8 routed plus 1 shared expert actually switched on per token — the same idea Shazeer proposed in 2017, now load-bearing. That combination of mostly-constant-cost recurrent layers and a small handful of active experts is very likely why a native 262,144-token context fits in one Mac's unified memory at all, extensible past a million tokens via RoPE scaling. Some finer details aren't publicly confirmed for this exact checkpoint: most likely the DeltaNet gate still works per-head rather than per-channel, consistent with its own lineage, and it's unclear whether QK-Norm survives into these layers — both marked [inferred], not stated as settled fact. Logy does not use MLA, NSA, MoBA, or Ring Attention — its whole efficiency story is "hybrid linear attention + GQA + MoE," nothing more exotic than that. Logy doesn't just use attention — nine years of the field's argument about how to make attention affordable is, quite literally, sitting in its weights.

TH ​ทุก​ไอเดีย​ใน​เล่ม​นี้​มา​บรรจบ​กัน ​ตอนนี้ ​ใน​เครื่อง​เดียว — Logy ​คือ AI ​ท้องถิ่น​ที่​รัน​อยู่​บน Mac ​ของ​ผู้เขียน​เอง ​เป็น​ส่วนตัว ​ไม่​มี​บริการ​คลาวด์​อยู่​เบื้องหลัง Logy ​หรือ Qwen3.6-35B-A3B ​มี 40 ​เลเยอร์ Transformer ​จัด​เป็น 10 ​บล็อก​ที่​ซ้ำ​กัน ​ใน​แต่ละ​บล็อก 3 ​เลเยอร์​รัน Gated DeltaNet (hybrid linear attention ​ของ​ปี 2024 ​ซึ่ง​เป็น​ทายาท​ตรง​ของ RNN ​ที่​เรื่อง​ทั้งหมด​นี้​เริ่มต้น​จาก​การพยายาม​แทนที่​มัน) ​และ​อีก 1 ​เลเยอร์​รัน "Gated Attention" — GQA ​แบบ​ปกติ (query head 16 ​ตัว​ใช้ key/value head ​ร่วมกัน​แค่ 2 ​ตัว) ​ห่อ​ด้วย sigmoid gate ​จาก​ปี 2025 ​ที่​สู้​กับ​ปัญหา attention-sink ​ตัว​เดียว​กับ​ที่ StreamingLLM ​เคย​ชี้​ไว้​ตั้งแต่​ปี 2023 ​ห่อ​รอบ​ทั้ง 40 ​เลเยอร์​นี้​คือ Mixture-of-Experts feed-forward block — expert ​รวม 256 ​ตัว ​แต่​เปิด​ใช้งาน​จริง​แค่ 8 ​ตัว​ที่ routed ​บวก 1 ​ตัว​ที่ shared ​ต่อ token ​เดียว ​ไอเดีย​เดียว​กับ​ที่ Shazeer ​เสนอ​ไว้​ตั้งแต่​ปี 2017 ​ตอนนี้​กลายเป็น​แกน​สำคัญ​ไป​แล้ว ​การผสม​กัน​ของ​เลเยอร์ recurrent ​ที่​ต้นทุน​เกือบ​คงที่ ​กับ expert ​หยิบมือเดียว​ที่ทำงาน​จริง ​น่าจะเป็น​เหตุผล​หลัก​ที่ context ​ยาว​ถึง 262,144 token ​แบบเน​ทีฟ ​ยัด​ลง​ใน​หน่วยความจำ unified ​ของ Mac ​เครื่อง​เดียว​ได้ ​ขยาย​ไป​ได้​ไกล​กว่า​ล้าน token ​ด้วย RoPE scaling ​รายละเอียด​ปลีกย่อย​บาง​จุด​ยัง​ไม่​มี​แหล่งข้อมูล​สาธารณะ​ยืนยัน​สำหรับ checkpoint ​ตัว​นี้​เป๊ะๆ — ​น่าจะเป็น​ไป​ได้มา​กว่า gate ​ของ DeltaNet ​ยัง​ทำงาน​แบบ​ต่อ-head ​ไม่​ใช่​ต่อ-channel ​ตาม​สายพันธุ์​เดิม​ของ​มัน ​และ​ก็​ยัง​ไม่​ชัด​ว่า QK-Norm ​รอด​มาถึง​เลเยอร์​พวก​นี้​ไหม — ​ทั้งคู่​ขอ​ทำเครื่องหมาย [inferred] ​ไว้ ​ไม่​ใช่​ข้อเท็จจริง​ที่​ฟันธง​ได้ Logy ​ไม่​ใช้ MLA, NSA, MoBA ​หรือ Ring Attention — ​เรื่อง​ประสิทธิภาพ​ทั้งหมด​ของ​มัน​คือ "hybrid linear attention + GQA + MoE" ​ไม่​มี​อะไร​ซับซ้อน​ไป​กว่า​นั้น Logy ​ไม่​ได้​แค่ "​ใช้" attention ​เท่านั้น — ​เก้า​ปี​ของ​ข้อ​ถกเถียง​ทั้ง​วงการ​ว่า​จะ​ทำให้ attention ​ใช้งาน​ได้​จริง​ใน​ราคา​ที่​จ่าย​ไหว ​ตอนนี้​นั่ง​อยู่​ใน​น้ำหนัก​ของ​มัน​เอง ​ตามตัว​อักษร​เลย

Example: Open Activity Monitor while asking Logy a long question — the near-flat memory curve you'd see is 30 of its 40 layers quietly refusing to grow a KV cache at all. ​ตัวอย่าง: ​ลอง​เปิด Activity Monitor ​แล้ว​ถาม Logy ​คำถาม​ยาวๆ ​ดู ​เส้น​กราฟ​หน่วยความจำ​ที่​แทบ​ไม่​ขยับ​นั่นแหละ ​คือ 30 ​ใน 40 ​เลเยอร์​ของ​มัน ​กำลัง​ปฏิเสธ​ที่จะ​ขยาย KV cache ​อยู่​เงียบๆ

2026 · MarkTechPost, "Qwen team open-sources Qwen3.6-35B-A3B" — marktechpost.com · architecture detail per AICE Attention Canon §7; gating granularity and QK-Norm retention marked [inferred]/[unconfirmed] in the canon itself.


End of minibook. Written 2026-07-31 for ICE. ​จบ​เล่ม ​เขียน​ไว้​เมื่อ 2026-07-31 ​สำหรับ ICE

จบเล่มA Short History of Paying Attentionกลับหน้าหนังสือ
Size
Page
Font

A Short History of Paying Attention

❦
1A Short History of Paying Attention — ประวัติศาสตร์ย่อของการใส่ใจ