Technical notes by KbWen

Notes on AI, machine learning, Python, and data engineering, plus tools I build.

Latest posts

Copying nested lists in Python
Python

Copying nested lists in Python

A look at what changes when a copied Python list contains other lists.

2026-10-27 · 4 min read · 735 words · KbWen · EN
Python 淺拷貝與巢狀串列
Python

Python 淺拷貝與巢狀串列

用 list.copy() 備份巢狀串列之後,修改資料會發生什麼事?從兩種修改方式看看淺拷貝的範圍。

2026-10-27 · 2 min read · 620 words · KbWen · ZH
RAG 混合檢索的 Reciprocal Rank Fusion
AI Systems

RAG 混合檢索的 Reciprocal Rank Fusion

從官方範例看看文字搜尋和向量搜尋的結果,如何用 RRF 合併排序。

2026-10-27 · 3 min read · 1211 words · KbWen · ZH
Reciprocal rank fusion with multiple vector fields
AI Systems

Reciprocal rank fusion with multiple vector fields

A closer look at the result lists that go into reciprocal rank fusion when a hybrid search uses several vector fields.

2026-10-27 · 3 min read · 638 words · KbWen · EN

Latest by category

More posts

AI Systems

DeepSeek-V3's auxiliary-loss-free load balancing and multi-token prediction

A look at how DeepSeek-V3 keeps load even across its experts during training, and what its multi-token prediction module is for.

2026-10-20 · 4 min read · 764 words · KbWen · EN
AI Systems

DeepSeek-V3 的 Multi-head Latent Attention 如何壓縮 KV 快取

我們來看看 DeepSeek-V3 如何利用 MLA 的低維潛在向量壓縮 KV 快取,解決長序列推論時的記憶體瓶頸。

2026-10-20 · 3 min read · 1116 words · KbWen · ZH
Python

CPython's dict layout

A look at how CPython lays out a dict in memory.

2026-10-20 · 4 min read · 695 words · KbWen · EN
Python

Python dict 的優化

從 Python 3.6 dict 的改寫,來看看插入順序如何跟著記憶體優化。

2026-10-20 · 3 min read · 1235 words · KbWen · ZH
AI Systems

How constrained decoding works for JSON

Let's see how a JSON schema, or a plain JSON mode, changes what a model is able to write.

2026-10-12 · 5 min read · 894 words · KbWen · EN
AI Systems

JSON schema 怎麼限制 LLM 的輸出

我們用 xgrammar 看看給了 JSON schema 之後,模型會受到甚麼影響。

2026-10-12 · 3 min read · 1351 words · KbWen · ZH