File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use thiserror::Error;
6
6
use odht:: HashTableOwned ;
7
7
use crate :: rollhash:: { roll_hash, roll_hash_slice} ;
8
8
use crate :: corebpe:: Rank ;
9
+ use std:: sync:: Arc ;
9
10
10
11
include ! ( "odht.rs" ) ;
11
12
include ! ( concat!( env!( "OUT_DIR" ) , "/static.rs" ) ) ;
@@ -26,7 +27,7 @@ pub struct Encoding {
26
27
/// The maximum token value in the encoding.
27
28
max_token_value : Rank ,
28
29
/// The core BPE logic implemented in Rust.
29
- core_bpe : CoreBPE ,
30
+ core_bpe : Arc < CoreBPE > ,
30
31
}
31
32
32
33
// TODO: make a non-generic encoding error here
@@ -121,7 +122,7 @@ impl Encoding {
121
122
prefixes_of_mergeable_ranks,
122
123
special_tokens,
123
124
max_token_value,
124
- core_bpe : core_bpe,
125
+ core_bpe : Arc :: new ( core_bpe) ,
125
126
} )
126
127
}
127
128
You can’t perform that action at this time.
0 commit comments