Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Kimi-Audio
Commits
2a850926
Commit
2a850926
authored
Apr 27, 2025
by
weedge
Browse files
add inference mode for lm generate
Signed-off-by:
weedge
<
weege007@gmail.com
>
parent
0004a354
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
kimia_infer/api/kimia.py
kimia_infer/api/kimia.py
+2
-0
No files found.
kimia_infer/api/kimia.py
View file @
2a850926
...
...
@@ -47,6 +47,7 @@ class KimiAudio(object):
self
.
kimia_text_audiodelaytokens
=
6
self
.
eod_ids
=
[
self
.
extra_tokens
.
msg_end
,
self
.
extra_tokens
.
media_end
]
@
torch
.
inference_mode
()
def
_generate_loop
(
self
,
audio_input_ids
:
torch
.
Tensor
,
# input audio tokens
...
...
@@ -204,6 +205,7 @@ class KimiAudio(object):
)
return
return_audio_tokens
,
return_text_tokens
@
torch
.
inference_mode
()
def
generate
(
self
,
chats
:
list
[
dict
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment