Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
aneubeck committed Jul 29, 2024
1 parent 5e0c654 commit 25a90e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/bpe/src/appendable_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<'a> AppendableEncoder<'a> {
}

/// Returns the number of tokens required to tokenize the input text.
/// This operation is O(1) and can be called at any point in time.
/// This operation is O(1) and can be called at any point in time.
pub fn len(&self) -> usize {
self.counts.last().copied().unwrap_or(0) as usize
}
Expand All @@ -78,4 +78,4 @@ mod tests {
enc.push(*c);
}
}
}
}
2 changes: 1 addition & 1 deletion crates/bpe/src/backtrack_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::byte_pair_encoding::BytePairEncoding;
/// for a given input text.
/// It keeps track of visited states in a bitfield and only remembers the tokenization
/// of the currently processed dynamic programming state.
///
///
/// The biggest downside of this approach is that the search for the longest leftmost match
/// has to be reset at every (backtracking) step which is still a net win in practice compared to other approaches.
pub(crate) struct BacktrackEncoder<'a> {
Expand Down

0 comments on commit 25a90e7

Please sign in to comment.