Absolute Value Function
Last edited: August 8, 2025Here’s a fun implementation of absolute value.
long abs_value(long num) {
long sign = num >> (sizeof(long)*CHAR_BIT - 1); // so you only get all 1s or all 0s
return (num ^ sign) - sign; // sign is either -1 or 0. So, if num is non-negative
// num^sign is not going to do anything (as 0^0 = 0, 0^1 = 1).
// If num negative, num^sign is going to flip the bit AND subtract
// negative on (i.e. add one)
}
abstract syntax tree
Last edited: August 8, 2025abstract syntax tree is what happens when CFGs is applied to text (i.e., the parser traces the AST in time).
Building an AST
Generally, each production will have an action, which is the relevant computation.
X -> Y1... Yn { action }
Each symbol X admits an attribute X.val
- for each terminal,
valis the associated lexeme - for non-terminals,
valis the expression’s value (i.e., from the values of the subexpressions)
you job is to compose the subexpressions’ values and stick it into X.val. Notably, cycles are not allowed because we typically parse bottom-up, left ot right.
acadm
Last edited: August 8, 2025accounting price
Last edited: August 8, 2025To determine
ACL2025 Huang: Making in Multi-Hop QA
Last edited: August 8, 2025Question: can we find a good context permutation to improve reasoning capabilities.
One-Liner
Notable Methods
Two key evaluations:
- evalutanig relationships between gold documents; notice that performance relates to distance between documents (but FTing helps)
- investigate the effects between different attention masks (i.e., the use of prefix vs continuation masks)
IC Score
attention-based context attribution method
New Concepts
Key insight: correct answers will have single peak of IC scores at gold results; incorrect answers will have more dispersed IC scores.
