babysor / babysor/MockingBird

预训练模型替换后不匹配救助

Open
#887 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36.9k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

预训练模型替换成pretrained-11-7-21_75k大佬提供的出现不匹配。

Found 266 samples
+----------------+------------+---------------+------------------+
| Steps with r=2 | Batch Size | Learning Rate | Outputs/Step (r) |
+----------------+------------+---------------+------------------+
| 85k Steps | 12 | 5e-06 | 2 |
+----------------+------------+---------------+------------------+

E:\MockingBird\synthesizer\synthesizer_dataset.py:84: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at C:\cb\pytorch_1000000000000\work\torch\csrc\utils\tensor_new.cpp:248.)
embeds = torch.tensor(embeds)
E:\MockingBird\synthesizer\synthesizer_dataset.py:84: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at C:\cb\pytorch_1000000000000\work\torch\csrc\utils\tensor_new.cpp:248.)
embeds = torch.tensor(embeds)
Traceback (most recent call last):
File "synthesizer_train.py", line 37, in
train(**vars(args))
File "E:\MockingBird\synthesizer\train.py", line 208, in train
optimizer.step()
File "C:\Users\Administrator\anaconda3\envs\mock\lib\site-packages\torch\optim\optimizer.py", line 280, in wrapper
out = func(*args, **kwargs)
File "C:\Users\Administrator\anaconda3\envs\mock\lib\site-packages\torch\optim\optimizer.py", line 33, in _use_grad
ret = func(self, *args, **kwargs)
File "C:\Users\Administrator\anaconda3\envs\mock\lib\site-packages\torch\optim\adam.py", line 141, in step
adam(
File "C:\Users\Administrator\anaconda3\envs\mock\lib\site-packages\torch\optim\adam.py", line 281, in adam
func(params,
File "C:\Users\Administrator\anaconda3\envs\mock\lib\site-packages\torch\optim\adam.py", line 446, in _multi_tensor_adam
torch._foreach_add_(device_exp_avgs, device_grads, alpha=1 - beta1)
RuntimeError: The size of tensor a (1024) must match the size of tensor b (3) at non-singleton dimension 3

**Env & To Reproduce[复现与环境]**
描述你用的环境、代码版本、模型
Python 3.8.16 pretrained
**Screenshots[截图(如有)]**
If applicable, add screenshots to help

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the stated Python 3.8.16 environment and replacement pretrained model. Start at synthesizer/synthesizer_dataset.py:84 and synthesizer/train.py:208, then inspect the tensor shapes reaching optimizer.step(). Done means training no longer raises the reported tensor-size mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
ai, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.