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
9ab5ac25
Unverified
Commit
9ab5ac25
authored
Apr 28, 2025
by
bigmoyan
Committed by
GitHub
Apr 28, 2025
Browse files
Merge pull request #21 from weedge/fix/no_grade
lm generate add torch inference mode wrap
parents
44de67a3
2a850926
Changes
1
Show 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 @
9ab5ac25
...
...
@@ -48,6 +48,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
...
...
@@ -205,6 +206,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