Closed vkaul11 closed 4 months ago
Hi there,
In the generated icl example, there can be special tokens that we would like to discard (e.g., [/INST]) before appending the actual example. Therefore we match the answer_prefix by indexing the first 10 characters, and throw away the unwanted special tokens. It's a good catch that when there is no inserted model template, we won't need this part. You are welcome to patch our code by making a pull request!
Indeed we use variable with length 3 instead of 5 in the ICL example as we found some models tend to copy a lot from the ICL example and thus wanted to differentiate the ICL example from the actual input example as much as possible. However, some models still exhibit the copying behavior as we described in the paper.
vars[0]
is a list in which we store all the target answer variable names. e.g. for chains [['VAR QAH = 25795', 'VAR FTR = VAR QAH ', 'VAR XCK = VAR FTR ', 'VAR AFN = VAR XCK ', 'VAR AFQ = VAR AFN '], ['VAR OFP = 10860', 'VAR VAU = VAR OFP ', 'VAR SIE = VAR VAU ', 'VAR YIC = VAR SIE ', 'VAR CWP = VAR YIC ']]
, we have corresponding vars [['QAH', 'FTR', 'XCK', 'AFN', 'AFQ'], ['OFP', 'VAU', 'SIE', 'YIC', 'CWP']]
and the first chain is what the model should trace, the rest should be ignored.
Thanks for your work I am a bit confused about the code here
https://github.com/hsiehjackson/RULER/blob/main/scripts/data/synthetic/variable_tracking.py#L116
I had few questions on the code: