Closed Bug 2095108 Opened 10 days ago Closed 8 days ago

[wpt-sync] Sync PR 65055 - Add SemanticEmbedder.maxInputTokens

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox163 fixed)

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 65055 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/65055
Details from upstream follow.

Ian Zhao <yinguang@google.com> wrote:

Add SemanticEmbedder.maxInputTokens

Pages need to know how many tokens one embed() input can hold, so they
can split longer text first.

This CL makes three changes:

  1. Add a readonly SemanticEmbedder.maxInputTokens, the model's input
    token limit including the control tokens it adds. It is fixed when
    the embedder is created.
  2. Send it with the new embedder in an AISemanticEmbedderInfo. The
    browser reads it from the model metadata's input_window_size, which
    EmbedderMetadata now carries to AISemanticEmbedderServiceLauncher.
  3. Add the SemanticEmbedder_MaxInputTokens UseCounter, update the
    content_shell echo, and add a WPT.

Bug: 529859872
Change-Id: I6227275a494cbf871a54bd45b7c2110d7800278e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8722968
Reviewed-by: Mike Wittman \<wittman@chromium.org>
Commit-Queue: Ian Zhao \<yinguang@google.com>
Reviewed-by: Nathan Memmott \<memmott@chromium.org>
Reviewed-by: Will Harris \<wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1742075}

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
FAIL : 1

Chrome

OK : 1
PRECONDITION_FAILED: 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.