koboldcpp/tools/mtmd/models
Xuan-Son Nguyen 6e62ba5384
mtmd: support pocket-tts (#26871)
* adapt the api

* text model ok

* working impl, need verify and clean up

* mtmd: build the pocket-tts transposed convolutions as GEMM + col2im

ggml_conv_transpose_1d has no grouped mode, so the depthwise upsample
was built as one convolution and one concat per channel, which floods
the graph with small nodes and makes kernel launches dominate the
decoder.

Fold both cases into the column form the seanet decoder already needs:
the general case reshapes the kernel to [IC, K * OC] and matmuls it
with the input, the depthwise case batches a matmul over the channels
so a step scales its own kernel. A single col2im_1d then scatter-adds
the columns back to the signal, with the same shape as before, so the
overlap-add tail, the streaming state and the bias are untouched.

Generation time per frame drops by 80% on CUDA and by 50% on CPU. The
output matches the previous implementation sample for sample, with a
correlation of 0.999994 and identical frame counts.

* flow_temp +  frames_after_eos

* chunking

* mtmd: carry the remaining pocket-tts per-pack settings

The language packs also tune the end-of-speech padding and the padding
of short prompts, next to the temperature already carried in the
mmproj: french_24l asks for 8 tail frames instead of the guessed 3,
english_2026-01 asks for short prompts to be padded with spaces.

Write both in the mmproj as clip.gen.audio.frames_after_eos and
clip.gen.audio.pad_short_text, keyed on the pack in the conversion
script like the temperature. The loader keeps them optional, so a
mmproj without them behaves as before. Map semicolons to commas for
every pack instead, the reference only asks for it on three of them and
it costs nothing elsewhere.

Existing mmproj files must be converted again to carry the two keys.

On a long french text the port now lands within 2% of the reference:
22.96s against 23.44s, with the same peak level and the same amount of
silence.

* clip.gen.audio.model_variant

* clean up code comments

* nit: drop the dead flow_temp hparam, the pack table holds the default

* update docs

* address security problems

* less invasive base.py

* lint

* add mtmd_gen_inp_default

* add docs

* rm gen_flow_temp

---------

Co-authored-by: Pascal <admin@serveurperso.com>
2026-08-11 14:18:30 +02:00
..
cogvlm.cpp mtmd: add clip_graph::build_mm() (#20751) 2026-03-19 13:11:39 +01:00
conformer.cpp mtmd, server: add "placeholder bitmap" for counting tokens , add */input_tokens API (#23913) 2026-06-06 11:06:51 +02:00
deepseekocr.cpp mtmd: support multi-row batching for deepseek-ocr (#26154) 2026-08-05 13:34:52 +02:00
deepseekocr2.cpp mtmd: support multi-row batching for deepseek-ocr (#26154) 2026-08-05 13:34:52 +02:00
dotsocr.cpp mtmd: support dots.ocr (#17575) 2026-04-09 12:16:38 +02:00
exaone4_5.cpp mtmd, server: add "placeholder bitmap" for counting tokens , add */input_tokens API (#23913) 2026-06-06 11:06:51 +02:00
gemma4a.cpp mtmd: add Gemma 4 audio conformer encoder support (#21421) 2026-04-12 14:15:26 +02:00
gemma4ua.cpp mtmd, model: allow skip build_vit() (#24077) 2026-06-03 17:10:35 +02:00
gemma4uv.cpp mtmd, model: allow skip build_vit() (#24077) 2026-06-03 17:10:35 +02:00
gemma4v.cpp mtmd: add batching API (#24384) 2026-06-13 00:10:29 +02:00
glm4v.cpp mtmd, server: add "placeholder bitmap" for counting tokens , add */input_tokens API (#23913) 2026-06-06 11:06:51 +02:00
granite-speech.cpp model: Granite Speech Plus (#24818) 2026-06-23 12:03:31 +02:00
granite4-vision.cpp model: Granite Speech Plus (#24818) 2026-06-23 12:03:31 +02:00
hunyuanvl.cpp mtmd, model : merge HunyuanOCR into HunyuanVL and fix OCR vision precision (#23329) 2026-05-21 00:35:37 +02:00
internvl.cpp mtmd: add batching support for internvl (#24775) 2026-06-19 01:16:16 +02:00
kimik25.cpp mtmd, server: add "placeholder bitmap" for counting tokens , add */input_tokens API (#23913) 2026-06-06 11:06:51 +02:00
kimivl.cpp clip: move model cgraphs into their own files (#17965) 2025-12-12 21:14:48 +01:00
llama4.cpp mtmd: add clip_graph::build_mm() (#20751) 2026-03-19 13:11:39 +01:00
llava.cpp model: Granite Speech Plus (#24818) 2026-06-23 12:03:31 +02:00
mimo-audio.cpp mtmd: support MiMo-V2.5 audio input (RVQ-based model) (#26190) 2026-07-27 23:17:09 +02:00
mimovl.cpp mtmd, server: add "placeholder bitmap" for counting tokens , add */input_tokens API (#23913) 2026-06-06 11:06:51 +02:00
minicpmv.cpp mtmd: add minicpmv46 downsample (#25993) 2026-08-01 13:38:36 +02:00
minimax-m3.cpp mtmd: Add Vision Support for Minimax-M3 (#25113) 2026-07-27 01:44:41 +02:00
mobilenetv5.cpp mtmd: add clip_graph::build_mm() (#20751) 2026-03-19 13:11:39 +01:00
models.h mtmd: support pocket-tts (#26871) 2026-08-11 14:18:30 +02:00
muse-glimmer.cpp model: Muse Glimmer Support (#26841) 2026-08-10 13:07:27 +02:00
nemotron-v2-vl.cpp mtmd : Add Nemotron Nano 12B v2 VL support (#19547) 2026-02-14 14:07:00 +01:00
paddleocr.cpp model: Add PaddleOCR-VL model support (#18825) 2026-02-19 17:05:25 +01:00
parakeet.cpp mtmd : add Nemotron 3 Nano Omni support (parakeet) (#22520) 2026-07-28 17:20:25 +02:00
pixtral.cpp mtmd: add more validations (#25013) 2026-06-26 08:43:29 +02:00
pockettts-gen.cpp mtmd: support pocket-tts (#26871) 2026-08-11 14:18:30 +02:00
pockettts-seanet.cpp mtmd: support pocket-tts (#26871) 2026-08-11 14:18:30 +02:00
pockettts-spkenc.cpp mtmd: support pocket-tts (#26871) 2026-08-11 14:18:30 +02:00
qwen2vl.cpp mtmd: support "frame merge" for qwen-vl-based models (#21858) 2026-06-06 21:17:25 +02:00
qwen3a.cpp mtmd: add chunks and fix preproc for qwen3a (#23073) 2026-05-15 19:32:47 +02:00
qwen3tts-gen.cpp mtmd: support pocket-tts (#26871) 2026-08-11 14:18:30 +02:00
qwen3tts-spkenc.cpp mtmd: support Qwen3-TTS (note: breaking change to llama-tts binary) (#26254) 2026-08-04 17:26:15 +02:00
qwen3vl.cpp mtmd : use align_corners for qwen3vl vision position embedding interpolation (#25781) 2026-07-21 23:58:34 +02:00
siglip.cpp mtmd: Add DeepSeekOCR Support (#17400) 2026-03-25 19:57:40 +01:00
step3vl.cpp model : support step3-vl-10b (#21287) 2026-04-08 09:51:31 +02:00
whisper-enc.cpp mtmd, server: add "placeholder bitmap" for counting tokens , add */input_tokens API (#23913) 2026-06-06 11:06:51 +02:00
yasa2.cpp mtmd: Add support for Reka Edge 2603 (#21616) 2026-04-21 20:02:49 +02:00
youtuvl.cpp mtmd: add clip_graph::build_mm() (#20751) 2026-03-19 13:11:39 +01:00