Closed Bug 2049478 Opened 26 days ago Closed 21 days ago

[llama.cpp] llama_model_params::use_mmap is exposed but not honored properly

Categories

(Core :: Machine Learning: On Device, defect, P2)

defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: vpollet, Assigned: vpollet)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The native llama.cpp AI backend exposes a lot of options from llama.cpp to be configured by LlamaCppPipeline (the JS consumer). One of those options is use_mmap, set on llama_model_params. This option is exposed through PipelineOptions and re-exposed by the LlamaCppPipeline.

One of the patches we apply on top of llama.cpp unconditionally disables the option.

This is a defect because the only real consumer of the native backend, Link Preview, requests this option. The option should either not be exposed to the pipeline configuration, or properly honored.

Assignee: nobody → vpollet
Status: NEW → ASSIGNED

The patch introducing loading from file descriptor was rewritten to reuse code upstream. The new version honors the use_mmap when the old one did not. This makes sure we're not changing the behavior of Link Preview (only consumer) which used to request it while it was silently ignored. Old behavior: pass use_mmap=true, ignored -> no mmap. New behavior: pass use_mmap=false, honored -> no mmap.

Pushed by vpollet@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a3a1ad8e7b5b https://hg.mozilla.org/integration/autoland/rev/50bc7de5fb65 Update llama.cpp to 74ade527 - Set Link Preview useMmap off to match old behavior r=padenot,Mardak
Status: ASSIGNED → RESOLVED
Closed: 21 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: