big_llm/tests/tokenizer/test_openmtadapter.cpp
2025-08-16 20:25:23 -07:00

13 lines
393 B
C++

#include "tokenizer/opennmt_adapter.hpp"
#include <gtest/gtest.h>
TEST(OpenNMTAdapter, ModeSwitch) {
OpenNMTAdapter tokenizer("config.json");
auto bpe_tokens = tokenizer.encode("hello", OpenNMTAdapter::Mode::BPE);
auto sp_tokens = tokenizer.encode("hello", OpenNMTAdapter::Mode::SENTENCEPIECE);
EXPECT_NE(bpe_tokens, sp_tokens); // Different tokenization schemes
}