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
ox696c
ktransformers
Commits
5a50b346
Commit
5a50b346
authored
Jan 31, 2025
by
Azure
Browse files
fix hard coding caused by rope dim calculation, load from config now
parent
476b1d8d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
553 additions
and
2 deletions
+553
-2
ktransformers/local_chat.py
ktransformers/local_chat.py
+1
-1
ktransformers/models/modeling_deepseekv3.py
ktransformers/models/modeling_deepseekv3.py
+1
-1
ktransformers/util/modeling_rope_utils.py
ktransformers/util/modeling_rope_utils.py
+551
-0
No files found.
ktransformers/local_chat.py
View file @
5a50b346
...
...
@@ -78,7 +78,7 @@ def local_chat():
else
:
content
+=
line
+
"
\n
"
if
content
==
""
:
if
True
:
#
config.prompt_file == None or config.prompt_file == "":
if
config
.
prompt_file
==
None
or
config
.
prompt_file
==
""
:
content
=
"hi"
else
:
content
=
open
(
config
.
prompt_file
,
"r"
).
read
()
...
...
ktransformers/models/modeling_deepseekv3.py
View file @
5a50b346
...
...
@@ -19,7 +19,7 @@ from transformers.generation import GenerationMixin
from
transformers.modeling_attn_mask_utils
import
AttentionMaskConverter
# from transformers.modeling_flash_attention_utils import FlashAttentionKwargs
from
transformers.modeling_outputs
import
BaseModelOutputWithPast
,
CausalLMOutputWithPast
,
SequenceClassifierOutputWithPast
from
transformers.modeling_rope_utils
import
ROPE_INIT_FUNCTIONS
from
k
transformers.
util.
modeling_rope_utils
import
ROPE_INIT_FUNCTIONS
from
transformers.modeling_utils
import
PreTrainedModel
# ALL_ATTENTION_FUNCTIONS, PreTrainedModel
# from transformers.processing_utils import Unpack
from
transformers.utils
import
(
...
...
ktransformers/util/modeling_rope_utils.py
0 → 100644
View file @
5a50b346
This diff is collapsed.
Click to expand it.
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