def dec

bend-ml-bpe-tokenizer@0.1.3.0 · main.bend:117

import bend-ml-bpe-tokenizer@0.1.3.0/main.bend as BendMlBpeTokenizer
import Base

117# decodes with the already reversed table (newest first)
118def dec(+table: List<&2, Rule>, ids: List<&2, Tk>) -> List<&2, Nat>:
119  match ids:
120    case Nil{}:
121      Nil{}
122    case Con{+x, t}:
123      List.append(&2, Nat, exp(table, x), dec(table, t))

Uses (6)

Used by (11)