Chat Tokenizer
Project description
chat-tokenizer
Usage
from chat_tokenizer import ChatTokenizer
from transformers import AutoTokenizer
tokenizer = ChatTokenizer(AutoTokenizer.from_pretrained("qwen/Qwen2.5-0.5B-Instruct"))
audio_lens = [[4, 2], 3]
labels = [["今天天气不错", "哈哈"], "你好啊"]
input_ids, input_lens, label_ids, label_lens = tokenizer.batch_tokenize(audio_lens, labels)
input_ids = tokenizer.fill_labels(label_ids, input_ids)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chat_tokenizer-0.0.4-py3-none-any.whl.
File metadata
- Download URL: chat_tokenizer-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4732c452ab4e6f4d870723a46a571d96b335f794437aaa65432dd83a6d703d2
|
|
| MD5 |
53e06951bc77b83c164012b472bd4054
|
|
| BLAKE2b-256 |
230224bdf119b33803521c7dbdcf2f8cddd8f5150c71b094469f2084e93b7eef
|