Coder Social home page Coder Social logo

pytroch==1.6.0 需要注释extended_attention_mask = extended_attention_mask.to(dtype=next(self.parameters()).dtype)才能运行 about cluener2020 HOT 2 OPEN

cluebenchmark avatar cluebenchmark commented on August 16, 2024 1
pytroch==1.6.0 需要注释extended_attention_mask = extended_attention_mask.to(dtype=next(self.parameters()).dtype)才能运行

from cluener2020.

Comments (2)

zhangyifei1 avatar zhangyifei1 commented on August 16, 2024

大佬,注释源码是不是太暴力了?有木有其他的解决方案?我也遇到这个问题了

from cluener2020.

1a2cjitenfei avatar 1a2cjitenfei commented on August 16, 2024

大哥,按照你的说法注释完后出现
warnings.warn('Was asked to gather along dimension 0, but all '
Traceback (most recent call last):
File "run_ner_span.py", line 541, in
main()
File "run_ner_span.py", line 483, in main
global_step, tr_loss = train(args, train_dataset, model, tokenizer)
File "run_ner_span.py", line 128, in train
loss.backward()
File "/data/jtf/Minicoda3/envs/python3_8/lib/python3.8/site-packages/torch/_tensor.py", line 255, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/data/jtf/Minicoda3/envs/python3_8/lib/python3.8/site-packages/torch/autograd/init.py", line 147, in backward
Variable._execution_engine.run_backward(
File "/data/jtf/Minicoda3/envs/python3_8/lib/python3.8/site-packages/torch/autograd/function.py", line 87, in apply
return self._forward_cls.backward(self, *args) # type: ignore[attr-defined]
File "/data/jtf/Minicoda3/envs/python3_8/lib/python3.8/site-packages/torch/nn/parallel/_functions.py", line 34, in backward
return (None,) + ReduceAddCoalesced.apply(ctx.input_device, ctx.num_inputs, *grad_outputs)
File "/data/jtf/Minicoda3/envs/python3_8/lib/python3.8/site-packages/torch/nn/parallel/functions.py", line 45, in forward
return comm.reduce_add_coalesced(grads
, destination)
File "/data/jtf/Minicoda3/envs/python3_8/lib/python3.8/site-packages/torch/nn/parallel/comm.py", line 143, in reduce_add_coalesced
flat_result = reduce_add(flat_tensors, destination)
File "/data/jtf/Minicoda3/envs/python3_8/lib/python3.8/site-packages/torch/nn/parallel/comm.py", line 96, in reduce_add
nccl.reduce(inputs, output=result, root=root_index)
File "/data/jtf/Minicoda3/envs/python3_8/lib/python3.8/site-packages/torch/cuda/nccl.py", line 89, in reduce
torch._C._nccl_reduce(inputs, _output, root, op, streams, comms)
RuntimeError: NCCL Error 2: unhandled system error

from cluener2020.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.