Skip to content

Commit

Permalink
Update vmfb runner module name dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
archana-ramalingam committed Oct 25, 2024
1 parent 9dbc07a commit f5c4fef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sharktank/sharktank/evaluate/perplexity_vmfb.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def get_prompts(self):
s.replace("\n", "").rstrip()
for s in test_prompts
if s != "" and len(s.split()) >= 20 and s.count("=") < 2
][0:4]
]

logger.info(f" num_test_prompts: {len(test_prompts)}")

Expand Down Expand Up @@ -208,7 +208,7 @@ def prefill_vmfb(self, token_batch, i):
)

seq_block_ids = self.batch.pad_block_ids()
prefill_logits = self.runner.ctx.modules.module.prefill_bs4(
prefill_logits = self.runner.ctx.modules.module[f"prefill_bs{self.bs}"](
token_batch,
self.seq_lens_batch,
seq_block_ids,
Expand Down Expand Up @@ -239,7 +239,7 @@ def decode_vmfb(self, token_batch, i):
self.batch.allocate_seq_block_ids()
seq_block_ids = self.batch.pad_block_ids()

decode_logits = self.runner.ctx.modules.module.decode_bs4(
decode_logits = self.runner.ctx.modules.module[f"decode_bs{self.bs}"](
token_batch,
self.seq_lens_batch,
start_positions,
Expand Down

0 comments on commit f5c4fef

Please sign in to comment.