Closed songyang-dev closed 4 months ago
The same error in #72. You can try updating transformers==2.5.0 to 4.0.0
I tried your approach and I got a new error.
Traceback (most recent call last):
File "CodeXGLUE/Text-Code/text-to-code/code/run.py", line 653, in <module>
main()
File "CodeXGLUE/Text-Code/text-to-code/code/run.py", line 640, in main
global_step, tr_loss = train(args, train_dataset, model, tokenizer, fh, pool)
File "CodeXGLUE/Text-Code/text-to-code/code/run.py", line 172, in train
outputs = model(inputs, attention_mask=attn_mask)
File "/u/yangsong/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/u/yangsong/.local/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 447, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/u/yangsong/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/u/yangsong/.local/lib/python3.8/site-packages/transformers/models/gpt2/modeling_gpt2.py", line 760, in forward
transformer_outputs = self.transformer(
File "/u/yangsong/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/u/yangsong/.local/lib/python3.8/site-packages/transformers/models/gpt2/modeling_gpt2.py", line 641, in forward
outputs = block(
File "/u/yangsong/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/u/yangsong/.local/lib/python3.8/site-packages/transformers/models/gpt2/modeling_gpt2.py", line 288, in forward
attn_outputs = self.attn(
File "/u/yangsong/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/u/yangsong/.local/lib/python3.8/site-packages/transformers/models/gpt2/modeling_gpt2.py", line 223, in forward
query, key, value = self.c_attn(hidden_states).split(self.split_size, dim=2)
File "/u/yangsong/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/u/yangsong/.local/lib/python3.8/site-packages/transformers/modeling_utils.py", line 1119, in forward
x = torch.addmm(self.bias, x.view(-1, x.size(-1)), self.weight)
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)`
I'm trying to fine-tune CONCODE according to the instructions for text-code. I am using the default dataset and follow the exact same steps. At the fine-tuning stage, I get an error:
RuntimeError: Could not infer dtype of NoneType
Here is the error log on the console.