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
ktransformers
Commits
494469d4
Unverified
Commit
494469d4
authored
Feb 28, 2025
by
Atream
Committed by
GitHub
Feb 28, 2025
Browse files
Merge pull request #722 from ZhangShuaiyi/remove_unused
Delete duplicate code
parents
1264f940
a34a25d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1 deletion
+0
-1
ktransformers/util/utils.py
ktransformers/util/utils.py
+0
-1
No files found.
ktransformers/util/utils.py
View file @
494469d4
...
@@ -170,7 +170,6 @@ def prefill_and_generate(model, tokenizer, inputs, max_new_tokens=10000, use_cud
...
@@ -170,7 +170,6 @@ def prefill_and_generate(model, tokenizer, inputs, max_new_tokens=10000, use_cud
past_key_values
.
cur_idx
=
cache_position
past_key_values
.
cur_idx
=
cache_position
start_time
=
time
.
time
()
start_time
=
time
.
time
()
inputs_embeds
=
model
.
model
.
embed_tokens
(
inputs
.
to
(
"cpu"
)).
to
(
torch_device
)
if
mode
==
"long_context"
:
if
mode
==
"long_context"
:
inputs_embeds
=
model
.
model
.
embed_tokens
(
inputs
.
to
(
"cpu"
))
inputs_embeds
=
model
.
model
.
embed_tokens
(
inputs
.
to
(
"cpu"
))
else
:
else
:
...
...
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