Comments (4)
Looks like the binary data is incomplete. Please check the size of your bin, idx files, reprocess the data could help resolve this issue.
from prophetnet.
@gouldju1 Hi, no attribution error is caused by Fairseq version. The master version of Fairseq keeps changing in its api, thus we build ProphetNet in v-0.9.0.
Please pip install fairseq==v0.9.0, and try if it works
from prophetnet.
Yes, it looks like this resolves the issue. However, now, after entering an input sentence during fairseq-interaction
, I get the following:
Traceback (most recent call last):
File "/usr/local/bin/fairseq-interactive", line 11, in <module>
load_entry_point('fairseq', 'console_scripts', 'fairseq-interactive')()
File "/workspace/fairseq/fairseq_cli/interactive.py", line 213, in cli_main
main(args)
File "/workspace/fairseq/fairseq_cli/interactive.py", line 164, in main
translations = task.inference_step(generator, models, sample)
File "/workspace/fairseq/fairseq/tasks/fairseq_task.py", line 356, in inference_step
return generator.generate(models, sample, prefix_tokens=prefix_tokens)
File "/usr/local/lib/python3.6/dist-packages/torch/autograd/grad_mode.py", line 49, in decorate_no_grad
return func(*args, **kwargs)
File "/workspace/fairseq/fairseq/sequence_generator.py", line 161, in generate
return self._generate(sample, **kwargs)
File "/workspace/fairseq/fairseq/sequence_generator.py", line 261, in _generate
tokens[:, : step + 1], encoder_outs, self.temperature
File "/workspace/fairseq/fairseq/sequence_generator.py", line 726, in forward_decoder
incremental_state=self.incremental_states[i],
File "/workspace/ProphetNet/src/prophetnet/ngram_s2s_model.py", line 590, in forward
x_list, extra = self.extract_features(prev_output_tokens, encoder_out, incremental_state, **unused)
File "/workspace/ProphetNet/src/prophetnet/ngram_s2s_model.py", line 751, in extract_features
real_positions=real_positions
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/workspace/ProphetNet/src/prophetnet/ngram_s2s_model.py", line 365, in forward
real_positions=real_positions
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/workspace/ProphetNet/src/prophetnet/ngram_multihead_attention.py", line 244, in forward
saved_state = self._get_input_buffer(incremental_state)
File "/workspace/ProphetNet/src/prophetnet/ngram_multihead_attention.py", line 418, in _get_input_buffer
'attn_state',
File "/workspace/fairseq/fairseq/utils.py", line 91, in get_incremental_state
return module.get_incremental_state(incremental_state, key)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 576, in __getattr__
type(self).__name__, name))
AttributeError: 'NgramMultiheadAttention' object has no attribute 'get_incremental_state'
from prophetnet.
Yes, that works. Thank you!
from prophetnet.
Related Issues (20)
- Can use_fp16 be used?
- Why is the GENIE result in AR-diffusion very different from the original paper? Also, you come from a team. HOT 1
- Character level
- Can't Find Pretrained Checkpoint of Prophetnet: HOT 1
- Unable to load the GENIE model HOT 1
- The datasets have no dev set? HOT 1
- Options Employed for Training or Inference on the CNN/DM Dataset HOT 1
- It seems that the core code of CRITIC, particularly the part involving Google API search, is not implemented HOT 4
- Missing key documents for AR-Diffusion HOT 1
- where is "mbr_select.py" in AR-Diffusion HOT 1
- Unable to run Genie_Finetune.py HOT 1
- “load_fairseq” not found in "AR-Diffusion/data_utils" HOT 3
- Question for GENIE Finetuning, how to specify epochs for training/finetuning? HOT 1
- “load_fairseq” not found in "AR-Diffusion/data_utils" HOT 1
- [AR-Diffusion] predict_xstart vs predict_x_start HOT 3
- AR-Diffusion data.name and exp.name HOT 2
- Request the execution code of llama2
- AR-diffusion: where the code for algorithm 1 is located? HOT 4
- (AR-Diffusion) RuntimeError: Error(s) in loading state_dict for CrossAttention_Diffusion_LM HOT 3
- what is the need for `num_samples` parameter in inference? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prophetnet.