Comments (6)
Check out the new master to get support of beam search with transformer. For transliteration, I would recommend using the transformer
model. To speed up beam search, try using smaller decoding length --max_decode_len 32
or smaller beam size --decode_beam_size 3
. To get the top-k output, you would need modify the return of beam search function to get the top-k prediction (instead of the best prediction)
neural-transducer/src/decoding.py
Lines 469 to 470 in aeb9e60
and write that to file in the following function.
neural-transducer/src/train.py
Lines 272 to 284 in aeb9e60
from neural-transducer.
Thank you for the pointer. I will try to implement it.
I am closing the ticket for time-being. Will open it again, in case I get stuck. Thanks again! 👍
from neural-transducer.
Even adding "src_mask" to line 364. also didn't help. New errors are poping up.
enc_hs = transducer.encode(src_sentence, src_mask)
from neural-transducer.
This is an example from my training data:
a c h z i g a c h z g
v e r g l e i c h v e r l i i c h
j o d l e r f e s t j o d l e r f e s t
r o h r z u c k e r g u t s c h
from neural-transducer.
Hi! It did not support beam search decoding with transformer at the moment due to the naive implementation of transformer with beam search would be much slower, and the gain is relatively small in preliminary experiment.
from neural-transducer.
Thank you @shijie-wu for the information.
It would be helpful if you could please help me with the below queries:
- Any suggestions, what model from this list (soft,hard,approxihard,softinputfeed,largesoftinputfeed,approxihardinputfeed,hardmono,hmm,hmmfull,transformer,universaltransformer,tagtransformer,taguniversaltransformer) can I use for transliterations task (I have mentioned the example in the above comment)?
- The current implementation for greedy decoding for transformers gives only one output (it takes only max probability). Is there any way if I can use the code of beam decoding implemented for other architectures and integrate with transformer pipeline?
- At the end I want to have multiple possible outputs for my input (3-4 would good). Any suggestions how can I achieve so, with the current implementation?
from neural-transducer.
Related Issues (7)
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 neural-transducer.