Skip to content

Commit 9c23685

Browse files
mergennachinclaude
andcommitted
Switch runner to Module::LoadMode::Mmap
All other runners in examples/models/ use Mmap. The two LLM runners (qwen3_5_moe, gemma4_31b) were the outliers using File, likely inherited rather than intentional. File uses pread() syscalls per access; Mmap maps the file lazily and benefits from the OS page cache. For a 21 GB .pte this matters: per-access pread has measurable overhead and prevents kernel-level read-ahead. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 417b19b commit 9c23685

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/models/gemma4_31b/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ int main(int argc, char** argv) {
155155
auto module = std::make_unique<Module>(
156156
FLAGS_model_path,
157157
data_files,
158-
Module::LoadMode::File,
158+
Module::LoadMode::Mmap,
159159
/*event_tracer=*/nullptr,
160160
/*memory_allocator=*/nullptr,
161161
/*temp_allocator=*/nullptr,

0 commit comments

Comments
 (0)