refactor: introduce shared tokenizer abstraction and split implementations (#1423)

This commit is contained in:
leejet authored and GitHub committed 2026-04-15 22:44:39 +08:00
1 parent ee5bf956b0
commit 9ac7b672c2
26 files changed
+1332 -1439

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#ifndef __SD_TOKENIZERS_QWEN2_TOKENIZER_H__
#define __SD_TOKENIZERS_QWEN2_TOKENIZER_H__
#include <string>
#include "bpe_tokenizer.h"
class Qwen2Tokenizer : public BPETokenizer {
protected:
void load_from_merges(const std::string& merges_utf8_str);
public:
explicit Qwen2Tokenizer(const std::string& merges_utf8_str = "");
};
#endif // __SD_TOKENIZERS_QWEN2_TOKENIZER_H__