File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 11use crate :: byte_pair_encoding:: BytePairEncoding ;
22
3+ #[ derive( Clone ) ]
34struct State {
45 state : u32 ,
56 last_token : u32 ,
67 count : u32 ,
78}
89
910/// Encoder which keeps track of the encoding length while appending characters.
11+ #[ derive( Clone ) ]
1012pub struct AppendableEncoder < ' a > {
1113 bpe : & ' a BytePairEncoding ,
1214 states : Vec < State > ,
Original file line number Diff line number Diff line change 11use crate :: byte_pair_encoding:: BytePairEncoding ;
22
3+ #[ derive( Clone ) ]
34struct State {
45 state : u32 ,
56 prev_token : u32 ,
67 count : u32 ,
78}
89
910/// Encoder which keeps track of the encoding length while prepending characters.
11+ #[ derive( Clone ) ]
1012pub struct PrependableEncoder < ' a > {
1113 bpe : & ' a BytePairEncoding ,
1214 states : Vec < State > ,
You can’t perform that action at this time.
0 commit comments