Fix output labels for AudioFlamingo3 (and related) models#47112
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
| model_inputs = super().__call__(audio=audio, text=text, **kwargs) | ||
|
|
||
| if output_labels: | ||
| labels = model_inputs.pop("mm_token_type_ids") |
There was a problem hiding this comment.
the fix. the other two are generated via modular
There was a problem hiding this comment.
Not necessarily here but I expect quite a few to do the same ish re shifting based on the input --> maybe a util?
| labels = model_inputs.pop("mm_token_type_ids") | ||
| mm_token_type_ids = model_inputs.pop("mm_token_type_ids") | ||
| labels = model_inputs["input_ids"].clone() |
There was a problem hiding this comment.
omg, right! Thanks for catching that
|
should we add a test in processor tester? would be nice so we can catch bugs early on |
|
|
||
| @property | ||
| def audio_ids(self): | ||
| def audio_token_ids(self): |
There was a problem hiding this comment.
should we still be a bit careful and make some BC deprecation
vasqu
left a comment
There was a problem hiding this comment.
Just nits but overall looks good, thanks 🙏
| model_inputs = super().__call__(audio=audio, text=text, **kwargs) | ||
|
|
||
| if output_labels: | ||
| labels = model_inputs.pop("mm_token_type_ids") |
There was a problem hiding this comment.
Not necessarily here but I expect quite a few to do the same ish re shifting based on the input --> maybe a util?
|
|
||
| @property | ||
| def audio_ids(self): | ||
| def audio_token_ids(self): |
There was a problem hiding this comment.
should we still be a bit careful and make some BC deprecation
There was a problem hiding this comment.
Nit if we are already testing audio flamingo and music flamingo we should also glm asr imo
There was a problem hiding this comment.
GLM ASR doesn't have processor tests 🥲 but adding some!
|
[For maintainers] Suggested jobs to run (before merge) run-slow: audioflamingo3, glmasr, musicflamingo |
CI recapDashboard: View test results in Grafana |
What does this PR do?
Fix bug in prepared output labels, as mentioned here, after this refactor I think?
Script comparing before/after fix