Skip to content

Commit 43d0317

Browse files
authored
Forward fix tekken tokenizer for internal test (#122)
Summary: allow-large-files bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks bypass-github-torchtune-ci-checks diff-train-skip-merge Reviewed By: jackzhxng Differential Revision: D81598484
1 parent 4ed91cc commit 43d0317

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

include/pytorch/tokenizers/tekken.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class Tekken : public detail::BPETokenizerBase {
4949
};
5050

5151
explicit Tekken();
52+
~Tekken() override = default;
5253

5354
// Load from tekken.json file
5455
Error load(const std::string& tokenizer_path) override;

targets.bzl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,29 @@ def define_common_targets():
172172
platforms = PLATFORMS,
173173
)
174174

175+
runtime.cxx_library(
176+
name = "tekken",
177+
srcs = [
178+
"src/tekken.cpp",
179+
],
180+
deps = [
181+
":regex",
182+
],
183+
exported_deps = [
184+
":bpe_tokenizer_base",
185+
":headers",
186+
],
187+
exported_external_deps = [
188+
"re2",
189+
"nlohmann_json",
190+
],
191+
visibility = [
192+
"@EXECUTORCH_CLIENTS",
193+
"//pytorch/tokenizers/...",
194+
],
195+
platforms = PLATFORMS,
196+
)
197+
175198
runtime.cxx_python_extension(
176199
name = "pytorch_tokenizers_cpp",
177200
srcs = [
@@ -186,6 +209,7 @@ def define_common_targets():
186209
":hf_tokenizer",
187210
":llama2c_tokenizer",
188211
":sentencepiece",
212+
":tekken",
189213
":tiktoken",
190214
],
191215
external_deps = [

0 commit comments

Comments
 (0)