{"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/language-model-beats-diffusion-tokenizer-is","title":"Language Model Beats Diffusion -- Tokenizer is Key to Visual Generation","arxiv_id":"2310.05737","date":"2023-10-09","proceeding":null,"authors":["Lijun Yu","José Lezama","Nitesh B. Gundavarapu","Luca Versari","Kihyuk Sohn","David Minnen","Yong Cheng","Vighnesh Birodkar","Agrim Gupta","Xiuye Gu","Alexander G. Hauptmann","Boqing Gong","Ming-Hsuan Yang","Irfan Essa","David A. Ross","Lu Jiang"],"abstract":"While Large Language Models (LLMs) are the dominant models for generative tasks in language, they do not perform as well as diffusion models on image and video generation. To effectively use LLMs for visual generation, one crucial component is the visual tokenizer that maps pixel-space inputs to discrete tokens appropriate for LLM learning. In this paper, we introduce MAGVIT-v2, a video tokenizer designed to generate concise and expressive tokens for both videos and images using a common token vocabulary. Equipped with this new tokenizer, we show that LLMs outperform diffusion models on standard image and video generation benchmarks including ImageNet and Kinetics. In addition, we demonstrate that our tokenizer surpasses the previously top-performing video tokenizer on two more tasks: (1) video compression comparable to the next-generation video codec (VCC) according to human evaluations, and (2) learning effective representations for action recognition tasks.","url_abs":"https://arxiv.org/abs/2310.05737v3","url_pdf":"https://arxiv.org/pdf/2310.05737v3.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":"language-model-beats-diffusion-tokenizer-is","repo_url":"https://github.com/jy0205/Pyramid-Flow","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"language-model-beats-diffusion-tokenizer-is","repo_url":"https://github.com/lucidrains/magvit2-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"language-model-beats-diffusion-tokenizer-is","repo_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"action-recognition-in-videos","task_name":"Action Recognition"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"video-compression","task_name":"Video Compression"},{"task_slug":"video-generation","task_name":"Video Generation"},{"task_slug":"video-prediction","task_name":"Video Prediction"}],"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":"MAGVIT-v2","rank_in_archive_order":38,"of":94,"metrics":{"FID":"1.78"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-256x256","task":"Image Generation","dataset":"ImageNet 256x256","model":"MAGVIT-v2 (w/o guidance)","rank_in_archive_order":73,"of":94,"metrics":{"FID":"3.65"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-512x512","task":"Image Generation","dataset":"ImageNet 512x512","model":"MAGVIT-v2","rank_in_archive_order":25,"of":52,"metrics":{"FID":"1.91","Inception score":"324.3"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-512x512","task":"Image Generation","dataset":"ImageNet 512x512","model":"MAGVIT-v2 (w/o guidance)","rank_in_archive_order":42,"of":52,"metrics":{"FID":"3.07","Inception score":"213.1"},"uses_additional_data":false},{"leaderboard":"/sota/video-generation-on-kinetics-600-12-frames","task":"Video Generation","dataset":"Kinetics-600 12 frames, 64x64","model":"MAGVIT-v2","rank_in_archive_order":2,"of":4,"metrics":{"FVD":"4.3±0.1"},"uses_additional_data":false},{"leaderboard":"/sota/video-generation-on-ucf-101","task":"Video Generation","dataset":"UCF-101","model":"MAGVIT-v2","rank_in_archive_order":5,"of":48,"metrics":{"FVD16":"58±3"},"uses_additional_data":false},{"leaderboard":"/sota/video-generation-on-ucf-101","task":"Video Generation","dataset":"UCF-101","model":"MAGVIT-v2 (AR)","rank_in_archive_order":10,"of":48,"metrics":{"FVD16":"109"},"uses_additional_data":false},{"leaderboard":"/sota/video-prediction-on-kinetics-600-12-frames","task":"Video Prediction","dataset":"Kinetics-600 12 frames, 64x64","model":"MAGVIT-v2","rank_in_archive_order":3,"of":16,"metrics":{"FVD":"4.3±0.1"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.05737","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.05737"}},"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/jy0205/Pyramid-Flow","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucidrains/magvit2-pytorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bornfly-detachment/asymmetric_magvitv2","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":2,"ran_draft_wrong":2,"ran_violates":4,"ran":4,"unverified":8},"by_repo_kind":{"listed":{"samples":20,"ran":12,"repositories":2}},"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":0,"samples":[{"code_sha256_prefix":"7f1040f5e3991d5e","entry":"identity","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/data.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/data.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7f1040f5e3991d5e"}},{"code_sha256_prefix":"9fcdaa6e423e8aa7","entry":"Normalize","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/modules/ops.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/modules/ops.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9fcdaa6e423e8aa7"}},{"code_sha256_prefix":"4a06bf1ac86f840a","entry":"compact","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/attend.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/attend.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4a06bf1ac86f840a"}},{"code_sha256_prefix":"60fff7c3c400d7ff","entry":"default","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/attend.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/attend.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60fff7c3c400d7ff"}},{"code_sha256_prefix":"99b3563ebc6734ad","entry":"default","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/magvit2_pytorch.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/magvit2_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"99b3563ebc6734ad"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/attend.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/attend.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"b7c3487f192e31b7","entry":"exists","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/magvit2_pytorch.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/magvit2_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b7c3487f192e31b7"}},{"code_sha256_prefix":"9edde0325b62d764","entry":"load_json","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/utils/ckpt_utils.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/utils/ckpt_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9edde0325b62d764"}},{"code_sha256_prefix":"3137073275f8c21a","entry":"nonlinearity","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/modules/ops.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/modules/ops.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3137073275f8c21a"}},{"code_sha256_prefix":"17eb0a31c91b671c","entry":"normal_kl","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/regularizers/distributions.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/regularizers/distributions.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"17eb0a31c91b671c"}},{"code_sha256_prefix":"9270ed2833cf3467","entry":"pair","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/data.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/data.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9270ed2833cf3467"}},{"code_sha256_prefix":"fdc11aefc97f3abb","entry":"separate_weight_decayable_params","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/optimizer.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/optimizer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fdc11aefc97f3abb"}},{"code_sha256_prefix":"86eb20af302241cc","entry":"get_optimizer","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/optimizer.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/optimizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"86eb20af302241cc"}},{"code_sha256_prefix":"241125f1cc6c1245","entry":"get_transform","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/utils/image_op.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/utils/image_op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"241125f1cc6c1245"}},{"code_sha256_prefix":"5d4ae8e6aa7239c9","entry":"get_video_frame","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/utils/image_op.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/utils/image_op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5d4ae8e6aa7239c9"}},{"code_sha256_prefix":"cbe1cbc7eafd9f05","entry":"measure_perplexity","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/regularizers/base.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/regularizers/base.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cbe1cbc7eafd9f05"}},{"code_sha256_prefix":"dba295827e199ba0","entry":"model_load_ckpt","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/evaluation.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dba295827e199ba0"}},{"code_sha256_prefix":"eb7ab5a96e9ccae8","entry":"read_image","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/utils/image_op.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/utils/image_op.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eb7ab5a96e9ccae8"}},{"code_sha256_prefix":"fb669d9f4c5be75e","entry":"safe_get_index","repo":"lucidrains/magvit2-pytorch","repo_kind":"listed","path":"magvit2_pytorch/magvit2_pytorch.py","file_url":"https://github.com/lucidrains/magvit2-pytorch/blob/HEAD/magvit2_pytorch/magvit2_pytorch.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fb669d9f4c5be75e"}},{"code_sha256_prefix":"3dc965c89ff14c5f","entry":"video_to_image","repo":"bornfly-detachment/asymmetric_magvitv2","repo_kind":"listed","path":"models/modules/ops.py","file_url":"https://github.com/bornfly-detachment/asymmetric_magvitv2/blob/HEAD/models/modules/ops.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3dc965c89ff14c5f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}