Closed Bug 2046983 Opened 5 months ago Closed 2 months ago

Wire the Accelerated Inference Process into the existing createEngine workflow.

Categories

(Core :: Machine Learning: On Device, task, P3)

task

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: gregtatum, Assigned: vpollet)

References

(Blocks 1 open bug)

Details

(Whiteboard: [aiplatform])

Attachments

(4 external files, 1 obsolete file)

There is a bunch of design work that needs to go into this before it's ready to start. The model for the createEngine -> MLEngineParent -> MLEnginerChild doesn't map cleanly to this new architecture. We'll need to figure out lifetimes, and ensure the ModelHub works when passing around file descriptors.

Whiteboard: [aiplat]
Whiteboard: [aiplat] → [aiplatform]

Gated behind pref browser.ml.llama.hwInference.
Introducing TextGenerationEngine.sys.mjs, a facade over TextGenerator exposing the same API as MLEngine.
When pref is toggled, the MLEngineParent hands out TextGenerationEngines instead of MLEngines.
Call-sites don't need updating: they consume inference using the same API, through the TextGenerationEngine.

Attachment #9621323 - Attachment description: WIP: Bug 2046983 - Part 1: Introducing TextGenerator, WebIDL surface over PTextGeneration → WIP: Bug 2046983 - Part 1: Add TextGenerator, WebIDL surface over PTextGeneration

Typed profiler markers over two tracks: the process lifecycle on one, and the engine, generator and model tiers of a generation nested on the other.

Assignee: nobody → vpollet
Status: NEW → ASSIGNED
Attachment #9622682 - Attachment description: WIP: Bug 2046983 - Part 4: Add profiler markers to llama.cpp operations in HWInference → WIP: Bug 2046983 - Part 3: Add profiler markers to llama.cpp operations in HWInference

Comment on attachment 9621325 [details]
WIP: Bug 2046983 - Part 3: Run the llama.cpp smoke and perf tests on both paths

Revision D316059 was moved to bug 2046990. Setting attachment 9621325 [details] to obsolete.

Attachment #9621325 - Attachment is obsolete: true
Attachment #9639821 - Attachment description: WIP: Bug 2046983 - Part 4: Test the telemetry contracts of the HWInference text generation path → WIP: Bug 2046983 - Part 4: Add host process to ML telemetry
Attachment #9621323 - Attachment description: WIP: Bug 2046983 - Part 1: Add TextGenerator, WebIDL surface over PTextGeneration → WIP: Bug 2046983 - Part 1: Add TextGenerator, WebIDL surface over PTextGeneration r?gregtatum
Attachment #9621324 - Attachment description: WIP: Bug 2046983 - Part 2: Route llama.cpp MLEngine to HWInference → WIP: Bug 2046983 - Part 2: Route llama.cpp MLEngine to HWInference r?gregtatum
Attachment #9622682 - Attachment description: WIP: Bug 2046983 - Part 3: Add profiler markers to llama.cpp operations in HWInference → WIP: Bug 2046983 - Part 3: Add profiler markers to llama.cpp operations in HWInference r?gregtatum
Attachment #9639821 - Attachment description: WIP: Bug 2046983 - Part 4: Add host process to ML telemetry → WIP: Bug 2046983 - Part 4: Add host process to ML telemetry r?gregtatum
Attachment #9621323 - Attachment description: WIP: Bug 2046983 - Part 1: Add TextGenerator, WebIDL surface over PTextGeneration r?gregtatum → Bug 2046983 - Part 1: Add TextGenerator, WebIDL surface over PTextGeneration r?gregtatum
Attachment #9621324 - Attachment description: WIP: Bug 2046983 - Part 2: Route llama.cpp MLEngine to HWInference r?gregtatum → Bug 2046983 - Part 2: Route llama.cpp MLEngine to HWInference r?gregtatum
Attachment #9622682 - Attachment description: WIP: Bug 2046983 - Part 3: Add profiler markers to llama.cpp operations in HWInference r?gregtatum → Bug 2046983 - Part 3: Add profiler markers to llama.cpp operations in HWInference r?gregtatum
Attachment #9639821 - Attachment description: WIP: Bug 2046983 - Part 4: Add host process to ML telemetry r?gregtatum → Bug 2046983 - Part 4: Add host process to ML telemetry r?gregtatum
Pushed by vpollet@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5a2fd54344f7 https://hg.mozilla.org/integration/autoland/rev/70cf61e45ae1 Part 1: Add TextGenerator, WebIDL surface over PTextGeneration r=decoder,ai-platform-reviewers,gregtatum https://github.com/mozilla-firefox/firefox/commit/fdc8b70089aa https://hg.mozilla.org/integration/autoland/rev/1a24cb9a80fd Part 2: Route llama.cpp MLEngine to HWInference r=gregtatum,ai-platform-reviewers https://github.com/mozilla-firefox/firefox/commit/7a70eddde8dd https://hg.mozilla.org/integration/autoland/rev/b9238370eaef Part 3: Add profiler markers to llama.cpp operations in HWInference r=ai-platform-reviewers,gregtatum https://github.com/mozilla-firefox/firefox/commit/b52ae7ca257e https://hg.mozilla.org/integration/autoland/rev/a50302842314 Part 4: Add host process to ML telemetry r=gregtatum,ai-platform-reviewers
QA Whiteboard: [qa-triage-done-c160/b159]
Regressions: 2090866
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: