lad-gpt icon indicating copy to clipboard operation
lad-gpt copied to clipboard

IndexError: index out of range in self

Open shashanks33 opened this issue 10 months ago • 0 comments

Traceback (most recent call last): File "E:\VS Code Projects\.venv\codes\new\lad-gpt\run.py", line 20, in <module> main() File "E:\VS Code Projects\.venv\codes\new\lad-gpt\run.py", line 15, in main train.model_training(args.update) File "E:\VS Code Projects\.venv\codes\new\lad-gpt\src\train.py", line 55, in model_training train_loss = estimate_loss(model, train_data) File "E:\VS Code Projects\.venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "E:\VS Code Projects\.venv\codes\new\lad-gpt\src\utils.py", line 23, in estimate_loss logits, loss = model(X, Y) File "E:\VS Code Projects\.venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "E:\VS Code Projects\.venv\codes\new\lad-gpt\src\model.py", line 150, in forward tok_emb = self.token_embedding(idx) # (B, T, C) File "E:\VS Code Projects\.venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "E:\VS Code Projects\.venv\lib\site-packages\torch\nn\modules\sparse.py", line 162, in forward return F.embedding( File "E:\VS Code Projects\.venv\lib\site-packages\torch\nn\functional.py", line 2210, in embedding return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse) IndexError: index out of range in self

Getting this when I use a custom group chat as input for chat.txt The new preprocessing returns 764 tokens, and when I try to run the run.py train --update command I get the above error

shashanks33 avatar Apr 05 '24 19:04 shashanks33