Skip to content

Commit

Permalink
Move vocabulary to a dedicated module
Browse files Browse the repository at this point in the history
  • Loading branch information
torymur committed Nov 11, 2024
1 parent e85ce90 commit 5eb350d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ pub mod primitives;
pub mod regex;
pub mod vocabulary;

mod locator;
mod processor;

#[cfg(feature = "python-bindings")]
mod python_bindings;

Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions src/vocabulary.rs → src/vocabulary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ use std::collections::HashMap;
use tokenizers::normalizers::Sequence;
use tokenizers::{FromPretrainedParameters, NormalizerWrapper, Tokenizer};

use crate::locator::EosTokenLocator;
use crate::prelude::*;
use crate::processor::TokenProcessor;
use crate::VocabularyError;

use locator::EosTokenLocator;
use processor::TokenProcessor;

mod locator;
mod processor;

/// Vocabulary of an LLM.
///
/// ## Examples
Expand Down
File renamed without changes.

0 comments on commit 5eb350d

Please sign in to comment.