Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace dots on loading with numbers #51

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions rwkv_pip_package/src/rwkv/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def __init__(self, model, strategy, verbose = True, convert_and_save_and_exit =

print_need_newline = False
keys = list(w.keys())
for x in keys:
for i, x in enumerate(keys):
w[x].requires_grad = False
layer_id = int(x.split('.')[1]) if ('blocks.' in x) else 0
if ('ln_out.' in x) or ('head.' in x):
Expand Down Expand Up @@ -300,7 +300,7 @@ def __init__(self, model, strategy, verbose = True, convert_and_save_and_exit =
prxxx(x.ljust(32), dt.rjust(4), str(w[x].device).rjust(8), shape, ' (pinned)' if w[x].is_pinned() else '')
else:
print_need_newline = True
prxxx('.', end = '', flush = True)
prxxx(f'\r[{i}/{len(keys)-1}] {x.ljust(32)} ', end = '', flush = True)

if convert_and_save_and_exit:
w['_strategy'] = args.strategy_string
Expand Down