Skip to content

server: allow max_len to be used for any output format#3679

Open
gaelj wants to merge 1 commit intoggml-org:masterfrom
gaelj:allow-max-len-on-all-output-formats
Open

server: allow max_len to be used for any output format#3679
gaelj wants to merge 1 commit intoggml-org:masterfrom
gaelj:allow-max-len-on-all-output-formats

Conversation

@gaelj
Copy link

@gaelj gaelj commented Feb 23, 2026

This restriction is not needed, so let's remove it. I'm especially interested in making in available for the srt format.

Example (using llama-swap)

curl https://llama.server.home.arpa/upstream/large-v1/inference \                          
  -H "Content-Type: multipart/form-data" \
  -F "file=@output.wav" \
  -F "response_format=xxxx" \
  -F "temperature=0.0" \
  -F "temperature_inc=0.2"  \
  -F "max_len=20" \
  -F "split_on_word=true"

json

{"text":" The birch canoe slid\n on the smooth planks.\n Glue the sheet to\n the dark lue\n background.\n"}

text

 The birch canoe slid
 on the smooth planks.
 Glue the sheet to
 the dark blue
 background.

srt


1
00:00:00,000 --> 00:00:01,470
 The birch canoe slid

2
00:00:01,470 --> 00:00:04,010
 on the smooth planks.

3
00:00:04,010 --> 00:00:05,100
 Glue the sheet to

4
00:00:05,100 --> 00:00:05,680
 the dark blue

5
00:00:05,680 --> 00:00:07,000
 background.

verbose_json

{"text":" The birch canoe slid\n on the smooth planks.\n Glue the sheet to\n the dark blue\n background.\n"}

vtt

WEBVTT

00:00:00.000 --> 00:00:01.470
 The birch canoe slid

00:00:01.470 --> 00:00:04.010
 on the smooth planks.

00:00:04.010 --> 00:00:05.100
 Glue the sheet to

00:00:05.100 --> 00:00:05.680
 the dark blue

00:00:05.680 --> 00:00:07.000
 background.

@gaelj gaelj changed the title Allow max_len to be used for any output format server: allow max_len to be used for any output format Feb 23, 2026
@gaelj gaelj force-pushed the allow-max-len-on-all-output-formats branch from 5f21d79 to b93e93c Compare February 23, 2026 21:36
@gaelj gaelj changed the title server: allow max_len to be used for any output format server: allow max_len to be used for any non-json output format Feb 23, 2026
@gaelj gaelj force-pushed the allow-max-len-on-all-output-formats branch from b93e93c to 2f91007 Compare February 23, 2026 21:46
@gaelj gaelj changed the title server: allow max_len to be used for any non-json output format server: allow max_len to be used for any output format Feb 23, 2026
@gaelj gaelj force-pushed the allow-max-len-on-all-output-formats branch from 2f91007 to 48f6b12 Compare February 23, 2026 22:58
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.

1 participant