{"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/vampnet-music-generation-via-masked-acoustic","title":"VampNet: Music Generation via Masked Acoustic Token Modeling","arxiv_id":"2307.04686","date":"2023-07-10","proceeding":null,"authors":["Hugo Flores Garcia","Prem Seetharaman","Rithesh Kumar","Bryan Pardo"],"abstract":"We introduce VampNet, a masked acoustic token modeling approach to music synthesis, compression, inpainting, and variation. We use a variable masking schedule during training which allows us to sample coherent music from the model by applying a variety of masking approaches (called prompts) during inference. VampNet is non-autoregressive, leveraging a bidirectional transformer architecture that attends to all tokens in a forward pass. With just 36 sampling passes, VampNet can generate coherent high-fidelity musical waveforms. We show that by prompting VampNet in various ways, we can apply it to tasks like music compression, inpainting, outpainting, continuation, and looping with variation (vamping). Appropriately prompted, VampNet is capable of maintaining style, genre, instrumentation, and other high-level aspects of the music. This flexible prompting capability makes VampNet a powerful music co-creation tool. Code and audio samples are available online.","url_abs":"https://arxiv.org/abs/2307.04686v2","url_pdf":"https://arxiv.org/pdf/2307.04686v2.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":"vampnet-music-generation-via-masked-acoustic","repo_url":"https://github.com/hugofloresgarcia/vampnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"music-compression","task_name":"Music Compression"},{"task_slug":"music-generation","task_name":"Music Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2307.04686","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.04686"}},"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/hugofloresgarcia/vampnet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":12,"ran_fixture":1,"unverified":3},"by_repo_kind":{"official":{"samples":16,"ran":13,"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":0,"samples":[{"code_sha256_prefix":"7c70f983bb9174e5","entry":"apply_mask","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/mask.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/mask.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":"7c70f983bb9174e5"}},{"code_sha256_prefix":"6e733e2a7236425e","entry":"codebook_flatten","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/util.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/util.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":"6e733e2a7236425e"}},{"code_sha256_prefix":"68f9cadae338bfc7","entry":"empty_mask","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/mask.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/mask.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":"68f9cadae338bfc7"}},{"code_sha256_prefix":"63736890909701b0","entry":"empty_mask","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/newmask.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/newmask.py","link_basis":"first_harvest_node","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":"63736890909701b0"}},{"code_sha256_prefix":"46c5a316df2a5de0","entry":"full_mask","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/mask.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/mask.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":"46c5a316df2a5de0"}},{"code_sha256_prefix":"54cd9fe8295768a8","entry":"full_mask","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/newmask.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/newmask.py","link_basis":"first_harvest_node","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":"54cd9fe8295768a8"}},{"code_sha256_prefix":"e265b3209a0c853d","entry":"get_activation","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/modules/activations.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/modules/activations.py","link_basis":"first_harvest_node","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":"e265b3209a0c853d"}},{"code_sha256_prefix":"1ebbad268c6bb8f4","entry":"gumbel_noise_like","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/modules/transformer.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/modules/transformer.py","link_basis":"first_harvest_node","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":"1ebbad268c6bb8f4"}},{"code_sha256_prefix":"1a3c2fe46aeb41b8","entry":"gumbel_sample","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/modules/transformer.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/modules/transformer.py","link_basis":"first_harvest_node","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":"1a3c2fe46aeb41b8"}},{"code_sha256_prefix":"48689cd65df839d6","entry":"num_params","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/modules/layers.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/modules/layers.py","link_basis":"first_harvest_node","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":"48689cd65df839d6"}},{"code_sha256_prefix":"25f0a1537ac7bc61","entry":"sample_from_logits","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/modules/transformer.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/modules/transformer.py","link_basis":"first_harvest_node","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":"25f0a1537ac7bc61"}},{"code_sha256_prefix":"590bc0634533f773","entry":"scalar_to_batch_tensor","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/util.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/util.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":"590bc0634533f773"}},{"code_sha256_prefix":"f247e4748f379a76","entry":"snake","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/modules/layers.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/modules/layers.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f247e4748f379a76"}},{"code_sha256_prefix":"cf675ebed67c112d","entry":"looper_process_block","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"token_telephone/tt.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/token_telephone/tt.py","link_basis":"first_harvest_node","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":"cf675ebed67c112d"}},{"code_sha256_prefix":"843cfb3ab9041539","entry":"mkdir","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/beats.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/beats.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":"843cfb3ab9041539"}},{"code_sha256_prefix":"e1ca978c93c552a0","entry":"parallelize","repo":"hugofloresgarcia/vampnet","repo_kind":"official","path":"vampnet/util.py","file_url":"https://github.com/hugofloresgarcia/vampnet/blob/HEAD/vampnet/util.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":"e1ca978c93c552a0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}