Download include/ling3/tokenizer.h from Sariel00/Ling-3.0-tiny-RKNN: direct link, hf CLI and curl.
- Browser
- Download file 858 Bytes
-
https://huggingface.co/Sariel00/Ling-3.0-tiny-RKNN/resolve/main/include/ling3/tokenizer.h
- Command line
-
hf download hf://Sariel00/Ling-3.0-tiny-RKNN/include/ling3/tokenizer.h
-
curl -L -o tokenizer.h https://huggingface.co/Sariel00/Ling-3.0-tiny-RKNN/resolve/main/include/ling3/tokenizer.h
858 Bytes
| namespace ling3 { | |
| class Tokenizer { | |
| public: | |
| explicit Tokenizer(std::span<const std::byte> data); | |
| ~Tokenizer(); | |
| Tokenizer(const Tokenizer &) = delete; | |
| Tokenizer & operator=(const Tokenizer &) = delete; | |
| Tokenizer(Tokenizer &&) noexcept; | |
| Tokenizer & operator=(Tokenizer &&) noexcept; | |
| std::vector<std::uint32_t> Encode(std::string_view text) const; | |
| std::string Decode(std::span<const std::uint32_t> tokens, bool skip_special = false) const; | |
| std::string_view Piece(std::uint32_t token) const; | |
| std::size_t vocab_size() const noexcept; | |
| bool uses_official_unicode_rules() const noexcept; | |
| private: | |
| struct Impl; | |
| std::unique_ptr<Impl> impl_; | |
| }; | |
| } // namespace ling3 | |