Improve streaming, log_level, memory report, weight loading, and benchmark script (#7632)

Co-authored-by: Kan Wu <wukanustc@gmail.com>
This commit is contained in:
Lianmin ZhengandKan Wu authored and GitHub committed 2025-06-29 23:16:19 -07:00
1 parent c5131f7a2f
commit 22352d47a9
24 files changed
+626 -160

No files matched your search

+2 -3
View File
@@ -147,12 +147,11 @@ class InternLM2Config(PretrainedConfig):
)
if (
rope_scaling_factor is None
or not isinstance(rope_scaling_factor, float)
or not isinstance(rope_scaling_factor, int)
or not isinstance(rope_scaling_factor, (float, int))
or rope_scaling_factor < 1.0
):
raise ValueError(
f"`rope_scaling`'s factor field must be a float|int >= 1, got {rope_scaling_factor}"
f"`rope_scaling`'s factor field must be a float|int >= 1, got {rope_scaling_factor=}, {type(rope_scaling_factor)=}"
)
if isinstance(rope_scaling_factor, int):
rope_scaling_factor = float(rope_scaling_factor)