From-Scratch GGUF Weight Loader with Blockwise Dequantization, mmap Streaming, and Safetensors Export
A practical guide to implementing a GGUF loader with blockwise dequantization and safetensors export, demonstrating low-level systems expertise.
A practical guide to implementing a GGUF loader with blockwise dequantization and safetensors export, demonstrating low-level systems expertise.
This project demonstrates how to validate safetensors schemas and read sharded model weights using memory-mapped files, showing practical systems expertise.
Introduction Memory-mapped files (mmap) let you treat file contents (or anonymous memory) as a region of your process’s virtual memory. Instead of calling read/write in loops, you map a file, then access it as if it were an in-memory buffer. The kernel transparently brings pages into RAM on demand and writes them back when needed. This can reduce system calls, enable zero-copy I/O, and open up powerful patterns like inter-process shared memory. ...