mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-05-01 21:21:12 +00:00
Some checks failed
Book-CI / test (push) Has been cancelled
Book-CI / test-1 (push) Has been cancelled
Book-CI / test-2 (push) Has been cancelled
Deploy / deploy (macos-latest) (push) Has been cancelled
Deploy / deploy (ubuntu-latest) (push) Has been cancelled
Deploy / deploy (windows-latest) (push) Has been cancelled
* Change named 'KT-SFT' to 'kt-sft' * [docs]: update kt-sft name --------- Co-authored-by: ZiWei Yuan <yzwliam@126.com>
15 lines
660 B
Python
15 lines
660 B
Python
import torch, glob
|
|
|
|
records = sorted(glob.glob("/home/lpl/kt-sft/tmp/train_logs/step_*.pt"))
|
|
example = torch.load(records[1])
|
|
|
|
# print("step:", example["step"])
|
|
# print("inputs keys:", list(example["inputs"].keys()))
|
|
# print("loss:", example["loss"])
|
|
|
|
|
|
# print("param 'base_model.model.model.orig_module.layers.1.mlp.orig_module.gate.weight' 形状:",
|
|
# example["params"]["base_model.model.model.orig_module.layers.1.mlp.orig_module.gate.weight"].shape)
|
|
# print("grad 'base_model.model.model.orig_module.layers.1.mlp.orig_module.gate.weight':", example["grads"]["base_model.model.model.orig_module.layers.1.mlp.orig_module.gate.weight"])
|
|
|
|
print(example)
|