{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/alitok-towards-sequence-modeling-alignment-1","title":"AliTok: Towards Sequence Modeling Alignment between Tokenizer and Autoregressive Model","arxiv_id":"2506.05289","date":"2025-06-05","proceeding":"arXiv 2025 6","authors":["Pingyu Wu","Kai Zhu","Yu Liu","Longxiang Tang","Jian Yang","Yansong Peng","Wei Zhai","Yang Cao","Zheng-Jun Zha"],"abstract":"Autoregressive image generation aims to predict the next token based on previous ones. However, existing image tokenizers encode tokens with bidirectional dependencies during the compression process, which hinders the effective modeling by autoregressive models. In this paper, we propose a novel Aligned Tokenizer (AliTok), which utilizes a causal decoder to establish unidirectional dependencies among encoded tokens, thereby aligning the token modeling approach between the tokenizer and autoregressive model. Furthermore, by incorporating prefix tokens and employing two-stage tokenizer training to enhance reconstruction consistency, AliTok achieves great reconstruction performance while being generation-friendly. On ImageNet-256 benchmark, using a standard decoder-only autoregressive model as the generator with only 177M parameters, AliTok achieves a gFID score of 1.50 and an IS of 305.9. When the parameter count is increased to 662M, AliTok achieves a gFID score of 1.35, surpassing the state-of-the-art diffusion method with 10x faster sampling speed. The code and weights are available at https://github.com/ali-vilab/alitok.","url_abs":"https://arxiv.org/abs/2506.05289v1","url_pdf":"https://arxiv.org/pdf/2506.05289v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"alitok-towards-sequence-modeling-alignment-1","repo_url":"https://github.com/ali-vilab/alitok","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-generation-on-imagenet-256x256","task":"Image Generation","dataset":"ImageNet 256x256","model":"AliTok-XL, autoregressive, 662M","rank_in_archive_order":13,"of":94,"metrics":{"FID":"1.35","Inception score":"318.8"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-256x256","task":"Image Generation","dataset":"ImageNet 256x256","model":"AliTok-XL, autoregressive, 318M","rank_in_archive_order":17,"of":94,"metrics":{"FID":"1.42","Inception score":"326.6"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2506.05289","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.05289"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ali-vilab/alitok","reach":null}],"summary":{"ran":3,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":8,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":8,"samples":[{"code_sha256_prefix":"90986cade2362a6c","entry":"Attention","repo":"ali-vilab/alitok","repo_kind":"official","path":"modeling/alitok.py","file_url":"https://github.com/ali-vilab/alitok/blob/HEAD/modeling/alitok.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"90986cade2362a6c"}},{"code_sha256_prefix":"71a046a9abe78001","entry":"ResidualAttentionBlock","repo":"ali-vilab/alitok","repo_kind":"official","path":"modeling/alitok.py","file_url":"https://github.com/ali-vilab/alitok/blob/HEAD/modeling/alitok.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"71a046a9abe78001"}},{"code_sha256_prefix":"8c5d87429839addc","entry":"VectorQuantizer","repo":"ali-vilab/alitok","repo_kind":"official","path":"modeling/alitok.py","file_url":"https://github.com/ali-vilab/alitok/blob/HEAD/modeling/alitok.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8c5d87429839addc"}},{"code_sha256_prefix":"19a5b88fdb546606","entry":"create_npz_from_sample_folder","repo":"ali-vilab/alitok","repo_kind":"official","path":"sample_imagenet.py","file_url":"https://github.com/ali-vilab/alitok/blob/HEAD/sample_imagenet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"19a5b88fdb546606"}},{"code_sha256_prefix":"9f49ed271158263c","entry":"AliTok","repo":"ali-vilab/alitok","repo_kind":"official","path":"modeling/alitok.py","file_url":"https://github.com/ali-vilab/alitok/blob/HEAD/modeling/alitok.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9f49ed271158263c"}},{"code_sha256_prefix":"71c21cc5683de18f","entry":"Decoder","repo":"ali-vilab/alitok","repo_kind":"official","path":"modeling/alitok.py","file_url":"https://github.com/ali-vilab/alitok/blob/HEAD/modeling/alitok.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"71c21cc5683de18f"}},{"code_sha256_prefix":"c5d3142e52feb9a8","entry":"Encoder","repo":"ali-vilab/alitok","repo_kind":"official","path":"modeling/alitok.py","file_url":"https://github.com/ali-vilab/alitok/blob/HEAD/modeling/alitok.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c5d3142e52feb9a8"}},{"code_sha256_prefix":"ed9a3eb24c70f0c6","entry":"VAutoencoder","repo":"ali-vilab/alitok","repo_kind":"official","path":"modeling/alitok.py","file_url":"https://github.com/ali-vilab/alitok/blob/HEAD/modeling/alitok.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ed9a3eb24c70f0c6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}