A bit of a messy, heterogeneous PR, apologies for that.
Most importantly: fixes #4. The reference for the variable with a single letter (e.g. "w") was not added correctly because we checked for regex r"^[a-z]\d+$" instead of r"^[a-z]\d*$". In other words: "w2" was matched but "w" was not.
Also some small steps in the direction for contrastive decoding and attempts to fix the issues in issue #3 but those are not fixed yet.
A bit of a messy, heterogeneous PR, apologies for that.
Most importantly: fixes #4. The reference for the variable with a single letter (e.g. "w") was not added correctly because we checked for regex
r"^[a-z]\d+$"
instead ofr"^[a-z]\d*$"
. In other words: "w2" was matched but "w" was not.Also some small steps in the direction for contrastive decoding and attempts to fix the issues in issue #3 but those are not fixed yet.