Skip to content

Support Fun-CosyVoice3 eagle3 speculative decoding#198

Merged
ali-88123 merged 2 commits into
Tencent:mainfrom
ali-88123:cosyvoice3_spec
Jan 13, 2026
Merged

Support Fun-CosyVoice3 eagle3 speculative decoding#198
ali-88123 merged 2 commits into
Tencent:mainfrom
ali-88123:cosyvoice3_spec

Conversation

@ali-88123
Copy link
Copy Markdown
Collaborator

@ali-88123 ali-88123 commented Jan 11, 2026

  • add Fun-CosyVoice3 eagle3 speculative decoding training & HF test

input_len=input_ids.shape[1],
)

def prepare_generation_cosyvoice3(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GenerationManager要不要拆开,cosyvoice3的继承自GenerationManager

return (state.input_ids, state.new_token, step) if log else state.input_ids


class CosyVoice3Eagle3Model(nn.Module):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不能复用Eagle3Model里的一些成员函数?

# limitations under the License.

from .eagle3 import Eagle3Model
from .eagle3 import CosyVoice3Eagle3Model, Eagle3Model
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CosyVoice3Eagle3Model放在Eagle3Model的后面,保持继承的关系顺序
其他init文件中内容也修改下

Comment thread angelslim/engine.py Outdated
self.BenchmarkConfig = pytorch_benchmark.BenchmarkConfig
self.BenchmarkEngine = pytorch_benchmark.BenchmarkEngine
self.BenchmarkMode = pytorch_benchmark.BenchmarkMode
elif self.deploy_backend == "pytorch_tts":
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tts模型还有什么可以判断的字段,pytorch_tts有些trick

@ali-88123 ali-88123 merged commit 4cf6d70 into Tencent:main Jan 13, 2026
5 checks passed
@ali-88123 ali-88123 deleted the cosyvoice3_spec branch January 13, 2026 06:22
dawnranger pushed a commit to dawnranger/AngelSlim that referenced this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants