Skip to content

Commit

Permalink
Getters for tokenizer.
Browse files Browse the repository at this point in the history
  • Loading branch information
cryscan committed Feb 25, 2024
1 parent 9dbb9b0 commit 959bf55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keywords = ["deep-learning", "language", "model", "rwkv"]
license = "MIT OR Apache-2.0"
name = "web-rwkv"
repository = "https://github.com/cryscan/web-rwkv"
version = "0.6.21"
version = "0.6.22"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -18,6 +18,7 @@ ahash = "0.8"
anyhow = "1"
bitflags = "2.3"
bytemuck = { version = "1.13", features = ["extern_crate_alloc"] }
derive-getters = "0.3"
flume = "0.11.0"
futures = "0.3"
gpp = "0.6.2"
Expand Down
3 changes: 2 additions & 1 deletion src/tokenizer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use ahash::{AHashMap as HashMap, AHashSet as HashSet};
use derive_getters::Getters;
use std::collections::BTreeMap;
use wasm_bindgen::prelude::wasm_bindgen;
use web_rwkv_derive::JsError;
Expand Down Expand Up @@ -31,7 +32,7 @@ impl std::fmt::Display for TokenizerError {
impl std::error::Error for TokenizerError {}

#[wasm_bindgen]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Getters)]
pub struct Tokenizer {
first_bytes_to_lengths: Vec<Box<[u16]>>,
bytes_to_token_index: HashMap<Vec<u8>, u16>,
Expand Down

0 comments on commit 959bf55

Please sign in to comment.