Add inputs_to_logits_ratio to LasrCTCConfig#42720
Merged
eustlb merged 6 commits intohuggingface:mainfrom Dec 12, 2025
Merged
Conversation
Contributor
Author
|
@eustlb |
Contributor
Author
|
Unfortunately this will break decoding with LM. Perhaps we should just hardcode hop_length to a fixed value for now in LasrFeatureExtractor? |
Contributor
Author
db37839 to
ed579ba
Compare
eustlb
approved these changes
Dec 11, 2025
Comment on lines
+391
to
+405
|
|
||
| @slow | ||
| @unittest.skip(reason="TODO when checkpoint") | ||
| def test_model_integration_pipe_with_chunk(self): | ||
| EXPECTED_TRANSCRIPTIONS = [ | ||
| {"text": "Mr. Kuer is thele of the middle classes and we are glad to welcome his gosal.</s>"} | ||
| ] | ||
|
|
||
| samples = self._load_datasamples(1) | ||
| pipe = pipeline( | ||
| task="automatic-speech-recognition", model=self.checkpoint_name, dtype=self.dtype, device_map=torch_device | ||
| ) | ||
| self.assertEqual(pipe.type, "ctc") | ||
| predicted_transcripts = pipe(samples, chunk_length_s=3, stride_length_s=1) | ||
| self.assertListEqual(predicted_transcripts, EXPECTED_TRANSCRIPTIONS) |
…echRecognition pipeline
ed579ba to
83212a0
Compare
5 tasks
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: lasr |
|
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. |
SangbumChoi
pushed a commit
to SangbumChoi/transformers
that referenced
this pull request
Jan 23, 2026
* Add inputs_to_logits_ratio to LasrCTCConfig * changes * nit * update * Add an _align_to property to unify stride computation in AutomaticSpeechRecognition pipeline --------- Co-authored-by: Eustache Le Bihan <eulebihan@gmail.com> Co-authored-by: eustlb <94853470+eustlb@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds inputs_to_logits_ratio to LasrCTCConfig so that LasrForCTC can be used in an ASR pipeline with chunked decoding.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.