We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87c79d8 commit 43bdec4Copy full SHA for 43bdec4
examples/disk_offloading/kimi_k2_example.py
@@ -11,8 +11,9 @@
11
model_id,
12
dtype="auto",
13
device_map="auto_offload", # fit as much as possible on cpu, rest goes on disk
14
+ trust_remote_code=True,
15
)
- tokenizer = AutoTokenizer.from_pretrained(model_id)
16
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
17
18
# Confirm that model is dispatched correctly
19
devices = {offloaded for _onloaded, offloaded in get_device_map(model).values()}
@@ -34,6 +35,7 @@
34
35
# Apply algorithms.
36
oneshot(
37
model=model,
38
+ processor=tokenizer,
39
dataset=DATASET_ID,
40
splits={"calibration": f"{DATASET_SPLIT}[:{NUM_CALIBRATION_SAMPLES}]"},
41
recipe=recipe,
0 commit comments