Thanks for open source the Contrastive Decoding, it is really an interest and smart method.
I found you have copied the whole Transformers library, and just changed around two files.
Why not use python dynamic binding to patch Transformers generation methods? I think it will be easier to maintain and debug.
e.g.
Thanks for open source the Contrastive Decoding, it is really an interest and smart method. I found you have copied the whole Transformers library, and just changed around two files. Why not use python dynamic binding to patch Transformers generation methods? I think it will be easier to maintain and debug. e.g.