Skip to content

Commit 4e90138

Browse files
committed
transformerless_lm: disable symbolic substitution for v61
v60 substitution leaked caps + diluted real-word concentration (mean dropped ~0.04). Keeping symbol-class machinery + pronoun mask precomputed but only firing reference-chain at sampling time.
1 parent ef72160 commit 4e90138

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

experiments/transformerless_lm/train_self_recursive.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -987,10 +987,8 @@ def autoregressive_generate(model, prompt: torch.Tensor, n_new: int,
987987
# Iambic stress rhythm (period-2 weak/STRONG alternation).
988988
probs[0] = substrate_iambic_phase(
989989
syl_pos, probs[0], vocab_size)
990-
# Symbolic substitution (within-class mass smoothing).
991-
if class_id_tensor is not None and n_classes > 0:
992-
probs[0] = substrate_symbolic_substitution(
993-
probs[0], class_id_tensor, n_classes)
990+
# Symbolic substitution disabled (v60 showed caps-leak +
991+
# mass-dilution drops mean ~0.04).
994992
# Symbolic reference chain (pronoun anaphora).
995993
if pronoun_mask is not None and seq.shape[1] >= 1:
996994
recent_list = seq[0, -13:].tolist()
@@ -1099,10 +1097,7 @@ def _single_stage_refine(model, draft, vocab_size, scorer, mode: str,
10991097
syl_pos += _approx_syllables(vocab[tid])
11001098
pos_probs = substrate_iambic_phase(
11011099
syl_pos, pos_probs, vocab_size_local)
1102-
# Symbolic substitution (within-class smoothing).
1103-
if class_id_tensor is not None and n_classes > 0:
1104-
pos_probs = substrate_symbolic_substitution(
1105-
pos_probs, class_id_tensor, n_classes)
1100+
# Symbolic substitution disabled (v60 results).
11061101
# Symbolic reference chain (pronoun anaphora).
11071102
if pronoun_mask is not None and t_draft >= 1:
11081103
recent_start = max(0, t_draft - 13)

0 commit comments

Comments
 (0)