Views
No views yet
Stephen-Lee/TtT-3B1from modeling_qwen_TtT import Qwen2ForARDiffLM
2from transformers import AutoTokenizer
3
4# Load model and tokenizer
5model = Qwen2ForARDiffLM.from_pretrained("Stephen-Lee/TtT-3B", trust_remote_code=True)
6tokenizer = AutoTokenizer.from_pretrained("Stephen-Lee/TtT-3B", trust_remote_code=True)
7
8# Set up special tokens
9if tokenizer.mask_token_id is None:
10 tokenizer.mask_token_id = tokenizer.convert_tokens_to_ids("<|mask_token|>")
11
12# Generate
13prompt = (
14 "<|im_start|>user\n"
15 "<|begin_of_audio|><|audio_1234|>...<|end_of_audio|><|im_end|>\n"
16 "<|im_start|>assistant\n"
17)
18output = generate(model, tokenizer, prompt, max_gen_len=2048)python inference_TtT.py1@inproceedings{liu2026ttt,
2 title={From Text to Talk: Audio-Language Model Needs Non-Autoregressive Joint Training},
3 author={Liu, Tianqiao and Li, Xueyi and Wang, Hao and Li, Haoxuan and Chen, Zhichao and Luo, Weiqi and Liu, Zitao},
4 booktitle={Proceedings of the 14th International Conference on Learning Representations},
5 month = {April},
6 year={2026},
7 address = {Rio de Janeiro, Brazil}
8}