# Upstream Work

This page records public ecosystem issues and pull requests that came out of implementing and validating this package. It is not a dependency list or a claim that unmerged work has been accepted upstream. Where the table identifies corresponding local behavior, the package implements it independently and does not import code from these submission branches; some listed work is upstream-only. Statuses were checked on 2026-07-15; the linked GitHub records are authoritative if their state changes.

## Contributions

| Area | Public record | Status on 2026-07-15 | Relationship to this package |
|---|---|---|---|
| Repeated generation-loop detection | Transformers [issue #32902](https://github.com/huggingface/transformers/issues/32902) and [PR #47271](https://github.com/huggingface/transformers/pull/47271) | Open PR | The [local ASR generation guard](../src/cohere_transcribe/asr/generation.py) applies the production policy, tracks affected rows, and checks every eligible generated token after its minimum-token gate. The PR generalizes the core repeated-block test into a reusable, stateless Transformers stopping criterion. The package does not depend on the PR. |
| Cached Cohere encoder projection | Transformers [issue #47272](https://github.com/huggingface/transformers/issues/47272) and [tested patch](https://github.com/AliOsm/transformers/commit/52d19f812c7af98902f21ea4fa6c653dc228109c) | Open issue; tested patch awaits maintainer approval before PR | The [local model wrapper](../src/cohere_transcribe/asr/model.py) memoizes the projection for one decode and clears it afterward. The proposed upstream implementation instead uses the decoder cross-attention cache lifecycle to avoid mutable wrapper state. Both target one projection per cached decode, but they are different implementations. |
| Cohere chunk reassembly validation | Transformers [issue #47273](https://github.com/huggingface/transformers/issues/47273) and [tested patch](https://github.com/AliOsm/transformers/commit/05eb46aadec3b7db21fa8039ad96e056a73a6fa8) | Open issue; tested patch awaits maintainer approval before PR | The package deliberately keeps every script-controlled segment to one processor row and [rejects missing, duplicate, or expanded rows](../src/cohere_transcribe/asr/generation.py). The proposed upstream patch hardens the processor's more general multi-chunk reassembly path, including valid all-empty chunk groups. |
| Numerically stable ONNX emission normalization | DeskPai `ctc_forced_aligner` [issue #3](https://github.com/deskpai/ctc_forced_aligner/issues/3) and [PR #4](https://github.com/deskpai/ctc_forced_aligner/pull/4) | Issue open; PR closed unmerged | This is historical work against a third-party PyPI fork, not the maintained MahmoudAshraf97 project. The package no longer depends on that fork and performs cropped accelerator-side FP32 [`torch.log_softmax`](../src/cohere_transcribe/alignment/runtime.py) instead. |
| State-preserving offline Silero ONNX inference | Silero VAD [PR #784](https://github.com/snakers4/silero-vad/pull/784) | Open and ready for review after maintainer-requested narrowing | The package has its own bounded 256-frame ONNX sequence runner around a faster-whisper-distributed Silero v6 export, while its measured batch default is packed CPU Torch. The revised PR adds a self-contained export and bounded-runner example without changing Silero's package API, core source, dependencies, or shipped models. The package does not depend on the PR. |
| Bounded CTC emission generation | `ctc-forced-aligner` [issue #89](https://github.com/MahmoudAshraf97/ctc-forced-aligner/issues/89) and [PR #95](https://github.com/MahmoudAshraf97/ctc-forced-aligner/pull/95) | Open PR | The [local alignment runtime](../src/cohere_transcribe/alignment/runtime.py) independently keeps complete audio and emissions on the CPU, transfers one bounded window batch to the accelerator, and learns a smaller batch after OOM. PR #95 contributes the same duration-independent accelerator-memory property to the maintained aligner's public API and CLI. |
| Compact forced-alignment backpointer growth | `ctc-forced-aligner` [issue #94](https://github.com/MahmoudAshraf97/ctc-forced-aligner/issues/94) and [PR #96](https://github.com/MahmoudAshraf97/ctc-forced-aligner/pull/96) | Open PR | This package calls `torchaudio.functional.forced_align` and does not execute the maintained project's C++ kernel, so this fix is upstream-only. The package's frozen Arabic inputs supplied frequency, parity, and timing evidence for the PR without making it a runtime dependency. |

The public records contain the detailed correctness tests, corpus comparisons, memory measurements, and performance results used to justify each proposal. Package-level performance and accuracy claims remain in [Performance](performance.md), [Accuracy Benchmarks](benchmarks.md), and the versioned [release reports](../reports/).

## Prior Work

The Silero sequence contribution follows the approach proposed in [Silero discussion #408](https://github.com/snakers4/silero-vad/discussions/408) and developed in faster-whisper [PR #936](https://github.com/SYSTRAN/faster-whisper/pull/936), [PR #1198](https://github.com/SYSTRAN/faster-whisper/pull/1198), and [PR #1390](https://github.com/SYSTRAN/faster-whisper/pull/1390). The package's packed multi-file Torch path additionally follows Mahmoud Ashraf's public Silero references recorded with the runtime assets.

## Packaged Provenance

Submission tracking is separate from code and asset provenance. [Alignment helper provenance](../src/cohere_transcribe/alignment/UPSTREAM.md) records the exact maintained `ctc-forced-aligner` revision and retained scope. [VAD provenance](../src/cohere_transcribe/vad/README.md) records the Silero and faster-whisper revisions, model hashes, implementation references, and notices.

Cohere ASR and MMS alignment weights are pinned runtime downloads from Hugging Face and are not redistributed. Ordinary runtime dependencies such as Transformers, PyTorch, TorchAudio, TorchCodec, ONNX Runtime, Auditok, Librosa, and Uroman are declared in package metadata rather than copied into the source tree.

## Maintenance

Update this status snapshot when a linked issue or pull request is merged, closed, or superseded. A merge alone does not justify removing a local implementation: adopt a released upstream path only after output-parity, failure-recovery, memory, and performance validation against the package's retained workloads.
