Comments (7)
yeah very few use copy_attn since the transformer. what is your use case because I was planning to drop this feature.
anyway I'll at this next week.
from opennmt-py.
Thanks! I suspected that this functionality might be phasing out. The use case is morphological reinflection (for example, https://sigmorphon.github.io/sharedtasks/), for which rnn models are still fairly competitive and copy attention is conceptually motivated and empirically useful. I believe I was able to load the model after making a small addition to model.load_state_dict. Would you want a PR for that? Or maybe you have another quick fix in mind on the checkpoint save side, or want to go ahead with the plan of removing copy attention for rnns altogether.
from opennmt-py.
do you see thoses two in the checkpoint ?
https://github.com/OpenNMT/OpenNMT-py/blob/master/onmt/modules/copy_generator.py#L69-L70
from opennmt-py.
Yes, thanks, they are both there in the checkpoint.
model = torch.load('model_step_100.pt')
model['generator'].keys()
> odict_keys(['linear.weight', 'linear.bias', 'linear_copy.weight', 'linear_copy.bias'])
from opennmt-py.
Can you git pull and tell me if it works for you?
from opennmt-py.
Thanks! Will do later this evening.
Update: Still getting the same error, unfortunately. I believe that in your edit, near lines 143-144 of model.py, keyname should be set equal to (name.removeprefix("generator.") +"."+ param_name ...
from opennmt-py.
closing. Reopen if needed.
from opennmt-py.
Related Issues (20)
- Translator fails with coverage penalty enabled HOT 3
- Any plan to support "mps" backend? HOT 1
- Translation fails with torch<2.0 HOT 1
- Please delete
- [help] onmt.inputters.text_dataset HOT 5
- The result of opennmt-py translate different from CTranslate2.Translator (beamsearch10) HOT 1
- Is it a requirement for the parallel training corpus to be 100% strictly correspondent paraghaph by paragraph? HOT 2
- Maybe exist some bug in attn_debug function in vesion 3, HOT 18
- transforms: filtertoolong failed in translating HOT 1
- bash: scripts/onmt/train.sh: No such file or directory HOT 4
- Columns and DataType Not Explicitly Set on line 163 of run_mmlu_opennmt.py
- Training fails to start with rotary embedding (Latest OpenNMT-py) HOT 3
- NCCL timeout with 2B+ parameter model HOT 8
- set random seed for a multi-GPU model HOT 1
- Data generation when resuming from a checkpoint HOT 2
- Input size mismatch HOT 1
- Error message of `SequenceTooLongError` HOT 1
- Bug when training encoder-decoder models HOT 1
- Error evaluating LM-prior checkpoint: 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 opennmt-py.