Skip to content

mtmd: add Tencent Hy-SimulMT architecture support - #31198

Draft
lihy715 wants to merge 1 commit into
ggml-org:masterfrom
lihy715:hyv3-speech
Draft

lihy715 wants to merge 1 commit into
ggml-org:masterfrom
lihy715:hyv3-speech

Conversation

@lihy715

@lihy715 lihy715 commented Oct 26, 2026 •

Copy link
Copy Markdown

Overview

Adds support for Tencent Hy-SimulMT, a simultaneous speech translation model (Hugging Face architecture HYV3SpeechForCausalLM, GGUF arch hy_v3, new projector type hyv3_speech)

This PR changes in three parts:

  • The audio tower — a Whisper-style mel computation, a conv2d + transformer encoder, and an FSK adapter.
  • Turn-by-turn feeding — the model was trained on 1600 ms of audio followed by 800 ms per turn, answering each turn before hearing the next one.
  • Single-file GGUF support — the published GGUFs carry the text model and the projector in one file, so there is no separate mmproj.

The models are published at https://huggingface.co/tencent/Hy-SimulMT-30B-A3B-GGUF (translation only) and https://huggingface.co/tencent/Hy-SimulMT-30B-A3B-Interleave-GGUF (source text and translation). The official code is at https://github.com/Tencent-Hunyuan/Hy-SimulMT.

Changes by area:

Area File(s) Notes
Audio encoder graph tools/mtmd/models/hyv3-speech.cpp (new) conv2d stack + sinusoidal pos + transformer + FSK adapter
Graph registration tools/mtmd/models/models.h, tools/mtmd/CMakeLists.txt clip_graph_hyv3_speech + the two helpers for mel→token arithmetic
Audio preprocessing tools/mtmd/mtmd-audio.h, tools/mtmd/mtmd-audio.cpp mtmd_audio_preprocessor_hyv3_speech, cuts the mel on the training grid
Projector plumbing tools/mtmd/clip-impl.h, tools/mtmd/clip-model.h, tools/mtmd/clip.cpp PROJECTOR_TYPE_HYV3_SPEECH, tensor names, hparams
mtmd wiring tools/mtmd/mtmd.h, tools/mtmd/mtmd.cpp preprocessor selection, audio markers, mtmd_audio_stream_mode(), mtmd_has_projector()
Single-file projector src/llama-model-loader.cpp, tools/mtmd/mtmd-cli.cpp the leftover tensors belong to the projector, and --mmproj falls back to -m
Turn-by-turn feeding tools/mtmd/mtmd-cli.cpp run_turn_stream() + dispatch on MTMD_AUDIO_STREAM_TURN
GGUF constants gguf-py/gguf/constants.py VisionProjectorType.HYV3_SPEECH
Conversion tools/mtmd/legacy-models/convert_hyv3_speech_mmproj.py (new) reads the audio_tower.* tensors out of the merged checkpoint
Docs docs/multimodal/hyv3-speech.md (new), docs/multimodal.md, tools/mtmd/README.md guide + the two index links

Additional information

Testing

CPU-only build (-DGGML_CUDA=OFF), Q4_K_M single-file GGUF, 13.26 s sample:

didn't do that他没有那样做,
 and then we have他然后我们有
 the additional problem他额外的问题,
 of the jury instruction他就是陪审团指示,
run_turn_stream: 87 tokens, 6/16 turns emitted, 13.26 s audio in 9.45 s (1.40x realtime)

(他 is the target-branch marker, id 120809, printed to keep the two branches separable. A turn with no content is a WAIT, which is expected on most turns.) The translation matches the reference implementation.

Further Plan

  • llama-server does not run these GGUFs yet: it still expects the projector in a separate --mmproj file, and it does not feed audio turn by turn. Serving support is a follow-up.

Requirements

@lihy715
lihy715 requested review from a team, CISC and ggerganov as code owners October 26, 2026 14:22
@ggml-gh-bot

ggml-gh-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

Hi @lihy715, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • AI-generated content: While code is allowed to be generated by AI, please write the PR description and commit messages on your own without the help of AI.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

@github-actions github-actions Bot added documentation Improvements or additions to documentation mtmd Related to multimodal functionality (video/image/audio) conversion labels Oct 26, 2026
@alwaysLea

Copy link
Copy Markdown

When can the code be merged?😊

@lihy715

lihy715 commented Nov 2, 2026

Copy link
Copy Markdown
Author

Hi @lihy715, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • AI-generated content: While code is allowed to be generated by AI, please write the PR description and commit messages on your own without the help of AI.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

@lihy715 lihy715 closed this Nov 2, 2026
@lihy715

lihy715 commented Nov 2, 2026

Copy link
Copy Markdown
Author

Hi @lihy715, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • AI-generated content: While code is allowed to be generated by AI, please write the PR description and commit messages on your own without the help of AI.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

I have modified the comment part by AI, and clarify that this comment has been ready. Hopeful for your review and merge!

@lihy715 lihy715 reopened this Nov 2, 2026
@lihy715
lihy715 requested a review from a team as a code owner November 2, 2026 10:28
@ngxson

ngxson commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

sorry, I need to stop my review because this PR doesn't follow any rules in AGENTS.md

@ngxson
ngxson marked this pull request as draft November 4, 2026 17:25
@alwaysLea

Copy link
Copy Markdown

Hi @lihy715,

Could you please provide an update on this PR and move forward with addressing the outstanding issues?

This PR has been in Draft status for quite some time, and it would be great to avoid leaving the work stalled indefinitely.

In particular, could you please:

  1. Address the maintainer's feedback: Review and comply with the requirements in AGENTS.md, and make the necessary changes so the review can resume.
  2. Check the branch status: Make sure the branch is up to date with the latest master and resolve any merge conflicts if present.
  3. Complete or clarify the remaining work: In particular, please clarify the status of llama-server support and the remaining streaming implementation. If these are out of scope for this PR, please create a follow-up issue.
  4. Resume the review process: Ensure the relevant CI checks pass and mark the PR as Ready for Review once the blockers have been addressed.

This feature would be valuable to the llama.cpp community, especially for real-time speech translation and streaming audio applications.

It would be appreciated if you could share a concrete action plan and an estimated timeline for addressing these items.

Thanks for your work on this!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conversion documentation Improvements or additions to documentation mtmd Related to multimodal functionality (video/image/audio)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants