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
027b1126
Commit
027b1126
authored
Feb 06, 2025
by
Azure
Browse files
modify moeinfer param
parent
ee24a270
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
ktransformers/local_chat.py
ktransformers/local_chat.py
+2
-0
ktransformers/operators/experts.py
ktransformers/operators/experts.py
+1
-1
No files found.
ktransformers/local_chat.py
View file @
027b1126
...
@@ -81,8 +81,10 @@ def local_chat():
...
@@ -81,8 +81,10 @@ def local_chat():
content
=
"hi"
content
=
"hi"
else
:
else
:
content
=
open
(
config
.
prompt_file
,
"r"
).
read
()
content
=
open
(
config
.
prompt_file
,
"r"
).
read
()
print
(
"User: "
,
content
)
elif
os
.
path
.
isfile
(
content
):
elif
os
.
path
.
isfile
(
content
):
content
=
open
(
content
,
"r"
).
read
()
content
=
open
(
content
,
"r"
).
read
()
print
(
"User: "
,
content
)
messages
=
his_content
+
[{
"role"
:
"user"
,
"content"
:
content
}]
messages
=
his_content
+
[{
"role"
:
"user"
,
"content"
:
content
}]
async
def
async_inference
(
messages
):
async
def
async_inference
(
messages
):
...
...
ktransformers/operators/experts.py
View file @
027b1126
...
@@ -163,7 +163,7 @@ class KExpertsCPU(KExpertsBase):
...
@@ -163,7 +163,7 @@ class KExpertsCPU(KExpertsBase):
self
.
config
.
hidden_size
,
self
.
config
.
hidden_size
,
self
.
config
.
moe_intermediate_size
,
self
.
config
.
moe_intermediate_size
,
64
,
64
,
10
,
10
24
,
1024
,
1024
,
gate_ptr
,
gate_ptr
,
up_ptr
,
up_ptr
,
...
...
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