-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Optimization] Advance parser concurrently with model forward pass (#…
…1065) Refactors `Engine.__call__` and `TokenParser._parse` coroutine/generator to yield a _future_ wrapping `LLInterpreter.mid_process` (running in a `ThreadPoolExecutor`) such that `mid_process` can run concurrently with the forward pass. This function comes directly from the rust extension, so it releases the GIL and threading *should* be sufficient to ensure true concurrency. --------- Co-authored-by: Loc Huynh <[email protected]>
- Loading branch information
1 parent
ed9f078
commit b6bcee7
Showing
5 changed files
with
166 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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