Skip to content

Commit 0027c5c

Browse files
committed
Fix mergekit-moe
1 parent 4c6658b commit 0027c5c

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

mergekit/scripts/moe.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,6 @@ def select_output_arch(
156156
default=False,
157157
help="Load model in 8bit for computing hidden states",
158158
)
159-
@click.option(
160-
"--device",
161-
type=str,
162-
default="auto",
163-
help="Device to use to compute embeddings",
164-
show_default=True,
165-
)
166159
@click.option(
167160
"--i-understand-this-is-not-useful-without-training",
168161
type=bool,
@@ -176,18 +169,12 @@ def main(
176169
out_path: str,
177170
load_in_4bit: bool,
178171
load_in_8bit: bool,
179-
device: str,
180172
i_understand_this_is_not_useful_without_training: bool,
181173
merge_options: MergeOptions,
182174
):
183175
"""Create a Mixture of Experts model by combining the pretrained weights of multiple models."""
184176
merge_options.apply_global_options()
185177

186-
if merge_options.cuda:
187-
logging.warning(
188-
'--cuda is a no-op for mergekit-moe, use "--device cuda" instead'
189-
)
190-
191178
with open(config_path, "r", encoding="utf-8") as file:
192179
config_source = file.read()
193180

@@ -198,7 +185,7 @@ def main(
198185
merge_options=merge_options,
199186
load_in_4bit=load_in_4bit,
200187
load_in_8bit=load_in_8bit,
201-
device=device,
188+
device=merge_options.device,
202189
allow_all_same=i_understand_this_is_not_useful_without_training,
203190
verbose=merge_options.verbosity > 0,
204191
)

0 commit comments

Comments
 (0)