Skip to content

Commit c2894bc

Browse files
committed
transformerless_lm: thread punct_mask + newline_mask through refine paths
1 parent 4596e06 commit c2894bc

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

experiments/transformerless_lm/train_self_recursive.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,9 @@ def _single_stage_refine(model, draft, vocab_size, scorer, mode: str,
12681268
n_classes: int = 0,
12691269
pronoun_mask: torch.Tensor = None,
12701270
vowel_start_mask: torch.Tensor = None,
1271-
end_vowels: list = None):
1271+
end_vowels: list = None,
1272+
punct_mask: torch.Tensor = None,
1273+
newline_mask: torch.Tensor = None):
12721274
"""One refinement stage: optimize a single score until plateau.
12731275
12741276
mode: 'min' (harmony, quality) or 'max' (creativity).
@@ -1434,7 +1436,9 @@ def staged_refine(model, prompt, n_new, vocab_size,
14341436
n_classes: int = 0,
14351437
pronoun_mask: torch.Tensor = None,
14361438
vowel_start_mask: torch.Tensor = None,
1437-
end_vowels: list = None):
1439+
end_vowels: list = None,
1440+
punct_mask: torch.Tensor = None,
1441+
newline_mask: torch.Tensor = None):
14381442
"""Staircase refinement: hit one score, then the next, then the next.
14391443
14401444
Stage 1: substrate alignment (minimize harmony) -- match the shape.

0 commit comments

Comments
 (0)