Skip to content

Commit

Permalink
add call
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-garvey committed Feb 1, 2025
1 parent 1af94a2 commit c11a2fe
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion sharktank/tests/models/llama/quark_parity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,24 @@ def test_compare_against_quark(self):
mapping[a] = b
mapping[a + "_input_0"] = b + "_input_0"

command = [
"python",
"-m",
"sharktank.examples.paged_llm_v1",
"The capitol of Texas is",
f"--irpa-file={self.path_prefix}/fp8_bf16_weight.irpa",
f"--tokenizer-config-json={self.path_prefix}/tokenizer.json" "--fake-quant",
"--attention-kernel=torch",
"--activation-dtype=bfloat16",
f"--save_intermediates_path={self.path_prefix}/ours",
"--use-hf",
"--attention-dtype=bfloat16" "--skip-decode",
]
subprocess.call(command)
subprocess.wait()

ours = dict()
our_path = self.path_prefix / "prefill.safetensors"
our_path = self.path_prefix / "ours_prefill.safetensors"
with safe_open(our_path, "pytorch") as st:
for key in st.keys():
ours[key] = st.get_tensor(key)
Expand Down

0 comments on commit c11a2fe

Please sign in to comment.