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;
66use odht:: HashTableOwned ;
77use crate :: rollhash:: { roll_hash, roll_hash_slice} ;
88use crate :: corebpe:: Rank ;
9+ use std:: sync:: Arc ;
910
1011include ! ( "odht.rs" ) ;
1112include ! ( concat!( env!( "OUT_DIR" ) , "/static.rs" ) ) ;
@@ -26,7 +27,7 @@ pub struct Encoding {
2627 /// The maximum token value in the encoding.
2728 max_token_value : Rank ,
2829 /// The core BPE logic implemented in Rust.
29- core_bpe : CoreBPE ,
30+ core_bpe : Arc < CoreBPE > ,
3031}
3132
3233// TODO: make a non-generic encoding error here
@@ -121,7 +122,7 @@ impl Encoding {
121122 prefixes_of_mergeable_ranks,
122123 special_tokens,
123124 max_token_value,
124- core_bpe : core_bpe,
125+ core_bpe : Arc :: new ( core_bpe) ,
125126 } )
126127 }
127128
You can’t perform that action at this time.
0 commit comments