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

[gradio] Set Default Models for Summarization and Translation #1246

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

rholinshead
Copy link
Contributor

@rholinshead rholinshead commented Feb 14, 2024

[gradio] Set Default Models for Summarization and Translation

The default translation and summarization models are broken for the remote inference client, raising a KeyError for summary_text and translation_text, respectively.

We can hardcode working defaults for these parsers for now, based on the top most "liked" models for the relevant tasks:

Screenshot 2024-02-14 at 10 54 24 AM
Screenshot 2024-02-14 at 10 55 32 AM

NOTE: This translation model requires specifying the target and source lang, otherwise it errors about them missing. I think this is fine for now, for a few reasons:

  • it's better than current default of failing without clear error message and with no way to resolve (now, just add tgt and src lang)
  • there are very few good translation models in the hub that actually work with inference API and those that do either require the src and tgt lang or are a poor UX/quality:
    Screenshot 2024-02-14 at 10 59 12 AM
  • if we use this translation model with correct settings in our quickstart example, most people will probably clone and have the settings already or can at least use our quickstart as a reference

@Ankush-lastmile
Copy link
Member

Ankush-lastmile commented Feb 14, 2024

those that do either require the src and tgt lang

Could we specify defaults for src & tgt lang in the schema to resolve this?

Copy link
Member

@Ankush-lastmile Ankush-lastmile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rholinshead
Copy link
Contributor Author

rholinshead commented Feb 14, 2024

those that do either require the src and tgt lang

Could we specify defaults for src & tgt lang in the schema to resolve this?

I don't think so, because then we will be setting that if people pick models that don't support it and they'd have no way to remove it (essentially our 'stream' issue all over again :s )

@rholinshead rholinshead merged commit d98241e into main Feb 14, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants