Noble-Lab / casanovo

De Novo Mass Spectrometry Peptide Sequencing with a Transformer Model
https://casanovo.readthedocs.io
Apache License 2.0
102 stars 37 forks source link

Add rotary embeddings #321

Open wsnoble opened 5 months ago

wsnoble commented 5 months ago

Apparently in NLP, rotary embeddings are being used somewhat frequently. Rather than absolute positional information, they capture relative positional information. In mass spec, differences between peaks are also important. Would require changes in DepthCharge to do this. Will says there is an option to use a custom function for the encoding. We would just need to write the code to do the rotary embeddings.

Here is a description.