Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicazhongeee committed Jan 17, 2025
1 parent 68aee31 commit a80b7e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions recipes/dev/generate_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ def log_metrics(self, total_time: int, tokens_per_second: float) -> None:
f"Time for inference: {total_time:.02f} sec total, {tokens_per_second:.02f} tokens/sec"
)
self._logger.info(
f"Bandwidth achieved: {model_size * tokens_per_second / 1024 / 1024 / 1024:.02f} GiB/s"
f"Bandwidth achieved: {model_size * tokens_per_second / (1024**3):.02f} GiB/s"
)
self._logger.info(
f"Max memory allocated: {torch.cuda.max_memory_allocated() / 1024 / 1024 / 1024:.02f} GiB"
f"Max memory allocated: {torch.cuda.max_memory_allocated() / (1024**3):.02f} GiB"
)

@torch.inference_mode()
Expand Down
4 changes: 2 additions & 2 deletions recipes/dev/generate_v2_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ def log_metrics(self, total_time: int, tokens_per_second: float) -> None:
f"Time for inference: {total_time:.02f} sec total, {tokens_per_second:.02f} tokens/sec"
)
self._logger.info(
f"Bandwidth achieved: {model_size * tokens_per_second / 1024 / 1024 / 1024:.02f} GiB/s"
f"Bandwidth achieved: {model_size * tokens_per_second / (1024**3):.02f} GiB/s"
)
self._logger.info(
f"Max memory allocated: {torch.cuda.max_memory_allocated() / 1024 / 1024 / 1024 :.02f} GiB"
f"Max memory allocated: {torch.cuda.max_memory_allocated() / (1024**3):.02f} GiB"
)

@torch.inference_mode()
Expand Down

0 comments on commit a80b7e5

Please sign in to comment.