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
9a2e7057
Commit
9a2e7057
authored
Oct 30, 2024
by
anyanqilin
Committed by
liam
Nov 04, 2024
Browse files
wjh fix change
parent
a72dc6ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ktransformers/server/args.py
ktransformers/server/args.py
+8
-8
No files found.
ktransformers/server/args.py
View file @
9a2e7057
...
@@ -9,19 +9,19 @@ class ArgumentParser:
...
@@ -9,19 +9,19 @@ class ArgumentParser:
def
parse_args
(
self
):
def
parse_args
(
self
):
parser
=
argparse
.
ArgumentParser
(
prog
=
"kvcache.ai"
,
description
=
"Ktransformers"
)
parser
=
argparse
.
ArgumentParser
(
prog
=
"kvcache.ai"
,
description
=
"Ktransformers"
)
parser
.
add_argument
(
"--host"
,
type
=
str
,
default
=
self
.
cfg
.
server_ip
)
parser
.
add_argument
(
"--host"
,
type
=
str
,
default
=
self
.
cfg
.
server_ip
)
parser
.
add_argument
(
"--port"
,
type
=
int
,
default
=
8082
)
parser
.
add_argument
(
"--port"
,
type
=
int
,
default
=
self
.
cfg
.
server_port
)
parser
.
add_argument
(
"--ssl_keyfile"
,
type
=
str
)
parser
.
add_argument
(
"--ssl_keyfile"
,
type
=
str
)
parser
.
add_argument
(
"--ssl_certfile"
,
type
=
str
)
parser
.
add_argument
(
"--ssl_certfile"
,
type
=
str
)
parser
.
add_argument
(
"--web"
,
type
=
bool
,
default
=
True
)
parser
.
add_argument
(
"--web"
,
type
=
bool
,
default
=
self
.
cfg
.
mount_web
)
parser
.
add_argument
(
"--model_name"
,
type
=
str
,
default
=
'DeepSeek-V2-Lite-Chat'
)
parser
.
add_argument
(
"--model_name"
,
type
=
str
,
default
=
self
.
cfg
.
model_name
)
parser
.
add_argument
(
"--model_dir"
,
type
=
str
,
default
=
'/mnt/data/model/DeepSeek-V2-Lite-Chat'
)
parser
.
add_argument
(
"--model_dir"
,
type
=
str
,
default
=
self
.
cfg
.
model_dir
)
parser
.
add_argument
(
parser
.
add_argument
(
"--device"
,
type
=
str
,
default
=
self
.
cfg
.
model_device
,
help
=
"Warning: Abandoning this parameter"
"--device"
,
type
=
str
,
default
=
self
.
cfg
.
model_device
,
help
=
"Warning: Abandoning this parameter"
)
)
parser
.
add_argument
(
"--gguf_path"
,
type
=
str
,
default
=
'/mnt/data/model/DeepSeek-V2-Lite-Chat-GGUF'
)
parser
.
add_argument
(
"--gguf_path"
,
type
=
str
,
default
=
self
.
cfg
.
gguf_path
)
parser
.
add_argument
(
"--optimize_config_path"
,
default
=
'/mnt/data/benchmark/ktransformers-dev/ktransformers/optimize/optimize_rules/DeepSeek-V2-Lite-Chat.yaml'
,
type
=
str
,
required
=
False
)
parser
.
add_argument
(
"--optimize_config_path"
,
default
=
self
.
cfg
.
optimize_config_path
,
type
=
str
,
required
=
False
)
parser
.
add_argument
(
"--cpu_infer"
,
type
=
int
,
default
=
self
.
cfg
.
cpu_infer
)
parser
.
add_argument
(
"--cpu_infer"
,
type
=
int
,
default
=
self
.
cfg
.
cpu_infer
)
parser
.
add_argument
(
"--type"
,
type
=
str
,
default
=
'ktransformers'
)
parser
.
add_argument
(
"--type"
,
type
=
str
,
default
=
self
.
cfg
.
backend_type
)
# model configs
# model configs
# parser.add_argument("--model_cache_lens", type=int, default=self.cfg.cache_lens) # int?
# parser.add_argument("--model_cache_lens", type=int, default=self.cfg.cache_lens) # int?
...
@@ -69,7 +69,7 @@ class ArgumentParser:
...
@@ -69,7 +69,7 @@ class ArgumentParser:
parser
.
add_argument
(
"--print_timings"
,
type
=
bool
,
default
=
self
.
cfg
.
print_timings
)
parser
.
add_argument
(
"--print_timings"
,
type
=
bool
,
default
=
self
.
cfg
.
print_timings
)
parser
.
add_argument
(
"--amnesia"
,
type
=
bool
,
default
=
self
.
cfg
.
amnesia
)
parser
.
add_argument
(
"--amnesia"
,
type
=
bool
,
default
=
self
.
cfg
.
amnesia
)
parser
.
add_argument
(
"--batch_size"
,
type
=
int
,
default
=
self
.
cfg
.
batch_size
)
parser
.
add_argument
(
"--batch_size"
,
type
=
int
,
default
=
self
.
cfg
.
batch_size
)
parser
.
add_argument
(
"--cache_lens"
,
type
=
int
,
default
=
'32768'
)
parser
.
add_argument
(
"--cache_lens"
,
type
=
int
,
default
=
self
.
cfg
.
cache_lens
)
# log configs
# log configs
# log level: debug, info, warn, error, crit
# log level: debug, info, warn, error, crit
...
...
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