engineering-notes/snippets at main · hpdkhoa/engineering-notes · GitHub
Skip to content

Latest commit

 

History

History

snippets

Folders and files

English · Tiếng Việt

Snippets: small runnable examples

Small Python files that run on their own with toy data, showing techniques the projects use. None of the production code, prompts, data or configuration from HieuLuat or gen-system is in here.

They exist so you can check a claim from a writeup yourself, without me handing over anything private.

Each file runs with a standard Python 3 install. They need only the standard library, plus NumPy where a file says so. They need no GPU, database or network.

File What it shows From
toy_retrieval.py Retrieve then rerank over fake vectors, and why you must check an index's recall retrieval optimization
roofline_demo.py Naive against blocked matrix multiply, and the memory versus compute intuition inference optimization

Run either one directly:

python3 toy_retrieval.py
python3 roofline_demo.py

These are teaching examples. The real systems are larger and messier. HieuLuat's implementation is proprietary, and gen-system's is open source under Apache-2.0. Run them to watch each idea work at small scale.