Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Allow multi-thread streaming using the same weight loaded once in memory

オープン
#68 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp, python

調査の方向性

まず src/ggml_graph.cpp の28〜35行目にある mutex を確認し、次に parakeet-thread-local-backend.patch と concurrent_streams.py を調べてください。提供された Python コマンドを4つのスレッドで、提供されたモデルと音声ファイルを使って実行してください。1つのプロセス内で複数のストリームを重みを共有しながら同時に文字起こしでき、GPU システムでも動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I'm trying out this project for a live transcription usecase in a call. We use vosk at the moment (in https://github.com/nextcloud/live_transcription/) which supports loading the model weights once in the memory and then starting new threads with light-er recognize objects reading the same weights to process the output but keeping their own state and cache.
This is not possible at this moment due to a mutex https://github.com/mudler/parakeet.cpp/blob/e75de9b6b9b688fd293aa22f7e27aa724ea286f8/src/ggml_graph.cpp#L28-L35
One process can process only one stream at a time.

I'm not familiar with the code so did an experiment and asked AI if there is a possibility to work like llama.cpp here which uses slots to entertain parallel requests using the same loaded weights, and works with the same underlying ggml library.
It has successfully changed the code to make it possible for multiple threads to transcribe at the same time, in the same process by using a new Backend in each thread as opposed to one shared Backend + mutex guard.
The tests ran on an AMD CPU but theoritically should not cause issues with GPU systems.

Below are some reproduction steps and the patch:

parakeet-thread-local-backend.patch
concurrent_streams.py

python concurrent_streams.py --lib ./libparakeet.so --model ./nemotron-3.5-asr-streaming-0.6b-q8_0.gguf --threads 4 ./audio/en_9min_16k* --seconds 90
主要言語
C++
スター
831
フォーク
101
平均マージ
1日 19時間
マージ済み PR(30日)
26

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mudler/parakeet.cpp のほかの issue

mudler/parakeet.cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。