Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the capabilities fields to null when the model status is "after-download"? #58

Open
lozy219 opened this issue Nov 12, 2024 · 1 comment

Comments

@lozy219
Copy link
Contributor

lozy219 commented Nov 12, 2024

In the IDL of capabilities API, we have

  // Always null if available === "no"
  readonly attribute unsigned long? defaultTopK;
  readonly attribute unsigned long? maxTopK;
  readonly attribute float? defaultTemperature;
  readonly attribute float? maxTemperature;

Those optional attributes should also be set to null when available === "after-download" since the model is not ready yet.
It only becomes an issue after we migrated the sampling param config to the model.

@domenic
Copy link
Collaborator

domenic commented Nov 13, 2024

Hmm.

The intention here is that this information is supposed to be available before the download, because it might impact whether a web developer wants to spend the user's bandwidth downloading the model, or not. This is discussed in https://github.com/WICG/translation-api#:~:text=This%20design%20means%20that%20the,mechanism%20that%20eagerly%20pushes%20updates.)

However, that's more important for questions like the supported languages. It's harder to imagine a web developer saying that they don't want to use the prompt API if maxTemperature only goes up to 1.0, or something like that.

So maybe we can keep the capabilities hyperparameters as null in the after-download state, even though we need to support languageAvailable() in that state.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants