-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip] add token log for llava bench #1065
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
) | ||
|
||
|
||
class Statistical(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
统计逻辑和callback可以单独提出来,是公共部分,并对model的input_shape和efficient_token_count做检查
@@ -171,8 +171,15 @@ def get_paddle_memory_info(): | |||
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') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callback的on_log方法中已经提供了这些性能数据,是否还需要重复log?
from paddlenlp.trainer.plugins.timer import get_timers | ||
|
||
|
||
PADDLE_EMA_WEIGHTS_NAME = "ema_state.pdparams" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多余变量
record the infomation of saving model. | ||
""" | ||
pass | ||
# end_save_time = time.time() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以删除注释代码
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参数改成可配置?
No description provided.