[wip] add token log for llava bench#1065
Open
pkhk-1 wants to merge 1 commit intoPaddlePaddle:developfrom
Open
Conversation
|
Thanks for your contribution! |
jerrywgz
reviewed
Feb 19, 2025
| ) | ||
|
|
||
|
|
||
| class Statistical(object): |
Collaborator
There was a problem hiding this comment.
统计逻辑和callback可以单独提出来,是公共部分,并对model的input_shape和efficient_token_count做检查
| mem_gpu = ( | ||
| train_result.metrics["train_mem_gpu_peaked_delta"] + train_result.metrics["train_mem_gpu_alloc_delta"] | ||
| ) | ||
| logger.info(f'Memory_allocated:{memory_allocated}GB, max_memory_allocated: {max_memory_allocated}GB, memory_reserved:{memory_reserved}GB, max_memory_reserved: {max_memory_reserved}GB \n') |
Collaborator
There was a problem hiding this comment.
callback的on_log方法中已经提供了这些性能数据,是否还需要重复log?
| from paddlenlp.trainer.plugins.timer import get_timers | ||
|
|
||
|
|
||
| PADDLE_EMA_WEIGHTS_NAME = "ema_state.pdparams" |
| record the infomation of saving model. | ||
| """ | ||
| pass | ||
| # end_save_time = time.time() |
| def __init__(self, **kwargs): | ||
| super().__init__(**kwargs) | ||
| # self.benchmark_callback = BenchmarkCallback(self, self.args.save_steps, skip_step=self.args.benchmark_skip_steps) | ||
| self.benchmark_callback = BenchmarkCallback(self, 12, 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.