tiny_decoders / checkpoints /attr_aliases.yaml
chameleon-lizard's picture
Upload progression-v2_base_full model
225f2c6 verified
Raw History Blame
1.58 kB
# Fixed 2-letter aliases for common Python attribute names.
#
# Any `Attribute.attr` node whose name appears here is emitted as the corresponding 2-letter
# alias. Attrs not in this table fall back to being emitted as a raw single-letter stream,
# which often pushes the sample past the 128-token cap and gets it filtered out.
#
# Invariants enforced by the Vocab loader:
# 1. No alias equals a 2-letter Python keyword (`as`, `if`, `in`, `is`, `or`).
# 2. No alias appears in both this file and `builtin_aliases.yaml`.
#
# Aliases are picked as distinctive mnemonics; collisions resolved by picking distinct
# second letters within a functional group.
# --- list / sequence methods ---
append: aa
extend: xt
insert: ti # "in" is a keyword, use ti (ins-erT + I)
remove: mv
clear: cw
count: ct
# --- dict / set methods ---
update: ud
setdefault: sf
pop: pp
popitem: pi
items: jm # "it" would collide with iter's alias; use j as mnemonic for pl-j-urals
keys: kk
get: gu
values: vu
# --- sorting / reversing (distinct from builtins sorted/reversed) ---
sort: so
reverse: vv # "rv" is taken by reversed()
# --- string methods ---
find: fi
split: pl
join: jn
strip: tq
lower: lw
upper: ur
replace: rl
startswith: sw
endswith: ew
encode: nc
decode: dk # "de" feels too generic
format: ft
# --- file / io methods ---
read: rd
write: wt
readline: rq
readlines: rw
close: cg
seek: sq
tell: tu
flush: fu
# --- object attributes ---
name: nm
value: vl
data: da
size: sz
length: lh
shape: sk
dtype: dy
# --- common numeric attrs (ndarray / tensor) ---
mean: mj
std: sj
var: va