Notes on AI, machine learning, Python, and data engineering, plus tools I build.
Selected posts
More selected posts →Latest posts
Copying nested lists in Python
A look at what changes when a copied Python list contains other lists.
Python 淺拷貝與巢狀串列
用 list.copy() 備份巢狀串列之後,修改資料會發生什麼事?從兩種修改方式看看淺拷貝的範圍。
RAG 混合檢索的 Reciprocal Rank Fusion
從官方範例看看文字搜尋和向量搜尋的結果,如何用 RRF 合併排序。
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.
Latest by category
More posts
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.
DeepSeek-V3 的 Multi-head Latent Attention 如何壓縮 KV 快取
我們來看看 DeepSeek-V3 如何利用 MLA 的低維潛在向量壓縮 KV 快取,解決長序列推論時的記憶體瓶頸。
CPython's dict layout
A look at how CPython lays out a dict in memory.
Python dict 的優化
從 Python 3.6 dict 的改寫,來看看插入順序如何跟著記憶體優化。
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.
JSON schema 怎麼限制 LLM 的輸出
我們用 xgrammar 看看給了 JSON schema 之後,模型會受到甚麼影響。