Night 10.11.2026: m-a-p/YuE2-3B (the model as m-a-p publishes it), unchanged (CC BY-NC 4.0), at the Studio's own path; its lines in MANIFEST.tsv, SHA256SUMS, THIRD_PARTY_NOTICES.md and the card
Browse filesFiles changed (31)
- .gitattributes+8
- MANIFEST.tsv+26
- README.md+1
- SHA256SUMS+26
- THIRD_PARTY_NOTICES.md+17
- checkpoints/YuE2-3B/LICENSEAdded+429
- checkpoints/YuE2-3B/THIRD_PARTY_NOTICES.mdAdded+15
- checkpoints/YuE2-3B/assets/architecture.pngAdded
- checkpoints/YuE2-3B/assets/audio/auld-lang-syne-jazz-funk-cover.mp3Added+3
- checkpoints/YuE2-3B/assets/audio/cyber-metal.mp3Added+3
- checkpoints/YuE2-3B/assets/audio/examples.jsonAdded+111
- checkpoints/YuE2-3B/assets/audio/jingle-bells-heavy-metal-cover.mp3Added+3
- checkpoints/YuE2-3B/assets/audio/passion.mp3Added+3
- checkpoints/YuE2-3B/assets/audio/tonight-awake.mp3Added+3
- checkpoints/YuE2-3B/assets/audio/zuixuan-ballad-cover.mp3Added+3
- checkpoints/YuE2-3B/assets/figure1.pdfAdded
- checkpoints/YuE2-3B/assets/figure1.pngAdded
- checkpoints/YuE2-3B/assets/figure1.svgAdded
- checkpoints/YuE2-3B/assets/logo.pngAdded
- checkpoints/YuE2-3B/config.jsonAdded+38
- checkpoints/YuE2-3B/examples/tonight-awake.jsonAdded+11
- checkpoints/YuE2-3B/generation_config.jsonAdded+11
- checkpoints/YuE2-3B/licenses/SnakeBeta-NVIDIA-MIT.txtAdded+21
- checkpoints/YuE2-3B/licenses/stable-audio-tools-MIT.txtAdded+21
- checkpoints/YuE2-3B/model.safetensorsAdded+3
- checkpoints/YuE2-3B/modeling_yue2.pyAdded+705
- checkpoints/YuE2-3B/qwen.tiktokenAdded
- checkpoints/YuE2-3B/weights_manifest.jsonAdded+9
- checkpoints/YuE2-3B/yue2_generation_config.jsonAdded+24
- checkpoints/YuE2-3B/yue2_infer-0.1.3-py3-none-any.whlAdded
- checkpoints/YuE2-3B/yue2_infer-0.1.5-py3-none-any.whlAdded
617 unmodified lines618619620617 unmodified linescheckpoints/particle-sliders/distilled-rank8-v2/samples/rnb/row1-plain-ar.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/particle-sliders/distilled-rank8-v2/samples/rnb/row1-teacher.flac filter=lfs diff=lfs merge=lfs -textcheckpoints/particle-sliders/distilled-rank8-v2/samples/rnb/row1-teacher.mp3 filter=lfs diff=lfs merge=lfs -text617 unmodified lines618619620621622623624625626627628617 unmodified linescheckpoints/particle-sliders/distilled-rank8-v2/samples/rnb/row1-plain-ar.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/particle-sliders/distilled-rank8-v2/samples/rnb/row1-teacher.flac filter=lfs diff=lfs merge=lfs -textcheckpoints/particle-sliders/distilled-rank8-v2/samples/rnb/row1-teacher.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/YuE2-3B/assets/architecture.png filter=lfs diff=lfs merge=lfs -textcheckpoints/YuE2-3B/assets/audio/auld-lang-syne-jazz-funk-cover.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/YuE2-3B/assets/audio/cyber-metal.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/YuE2-3B/assets/audio/jingle-bells-heavy-metal-cover.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/YuE2-3B/assets/audio/passion.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/YuE2-3B/assets/audio/tonight-awake.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/YuE2-3B/assets/audio/zuixuan-ballad-cover.mp3 filter=lfs diff=lfs merge=lfs -textcheckpoints/YuE2-3B/assets/figure1.png filter=lfs diff=lfs merge=lfs -text
284 unmodified lines285286287288289290284 unmodified linescheckpoints/SheetSage2/tensors_sheetsage2.py 4645 51f72b51ed5a22c751d5adf915198490b1a95ec8959fcf9a38ee71b4444fc8b3 - m-a-p/SheetSage2@b83c3d79 CC BY-NC 4.0checkpoints/SheetSage2/tests/test_spelling.py 7742 9a7888f1b29546bdb1fc8858b1409b724e29984a43f66d6710a4cd49820ee230 - m-a-p/SheetSage2@b83c3d79 CC BY-NC 4.0checkpoints/SheetSage2/tokenization_sheetsage2.py 30043 2ad9f7734e3d9f750fe575f22fd9ec03a9a4ab52497a6314e76f53ed9024fa75 - m-a-p/SheetSage2@b83c3d79 CC BY-NC 4.0checkpoints/YuE2-Vae-legacy/LICENSE 20309 060985741d20e70613b4c189c7de106cabd3fb2109fbbfb6d705c9d619417dd0 - m-a-p/YuE2-Vae-legacy@d0585a9c CC BY-NC 4.0checkpoints/YuE2-Vae-legacy/README.md 10071 4d0c5a22994319889a55a97f9facf81c129904b4b76f4deb705a535a6968dc88 - m-a-p/YuE2-Vae-legacy@d0585a9c CC BY-NC 4.0checkpoints/YuE2-Vae-legacy/THIRD_PARTY_NOTICES.md 793 14d3fd9f6fee86b4260b69b0979735b99ffec8c6b4db254567047a4215cd9af3 - m-a-p/YuE2-Vae-legacy@d0585a9c CC BY-NC 4.0284 unmodified lines285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316284 unmodified linescheckpoints/SheetSage2/tensors_sheetsage2.py 4645 51f72b51ed5a22c751d5adf915198490b1a95ec8959fcf9a38ee71b4444fc8b3 - m-a-p/SheetSage2@b83c3d79 CC BY-NC 4.0checkpoints/SheetSage2/tests/test_spelling.py 7742 9a7888f1b29546bdb1fc8858b1409b724e29984a43f66d6710a4cd49820ee230 - m-a-p/SheetSage2@b83c3d79 CC BY-NC 4.0checkpoints/SheetSage2/tokenization_sheetsage2.py 30043 2ad9f7734e3d9f750fe575f22fd9ec03a9a4ab52497a6314e76f53ed9024fa75 - m-a-p/SheetSage2@b83c3d79 CC BY-NC 4.0checkpoints/YuE2-3B/LICENSE 20309 060985741d20e70613b4c189c7de106cabd3fb2109fbbfb6d705c9d619417dd0 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/THIRD_PARTY_NOTICES.md 793 14d3fd9f6fee86b4260b69b0979735b99ffec8c6b4db254567047a4215cd9af3 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/architecture.png 407643 53345d556ec1762dc7071b76ab0d79518c8cdf52bbf48ad434c3c34926ff74a3 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/audio/auld-lang-syne-jazz-funk-cover.mp3 4559660 2920e32d6723181da2b26b766b11b34c78f162417229f7394a90a06d2db50141 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/audio/cyber-metal.mp3 7215020 997171848c1fbabeece4885877dd4aa62374576042392e0583ba64b038c4af48 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/audio/examples.json 4432 c64d8f79f57781f72b593efd7dbb01cb9b1cebe72ee1fe7fb49d1d6a4dc9e858 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/audio/jingle-bells-heavy-metal-cover.mp3 1657196 44d15f0e04949207f44bbaf07c392012fbae84a1e4d89f44e4b055a0c21fa845 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/audio/passion.mp3 5633900 87fec41a160e430cfde543be76e1da81f7442ff3e0aca09455cf8fea9048cc63 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/audio/tonight-awake.mp3 4885100 54f642933f796e4244f0a308d3d0603c09b4d87f04e0bc42fbcbb9df0bffbcf9 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/audio/zuixuan-ballad-cover.mp3 6838316 fbd0cc2131924fee15c8f5e7519c577f8cd53005302508cc9d959461d31b935f - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/figure1.pdf 31395 58d5f5ce6195e63561bc3fc051e233845581056cf2cebfbdee05bba7cd935cd6 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/figure1.png 172053 0f7e859bfee94eb456a1c38650eb6474568721356349ef490ac4a7e8bc49c68f - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/figure1.svg 144767 bf4f12a2e8178e42461046a6b6294ca52303b55d487b3d07db91bc2e3585d036 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/assets/logo.png 14085 d57837783827061e6e4c6c817468c3e904cce06015a51a95fbd46add27f7af48 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/config.json 959 ad3477bbef890bf98ae196c1e4b44779494a6231c4ab66f32708eabadf265329 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/examples/tonight-awake.json 1734 96087e19caa63beda8a0509afe2f2fe9f8779d300c31bd8947d6504733bd54cf - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/generation_config.json 204 ccc842772f029049fadf9b288393bcdd9f79271b361c0f1875ec1218e4ba5170 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/licenses/SnakeBeta-NVIDIA-MIT.txt 1076 da9858d516047d82096d01c112a61bd67f26d289039464d668a1d45f91738ecc - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/licenses/stable-audio-tools-MIT.txt 1069 a1fac33b7bcd791b74fb33aeb439f825e7277e239fc119fb7d2ab6f084a0c101 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/model.safetensors 7261441640 1d55c42c1a9875c34f5d736e15078449992b044e807ce2a138e6cf289a1e59e9 99841525e8e3d8b37cac98b53d5fb4efb867512ce20f782b6cde2611a8768fb4 m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/modeling_yue2.py 32983 62d2bd758c8fff1a0d64584a699343076fca9a7880db5d8e19263bc30ae79d7c - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/qwen.tiktoken 2561218 b2b1b8dfb5cc5f024bafc373121c6aba3f66f9a5a0269e243470a1de16a33186 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/weights_manifest.json 179 2296f82c29dcb11aeefde07e216403a32fc86c8f6da2ec15a70102abfd936a93 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/yue2_generation_config.json 466 203830cebde6e3644eb291925362990d198e66c3b6006cd11f1aaa21904bcc61 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/yue2_infer-0.1.3-py3-none-any.whl 60853 156d6b8b7e46c3bd23cf22a50d3c20c403e5dc7f4a315582a224a840b01f4f07 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-3B/yue2_infer-0.1.5-py3-none-any.whl 66117 8801e2c0d969db02df78d2994150b4ccd86077d87c24fdb8509b1f6f31462641 - m-a-p/YuE2-3B@8f24312f CC BY-NC 4.0checkpoints/YuE2-Vae-legacy/LICENSE 20309 060985741d20e70613b4c189c7de106cabd3fb2109fbbfb6d705c9d619417dd0 - m-a-p/YuE2-Vae-legacy@d0585a9c CC BY-NC 4.0checkpoints/YuE2-Vae-legacy/README.md 10071 4d0c5a22994319889a55a97f9facf81c129904b4b76f4deb705a535a6968dc88 - m-a-p/YuE2-Vae-legacy@d0585a9c CC BY-NC 4.0checkpoints/YuE2-Vae-legacy/THIRD_PARTY_NOTICES.md 793 14d3fd9f6fee86b4260b69b0979735b99ffec8c6b4db254567047a4215cd9af3 - m-a-p/YuE2-Vae-legacy@d0585a9c CC BY-NC 4.0
76 unmodified lines77787980818276 unmodified lines| `models/eagle3/` | 0.15 GB | an EAGLE-3 draft head for the semantic phase of YuE2-3B (speculative decoding), its card beside it | [engival/YuE2-3B-EAGLE3-draft-GGUF](https://huggingface.co/engival/YuE2-3B-EAGLE3-draft-GGUF) | CC BY-NC 4.0 || `models/reader/resemble-enhance/` | 0.71 GB | the Reader's TTS Voice Upscaler: Resemble Enhance's enhancer (denoise and enhance a speaking voice) | [ResembleAI/resemble-enhance](https://huggingface.co/ResembleAI/resemble-enhance) | MIT || `checkpoints/particle-sliders/` | 2.36 GB | the genre and voice sliders (rank-8 distilled v1 and v2, the particle weights), their card, loader and notes | [ntc-ai/yue2-particle-sliders](https://huggingface.co/ntc-ai/yue2-particle-sliders) | CC BY-NC 4.0; the loader's code MIT (its `LICENSE`, `LOADER_LICENSE`) |**The fine-tunes and the Artist's adapters are here because their authors let them be shared.** On Civitai each of these allows sharing and selling the model itself and its merges; they are credited all the same. Many others the Artist paints with allow running and renting but not sharing the file (Outpaint, Turbo 4 steps, High Resolution, More Real, Cinematic Photography, Flux Pro Style, the FinalCut fine-tune of 2.1 and more): they stay with their authors on Civitai; taken from there into `artwork/loras/` or `artwork/Qwen-Image-2.1/checkpoints/`, the Artist offers them.76 unmodified lines7778798081828376 unmodified lines| `models/eagle3/` | 0.15 GB | an EAGLE-3 draft head for the semantic phase of YuE2-3B (speculative decoding), its card beside it | [engival/YuE2-3B-EAGLE3-draft-GGUF](https://huggingface.co/engival/YuE2-3B-EAGLE3-draft-GGUF) | CC BY-NC 4.0 || `models/reader/resemble-enhance/` | 0.71 GB | the Reader's TTS Voice Upscaler: Resemble Enhance's enhancer (denoise and enhance a speaking voice) | [ResembleAI/resemble-enhance](https://huggingface.co/ResembleAI/resemble-enhance) | MIT || `checkpoints/particle-sliders/` | 2.36 GB | the genre and voice sliders (rank-8 distilled v1 and v2, the particle weights), their card, loader and notes | [ntc-ai/yue2-particle-sliders](https://huggingface.co/ntc-ai/yue2-particle-sliders) | CC BY-NC 4.0; the loader's code MIT (its `LICENSE`, `LOADER_LICENSE`) || `checkpoints/YuE2-3B/` | 7.30 GB | YuE2-3B as m-a-p publishes it (safetensors, its code, card, licences and notices): the engine's GGUFs and the Trainer's single file are made from it | [m-a-p/YuE2-3B](https://huggingface.co/m-a-p/YuE2-3B) | CC BY-NC 4.0 |**The fine-tunes and the Artist's adapters are here because their authors let them be shared.** On Civitai each of these allows sharing and selling the model itself and its merges; they are credited all the same. Many others the Artist paints with allow running and renting but not sharing the file (Outpaint, Turbo 4 steps, High Resolution, More Real, Cinematic Photography, Flux Pro Style, the FinalCut fine-tune of 2.1 and more): they stay with their authors on Civitai; taken from there into `artwork/loras/` or `artwork/Qwen-Image-2.1/checkpoints/`, the Artist offers them.
280 unmodified lines281282283284285286280 unmodified lines51f72b51ed5a22c751d5adf915198490b1a95ec8959fcf9a38ee71b4444fc8b3 checkpoints/SheetSage2/tensors_sheetsage2.py9a7888f1b29546bdb1fc8858b1409b724e29984a43f66d6710a4cd49820ee230 checkpoints/SheetSage2/tests/test_spelling.py2ad9f7734e3d9f750fe575f22fd9ec03a9a4ab52497a6314e76f53ed9024fa75 checkpoints/SheetSage2/tokenization_sheetsage2.py060985741d20e70613b4c189c7de106cabd3fb2109fbbfb6d705c9d619417dd0 checkpoints/YuE2-Vae-legacy/LICENSE4d0c5a22994319889a55a97f9facf81c129904b4b76f4deb705a535a6968dc88 checkpoints/YuE2-Vae-legacy/README.md14d3fd9f6fee86b4260b69b0979735b99ffec8c6b4db254567047a4215cd9af3 checkpoints/YuE2-Vae-legacy/THIRD_PARTY_NOTICES.md280 unmodified lines281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312280 unmodified lines51f72b51ed5a22c751d5adf915198490b1a95ec8959fcf9a38ee71b4444fc8b3 checkpoints/SheetSage2/tensors_sheetsage2.py9a7888f1b29546bdb1fc8858b1409b724e29984a43f66d6710a4cd49820ee230 checkpoints/SheetSage2/tests/test_spelling.py2ad9f7734e3d9f750fe575f22fd9ec03a9a4ab52497a6314e76f53ed9024fa75 checkpoints/SheetSage2/tokenization_sheetsage2.py060985741d20e70613b4c189c7de106cabd3fb2109fbbfb6d705c9d619417dd0 checkpoints/YuE2-3B/LICENSE14d3fd9f6fee86b4260b69b0979735b99ffec8c6b4db254567047a4215cd9af3 checkpoints/YuE2-3B/THIRD_PARTY_NOTICES.md53345d556ec1762dc7071b76ab0d79518c8cdf52bbf48ad434c3c34926ff74a3 checkpoints/YuE2-3B/assets/architecture.png2920e32d6723181da2b26b766b11b34c78f162417229f7394a90a06d2db50141 checkpoints/YuE2-3B/assets/audio/auld-lang-syne-jazz-funk-cover.mp3997171848c1fbabeece4885877dd4aa62374576042392e0583ba64b038c4af48 checkpoints/YuE2-3B/assets/audio/cyber-metal.mp3c64d8f79f57781f72b593efd7dbb01cb9b1cebe72ee1fe7fb49d1d6a4dc9e858 checkpoints/YuE2-3B/assets/audio/examples.json44d15f0e04949207f44bbaf07c392012fbae84a1e4d89f44e4b055a0c21fa845 checkpoints/YuE2-3B/assets/audio/jingle-bells-heavy-metal-cover.mp387fec41a160e430cfde543be76e1da81f7442ff3e0aca09455cf8fea9048cc63 checkpoints/YuE2-3B/assets/audio/passion.mp354f642933f796e4244f0a308d3d0603c09b4d87f04e0bc42fbcbb9df0bffbcf9 checkpoints/YuE2-3B/assets/audio/tonight-awake.mp3fbd0cc2131924fee15c8f5e7519c577f8cd53005302508cc9d959461d31b935f checkpoints/YuE2-3B/assets/audio/zuixuan-ballad-cover.mp358d5f5ce6195e63561bc3fc051e233845581056cf2cebfbdee05bba7cd935cd6 checkpoints/YuE2-3B/assets/figure1.pdf0f7e859bfee94eb456a1c38650eb6474568721356349ef490ac4a7e8bc49c68f checkpoints/YuE2-3B/assets/figure1.pngbf4f12a2e8178e42461046a6b6294ca52303b55d487b3d07db91bc2e3585d036 checkpoints/YuE2-3B/assets/figure1.svgd57837783827061e6e4c6c817468c3e904cce06015a51a95fbd46add27f7af48 checkpoints/YuE2-3B/assets/logo.pngad3477bbef890bf98ae196c1e4b44779494a6231c4ab66f32708eabadf265329 checkpoints/YuE2-3B/config.json96087e19caa63beda8a0509afe2f2fe9f8779d300c31bd8947d6504733bd54cf checkpoints/YuE2-3B/examples/tonight-awake.jsonccc842772f029049fadf9b288393bcdd9f79271b361c0f1875ec1218e4ba5170 checkpoints/YuE2-3B/generation_config.jsonda9858d516047d82096d01c112a61bd67f26d289039464d668a1d45f91738ecc checkpoints/YuE2-3B/licenses/SnakeBeta-NVIDIA-MIT.txta1fac33b7bcd791b74fb33aeb439f825e7277e239fc119fb7d2ab6f084a0c101 checkpoints/YuE2-3B/licenses/stable-audio-tools-MIT.txt1d55c42c1a9875c34f5d736e15078449992b044e807ce2a138e6cf289a1e59e9 checkpoints/YuE2-3B/model.safetensors62d2bd758c8fff1a0d64584a699343076fca9a7880db5d8e19263bc30ae79d7c checkpoints/YuE2-3B/modeling_yue2.pyb2b1b8dfb5cc5f024bafc373121c6aba3f66f9a5a0269e243470a1de16a33186 checkpoints/YuE2-3B/qwen.tiktoken2296f82c29dcb11aeefde07e216403a32fc86c8f6da2ec15a70102abfd936a93 checkpoints/YuE2-3B/weights_manifest.json203830cebde6e3644eb291925362990d198e66c3b6006cd11f1aaa21904bcc61 checkpoints/YuE2-3B/yue2_generation_config.json156d6b8b7e46c3bd23cf22a50d3c20c403e5dc7f4a315582a224a840b01f4f07 checkpoints/YuE2-3B/yue2_infer-0.1.3-py3-none-any.whl8801e2c0d969db02df78d2994150b4ccd86077d87c24fdb8509b1f6f31462641 checkpoints/YuE2-3B/yue2_infer-0.1.5-py3-none-any.whl060985741d20e70613b4c189c7de106cabd3fb2109fbbfb6d705c9d619417dd0 checkpoints/YuE2-Vae-legacy/LICENSE4d0c5a22994319889a55a97f9facf81c129904b4b76f4deb705a535a6968dc88 checkpoints/YuE2-Vae-legacy/README.md14d3fd9f6fee86b4260b69b0979735b99ffec8c6b4db254567047a4215cd9af3 checkpoints/YuE2-Vae-legacy/THIRD_PARTY_NOTICES.md
216 unmodified lines217218219220221222216 unmodified lines- `models/SheetSage2-F32.gguf`- `models/SheetSage2-Q8_0.gguf`## m-a-p/YuE2-3B as GGUF (Serveurperso/YuE2-GGUF)Licence: CC BY-NC 4.0216 unmodified lines217218219220221222223224225226227228229230231232233234235236237238239216 unmodified lines- `models/SheetSage2-F32.gguf`- `models/SheetSage2-Q8_0.gguf`## m-a-p/YuE2-3B (the model as m-a-p publishes it)Licence: CC BY-NC 4.0- `checkpoints/YuE2-3B/LICENSE`- `checkpoints/YuE2-3B/THIRD_PARTY_NOTICES.md`- `checkpoints/YuE2-3B/assets/audio/…`- `checkpoints/YuE2-3B/assets/…`- `checkpoints/YuE2-3B/config.json`- `checkpoints/YuE2-3B/examples/…`- `checkpoints/YuE2-3B/generation_config.json`- `checkpoints/YuE2-3B/licenses/…`- `checkpoints/YuE2-3B/model.safetensors`- `checkpoints/YuE2-3B/modeling_yue2.py`- `checkpoints/YuE2-3B/qwen.tiktoken`- `checkpoints/YuE2-3B/weights_manifest.json`## m-a-p/YuE2-3B as GGUF (Serveurperso/YuE2-GGUF)Licence: CC BY-NC 4.0
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429YuE2 model-weight license
The YuE2-3B, YuE2-Vae and YuE2-Vae-legacy checkpoint weights arelicensed under Creative Commons Attribution-NonCommercial 4.0 International(CC BY-NC 4.0): https://creativecommons.org/licenses/by-nc/4.0/
Scope: the YuE2 checkpoint weights in model.safetensors, or the correspondingmodels/<model-name>/model.safetensors files in the inference kit.For attribution, identify YuE2, the model name and its source repository:https://huggingface.co/m-a-p/YuE2-3Bhttps://huggingface.co/m-a-p/YuE2-Vaehttps://huggingface.co/m-a-p/YuE2-Vae-legacy
This weight license does not replace separately applicable licenses for code,text tokenization files, evaluation assets or other bundled material.Third-party source notices and their original license texts are preserved inTHIRD_PARTY_NOTICES.md and licenses/.
The official license text follows without modification.Source: https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt
Attribution-NonCommercial 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm anddoes not provide legal services or legal advice. Distribution ofCreative Commons public licenses does not create a lawyer-client orother relationship. Creative Commons makes its licenses and relatedinformation available on an "as-is" basis. Creative Commons gives nowarranties regarding its licenses, any material licensed under theirterms and conditions, or any related information. Creative Commonsdisclaims all liability for damages resulting from their use to thefullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms andconditions that creators and other rights holders may use to shareoriginal works of authorship and other material subject to copyrightand certain other rights specified in the public license below. Thefollowing considerations are for informational purposes only, are notexhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public: wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-NonCommercial 4.0 International PublicLicense
By exercising the Licensed Rights (defined below), You accept and agreeto be bound by the terms and conditions of this Creative CommonsAttribution-NonCommercial 4.0 International Public License ("PublicLicense"). To the extent this Public License may be interpreted as acontract, You are granted the Licensed Rights in consideration of Youracceptance of these terms and conditions, and the Licensor grants Yousuch rights in consideration of benefits the Licensor receives frommaking the Licensed Material available under these terms andconditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
i. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
j. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
k. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
l. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
b. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to thefollowing conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
a. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights thatapply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does notreplace Your obligations under this Public License where the LicensedRights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its publiclicenses. Notwithstanding, Creative Commons may elect to apply one ofits public licenses to material it publishes and in those instanceswill be considered the “Licensor.” The text of the Creative Commonspublic licenses is dedicated to the public domain under the CC0 PublicDomain Dedication. Except for the limited purpose of indicating thatmaterial is shared under a Creative Commons public license or asotherwise permitted by the Creative Commons policies published atcreativecommons.org/policies, Creative Commons does not authorize theuse of the trademark "Creative Commons" or any other trademark or logoof Creative Commons without its prior written consent including,without limitation, in connection with any unauthorized modificationsto any of its public licenses or any other arrangements,understandings, or agreements concerning use of licensed material. Forthe avoidance of doubt, this paragraph does not form part of thepublic licenses.
Creative Commons may be contacted at creativecommons.org.
123456789101112131415# Third-party code notices
The Oobleck VAE and SnakeBeta implementation in `modeling_vae.py` is derivedfrom stable-audio-tools commit `a6ae0cdf8b2eb1567a4b42ceadddec3712d99d45`.The module hierarchy, weight normalization and activation equations preservethe checkpoint's original inference implementation.
- Oobleck / stable-audio-tools: Copyright (c) 2023 Stability AI, MIT. Full text: `licenses/stable-audio-tools-MIT.txt`.- SnakeBeta / BigVGAN: Copyright (c) 2022 NVIDIA CORPORATION, MIT. Full text: `licenses/SnakeBeta-NVIDIA-MIT.txt`.
These notices cover the identified source code and retain its original licenses.The YuE2 model checkpoint weights are separately licensed under CC BY-NC 4.0;see LICENSE for the scope and full terms. This does not relicense third-party code.123version https://git-lfs.github.com/spec/v1oid sha256:2920e32d6723181da2b26b766b11b34c78f162417229f7394a90a06d2db50141size 4559660123version https://git-lfs.github.com/spec/v1oid sha256:997171848c1fbabeece4885877dd4aa62374576042392e0583ba64b038c4af48size 7215020123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111{ "schema": 1, "description": "YuE2 listening examples: original songs and cover songs.", "examples": [ { "id": "cyber-metal", "title": "Cyber Metal", "title_source": "Genre Explorer display title (genre label).", "language": "en", "label": "English", "task": "text-to-music", "model": "YuE2 (earlier checkpoint)", "source": "https://map-yue2.github.io/", "source_id": "b82e55c7d22f58b5d89399bc", "source_collection": "Selected Genre Explorer demos", "vae": "m-a-p/YuE2-Vae", "symbolic_planning": true, "seed": 8984, "style": "At 148 BPM, the synthwave-trap fusion kicks in with thick analog bass, neon pads, thumping 808s, and sharp gated snares. Verses blend electric guitar, rapid hi-hats, and bubbling synths. Choruses burst with double-time trap beats, soaring retro synth leads, lush riffs, cinematic strings, swirling arps, water FX, and fluid transitions beneath dynamic vocals. Breakdowns spotlight vintage strings, wavesynth layers, double-kicks, deep sub-bass, and overdriven guitar, evoking a liquid-wave vibe. Trap DJ drops, pulsing melodic guitar, and remix-ready edits inject extra retro-modern punch.", "file": "cyber-metal.mp3", "sample_rate": 48000, "channels": 2, "duration_seconds": 300.6, "display_duration": "5:00", "bytes": 7215020, "sha256": "997171848c1fbabeece4885877dd4aa62374576042392e0583ba64b038c4af48" }, { "id": "tonight-awake", "title": "今晚不眠", "title_source": "Display title taken from the chorus; the demo page labels the track Nu-Disco.", "language": "zh", "label": "Mandarin funk / nu-disco", "model": "YuE2 (earlier checkpoint)", "source": "https://map-yue2.github.io/", "source_id": "383f774d73b0099f1b207c82", "source_collection": "Liked Genre Explorer demos", "vae": "m-a-p/YuE2-Vae", "cot": "full", "seed": 12300, "style": "City Pop, upbeat, danceable, groovy bass, electric guitar, synth, energetic, joyful, neon city night", "file": "tonight-awake.mp3", "sample_rate": 48000, "channels": 2, "duration_seconds": 203.52, "display_duration": "3:24", "bytes": 4885100, "sha256": "54f642933f796e4244f0a308d3d0603c09b4d87f04e0bc42fbcbb9df0bffbcf9" }, { "id": "passion", "title": "Passion", "language": "en", "label": "English rock", "model": "m-a-p/YuE2-3B", "vae": "m-a-p/YuE2-Vae", "cot": "full", "seed": 831054, "style": "Energetic modern rock with emotional vocals, big guitars, cinematic drums, and a powerful chorus. Anthemic and passionate mood with dynamic build and heavy rhythm.", "file": "passion.mp3", "sample_rate": 48000, "channels": 2, "duration_seconds": 234.72, "display_duration": "3:55", "bytes": 5633900, "sha256": "87fec41a160e430cfde543be76e1da81f7442ff3e0aca09455cf8fea9048cc63" }, { "id": "auld-lang-syne-jazz-funk-cover", "title": "Auld Lang Syne", "label": "Jazz-funk cover", "task": "cover-generation", "source": "User-provided audio", "file": "auld-lang-syne-jazz-funk-cover.mp3", "sample_rate": 48000, "channels": 2, "duration_seconds": 189.96, "display_duration": "3:10", "bytes": 4559660, "sha256": "2920e32d6723181da2b26b766b11b34c78f162417229f7394a90a06d2db50141" }, { "id": "zuixuan-ballad-cover", "title": "最炫民族风", "label": "Ballad cover", "task": "cover-generation", "source": "User-provided audio", "file": "zuixuan-ballad-cover.mp3", "sample_rate": 48000, "channels": 2, "duration_seconds": 284.904, "display_duration": "4:45", "bytes": 6838316, "sha256": "fbd0cc2131924fee15c8f5e7519c577f8cd53005302508cc9d959461d31b935f" }, { "id": "jingle-bells-heavy-metal-cover", "title": "Jingle Bells", "label": "Heavy metal cover", "task": "cover-generation", "source": "User-provided audio", "file": "jingle-bells-heavy-metal-cover.mp3", "sample_rate": 48000, "channels": 2, "duration_seconds": 69.024, "display_duration": "1:09", "bytes": 1657196, "sha256": "44d15f0e04949207f44bbaf07c392012fbae84a1e4d89f44e4b055a0c21fa845" } ]}123version https://git-lfs.github.com/spec/v1oid sha256:44d15f0e04949207f44bbaf07c392012fbae84a1e4d89f44e4b055a0c21fa845size 1657196123version https://git-lfs.github.com/spec/v1oid sha256:87fec41a160e430cfde543be76e1da81f7442ff3e0aca09455cf8fea9048cc63size 5633900123version https://git-lfs.github.com/spec/v1oid sha256:54f642933f796e4244f0a308d3d0603c09b4d87f04e0bc42fbcbb9df0bffbcf9size 4885100123version https://git-lfs.github.com/spec/v1oid sha256:fbd0cc2131924fee15c8f5e7519c577f8cd53005302508cc9d959461d31b935fsize 68383161234567891011121314151617181920212223242526272829303132333435363738{ "return_dict": true, "output_hidden_states": false, "torchscript": false, "dtype": "bfloat16", "tie_word_embeddings": false, "is_encoder_decoder": false, "is_decoder": false, "add_cross_attention": false, "architectures": [ "YuE2ForCausalLM" ], "bos_token_id": null, "pad_token_id": null, "eos_token_id": null, "decoder_start_token_id": null, "transformers_version": "4.57.6", "auto_map": { "AutoConfig": "modeling_yue2.YuE2Config", "AutoModelForCausalLM": "modeling_yue2.YuE2ForCausalLM" }, "model_type": "yue2", "hidden_size": 2048, "num_hidden_layers": 28, "num_attention_heads": 16, "num_key_value_heads": 8, "head_dim": 128, "intermediate_size": 6144, "vocab_size": 184704, "rms_norm_eps": 1e-06, "rope_theta": 1000000, "max_position_embeddings": 24576, "latent_type": "vae", "latent_dim": 64, "max_latent_frames": 24576, "timestep_shift": 1.0, "output_attentions": false}1234567891011{ "title": "今晚不眠", "style": "City Pop, upbeat, danceable, groovy bass, electric guitar, synth, energetic, joyful, neon city night", "lyrics": "[Intro]\n\n[Verse]\n路灯眨着眼睛 偷看谁的身影\n街道哼着小调 节奏多轻盈\n晚风染成霓虹 吹乱发际线\n脚步踩着鼓点 不需要终点\n\n[Pre-Chorus]\n旋转的唱片 划破了寂静\n气泡在上升 快乐在飞行\n把烦恼抛去 别再去在意\n这里的空气 充满了魔力\n\n[Chorus]\n今晚不眠 快乐无限\n城市在狂欢 我们在中间\n自由摇摆 光芒盛开\n跟着这节拍 把心打开\n\n今晚不眠 快乐无限\n城市在狂欢 我们在中间\n自由摇摆 光芒盛开\n跟着这节拍 把心打开\n\n[Interlude]\n\n[Pre-Chorus]\n旋转的唱片 划破了寂静\n气泡在上升 快乐在飞行\n把烦恼抛去 别再去在意\n这里的空气 充满了魔力\n\n[Chorus]\n今晚不眠 快乐无限\n城市在狂欢 我们在中间\n自由摇摆 光芒盛开\n跟着这节拍 把心打开\n\n今晚不眠 快乐无限\n城市在狂欢 我们在中间\n自由摇摆 光芒盛开\n跟着这节拍 把心打开\n\n[Bridge]\n像橘子汽水 充满了微醺的甜\n像流星划过 点亮了夜的天\n不需要理由 只要你感觉\n这一刻就是 永恒的瞬间\n\n[Chorus]\n今晚不眠 快乐无限\n城市在狂欢 我们在中间\n自由摇摆 光芒盛开\n跟着这节拍 把心打开\n\n今晚不眠 快乐无限\n城市在狂欢 我们在中间\n自由摇摆 光芒盛开\n跟着这节拍 把心打开\n\n[Outro]\n霓虹色的风 吹向那梦\n摇摆\n闪耀\nYeah", "cot": "full", "seed": 12300, "source": { "url": "https://map-yue2.github.io/", "case_id": "383f774d73b0099f1b207c82" }}1234567891011{ "bos_token_id": 151643, "eos_token_id": 151852, "pad_token_id": 151643, "do_sample": true, "temperature": 1.0, "top_p": 0.95, "top_k": 100, "max_new_tokens": 9000, "use_cache": true}123456789101112131415161718192021MIT License
Copyright (c) 2022 NVIDIA CORPORATION.
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021MIT License
Copyright (c) 2023 Stability AI
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123version https://git-lfs.github.com/spec/v1oid sha256:1d55c42c1a9875c34f5d736e15078449992b044e807ce2a138e6cf289a1e59e9size 7261441640123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705"""YuE2 AR–NAR Mixture-of-Transformers, with checkpoint-compatible names.
This module is self contained for Transformers ``trust_remote_code`` loading.It imports no CUDA extension and implements the released model architecture.``generate`` returns token IDs; the package pipeline supplies song generation."""from __future__ import annotations
import mathfrom typing import List, Optional, Tuple, Union
import torchimport torch.nn as nnimport torch.nn.functional as Ffrom transformers import GenerationMixin, PretrainedConfig, PreTrainedModelfrom transformers.cache_utils import DynamicCachefrom transformers.modeling_outputs import CausalLMOutputWithPast
def sdpa(query, key, value, *, attn_mask=None, is_causal=False): """Use native grouped-query attention, including a portable MPS fallback.""" grouped = query.shape[1] != key.shape[1] if grouped and query.device.type == "mps": # PyTorch's MPS attention does not implement enable_gqa on every release. groups = query.shape[1] // key.shape[1] key = key.repeat_interleave(groups, dim=1) value = value.repeat_interleave(groups, dim=1) grouped = False return F.scaled_dot_product_attention( query, key, value, attn_mask=attn_mask, is_causal=is_causal, enable_gqa=grouped, )
def _causal_mask(attention_mask, cache_position, key_length, batch_size): """Physical cache slots are causal; RoPE positions may exclude padding.""" device = cache_position.device visible = torch.arange(key_length, device=device)[None, :] <= cache_position[:, None] visible = visible[None, None].expand(batch_size, 1, -1, -1) if attention_mask is None: return visible mask = attention_mask.to(device=device) if mask.ndim == 2: if mask.shape[0] != batch_size or mask.shape[1] > key_length: raise ValueError("attention_mask must cover the batch and used cache slots") # Static cache has unused capacity after the supplied 2D padding mask. if mask.shape[1] < key_length: mask = F.pad(mask, (0, key_length - mask.shape[1]), value=0) return visible & mask[:, None, None, :].bool() if mask.ndim != 4 or mask.shape[-2:] != visible.shape[-2:]: raise ValueError("Expected a 2D padding mask or a matching 4D attention mask") if mask.dtype == torch.bool: return visible & mask return mask.masked_fill(~visible, float("-inf"))
# ══════════════════════════════════════════════════════════════════════════════# Config# ══════════════════════════════════════════════════════════════════════════════
class YuE2Config(PretrainedConfig): model_type = "yue2"
_hf_fields = frozenset({ "model_type", "architectures", "auto_map", "transformers_version", "dtype", "torch_dtype", "return_dict", "output_hidden_states", "output_attentions", "use_cache", "tie_word_embeddings", "torchscript", "is_decoder", "is_encoder_decoder", "add_cross_attention", "bos_token_id", "eos_token_id", "pad_token_id", "decoder_start_token_id", "attn_implementation", })
def to_dict(self): return {key: value for key, value in super().to_dict().items() if key in self._hf_fields or key in self._inference_fields}
_inference_fields = frozenset(['hidden_size', 'num_hidden_layers', 'num_attention_heads', 'num_key_value_heads', 'head_dim', 'intermediate_size', 'vocab_size', 'rms_norm_eps', 'rope_theta', 'max_position_embeddings', 'tie_word_embeddings', 'latent_type', 'latent_dim', 'max_latent_frames', 'timestep_shift'])
def __init__( self, hidden_size: int = 2048, num_hidden_layers: int = 28, num_attention_heads: int = 16, num_key_value_heads: int = 8, head_dim: int = 128, intermediate_size: int = 6144, vocab_size: int = 184704, rms_norm_eps: float = 1e-6, rope_theta: float = 1000000.0, max_position_embeddings: int = 24576, tie_word_embeddings: bool = False, # Acoustic inference architecture latent_type: str = "vae", latent_dim: int = 64, max_latent_frames: int = 24576, timestep_shift: float = 1.0, **kwargs, ): if latent_type != "vae": raise ValueError("YuE2 inference supports only latent_type='vae'") # Serialize only the documented model and Transformers configuration. kwargs = {key: value for key, value in kwargs.items() if key in self._hf_fields} super().__init__(tie_word_embeddings=tie_word_embeddings, **kwargs) self.hidden_size = hidden_size self.num_hidden_layers = num_hidden_layers self.num_attention_heads = num_attention_heads self.num_key_value_heads = num_key_value_heads self.head_dim = head_dim self.intermediate_size = intermediate_size self.vocab_size = vocab_size self.rms_norm_eps = rms_norm_eps self.rope_theta = rope_theta self.max_position_embeddings = max_position_embeddings self.latent_type = latent_type self.latent_dim = latent_dim self.max_latent_frames = max_latent_frames self.timestep_shift = timestep_shift
# ══════════════════════════════════════════════════════════════════════════════# Building blocks# ══════════════════════════════════════════════════════════════════════════════
class RMSNorm(nn.Module): def __init__(self, dim: int, eps: float = 1e-6): super().__init__() self.weight = nn.Parameter(torch.ones(dim)) self.eps = eps
def forward(self, x: torch.Tensor) -> torch.Tensor: return x * torch.rsqrt(x.float().pow(2).mean(-1, keepdim=True) + self.eps).to(x.dtype) * self.weight
class RotaryEmbedding(nn.Module): def __init__(self, head_dim: int, base: float = 1000000.0): super().__init__() self.head_dim = head_dim self.base = base self._inv_freq: Optional[torch.Tensor] = None
def forward(self, position_ids: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: if self._inv_freq is None or self._inv_freq.device != position_ids.device: self._inv_freq = 1.0 / (self.base ** ( torch.arange(0, self.head_dim, 2, dtype=torch.float32, device=position_ids.device) / self.head_dim )) pos = position_ids.float().unsqueeze(-1) angles = pos * self._inv_freq return angles.cos(), angles.sin()
def _apply_rotary(x: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor) -> torch.Tensor: half = x.shape[-1] // 2 x1, x2 = x[..., :half], x[..., half:] cos, sin = cos.to(x.dtype), sin.to(x.dtype) return torch.cat([x1 * cos - x2 * sin, x2 * cos + x1 * sin], dim=-1)
class Attention(nn.Module): def __init__(self, config: YuE2Config): super().__init__() self.num_heads = config.num_attention_heads self.num_kv_heads = config.num_key_value_heads self.head_dim = config.head_dim self.num_kv_groups = self.num_heads // self.num_kv_heads
self.q_proj = nn.Linear(config.hidden_size, self.num_heads * self.head_dim, bias=False) self.k_proj = nn.Linear(config.hidden_size, self.num_kv_heads * self.head_dim, bias=False) self.v_proj = nn.Linear(config.hidden_size, self.num_kv_heads * self.head_dim, bias=False) self.o_proj = nn.Linear(self.num_heads * self.head_dim, config.hidden_size, bias=False) self.q_norm = RMSNorm(self.head_dim, config.rms_norm_eps) self.k_norm = RMSNorm(self.head_dim, config.rms_norm_eps)
def project_qkv( self, x: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor, ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: """Project, normalize, and apply RoPE. No SDPA, no KV cache, no O proj.
Returns Q [B,T,num_heads,hd], K [B,T,num_kv_heads,hd], V [B,T,num_kv_heads,hd]. """ B, T, _ = x.shape q = self.q_proj(x).view(B, T, self.num_heads, self.head_dim) k = self.k_proj(x).view(B, T, self.num_kv_heads, self.head_dim) v = self.v_proj(x).view(B, T, self.num_kv_heads, self.head_dim) q, k = self.q_norm(q), self.k_norm(k) rc, rs = cos.unsqueeze(2), sin.unsqueeze(2) q = _apply_rotary(q, rc, rs) k = _apply_rotary(k, rc, rs) return q, k, v
def forward( self, x: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor, past_key_value: Optional[DynamicCache] = None, layer_idx: int = 0, attention_mask: Optional[torch.Tensor] = None, cache_position: Optional[torch.Tensor] = None, ) -> torch.Tensor: B, T, _ = x.shape q, k, v = self.project_qkv(x, cos, sin)
q, k, v = q.transpose(1, 2), k.transpose(1, 2), v.transpose(1, 2)
if past_key_value is not None: k, v = past_key_value.update(k, v, layer_idx, {"cache_position": cache_position})
if attention_mask is not None: out = sdpa(q, k, v, attn_mask=attention_mask[..., :k.shape[2]]) else: out = sdpa(q, k, v, is_causal=(T > 1 and k.shape[2] == T)) return self.o_proj(out.transpose(1, 2).reshape(B, T, -1))
class MLP(nn.Module): def __init__(self, config: YuE2Config): super().__init__() self.gate_proj = nn.Linear(config.hidden_size, config.intermediate_size, bias=False) self.up_proj = nn.Linear(config.hidden_size, config.intermediate_size, bias=False) self.down_proj = nn.Linear(config.intermediate_size, config.hidden_size, bias=False)
def forward(self, x: torch.Tensor) -> torch.Tensor: return self.down_proj(F.silu(self.gate_proj(x)) * self.up_proj(x))
class DecoderLayer(nn.Module): """Transformer layer with full MoT: dual attention projections + dual MLP."""
def __init__(self, config: YuE2Config): super().__init__() # AR attention path self.input_layernorm = RMSNorm(config.hidden_size, config.rms_norm_eps) self.self_attn = Attention(config) # NAR attention path (separate Q/K/V/O + layernorms) self.nar_input_layernorm = RMSNorm(config.hidden_size, config.rms_norm_eps) self.nar_self_attn = Attention(config) # AR MLP path self.post_attention_layernorm = RMSNorm(config.hidden_size, config.rms_norm_eps) self.mlp = MLP(config) # NAR MLP path self.nar_pre_mlp_layernorm = RMSNorm(config.hidden_size, config.rms_norm_eps) self.nar_mlp = MLP(config)
def forward( self, x: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor, past_key_value: Optional[DynamicCache] = None, layer_idx: int = 0, attention_mask: Optional[torch.Tensor] = None, ar_mask: Optional[torch.Tensor] = None, cache_position: Optional[torch.Tensor] = None, ) -> torch.Tensor: if ar_mask is not None: mask_3d = ar_mask.unsqueeze(-1) # [B, S, 1] mask_4d = ar_mask.unsqueeze(-1).unsqueeze(-1) # [B, S, 1, 1]
# Per-type input layernorm ln_ar = self.input_layernorm(x) ln_nar = self.nar_input_layernorm(x)
# Per-type QKV projection (both process all tokens) q_ar, k_ar, v_ar = self.self_attn.project_qkv(ln_ar, cos, sin) q_nar, k_nar, v_nar = self.nar_self_attn.project_qkv(ln_nar, cos, sin)
# Merge Q/K/V per-position: AR positions use AR projections, NAR use NAR query = torch.where(mask_4d, q_ar, q_nar) # [B, S, num_heads, hd] # K/V have num_kv_heads (fewer), same mask broadcast works key = torch.where(mask_4d, k_ar, k_nar) # [B, S, num_kv_heads, hd] value = torch.where(mask_4d, v_ar, v_nar)
# Transpose to [B, H, S, D] for SDPA B, S = x.shape[:2] query = query.transpose(1, 2) key = key.transpose(1, 2) value = value.transpose(1, 2)
# Shared attention with hybrid mask if attention_mask is not None and attention_mask.dtype != torch.bool: attention_mask = attention_mask.to(query.dtype) core_out = sdpa(query, key, value, attn_mask=attention_mask) core_out = core_out.transpose(1, 2).reshape(B, S, -1)
# Per-type O projection, merge by mask o_ar = self.self_attn.o_proj(core_out) o_nar = self.nar_self_attn.o_proj(core_out) h = torch.where(mask_3d, o_ar, o_nar) x = x + h
# Per-type MLP ar_out = self.mlp(self.post_attention_layernorm(x)) nar_out = self.nar_mlp(self.nar_pre_mlp_layernorm(x)) mlp_out = torch.where(mask_3d, ar_out, nar_out) else: # AR-only mode (generation): use AR path only h = self.self_attn(self.input_layernorm(x), cos, sin, past_key_value, layer_idx, attention_mask, cache_position) x = x + h mlp_out = self.mlp(self.post_attention_layernorm(x))
x = x + mlp_out return x
# ══════════════════════════════════════════════════════════════════════════════# NAR auxiliary modules# ══════════════════════════════════════════════════════════════════════════════
class TimestepEmbedder(nn.Module): """Sinusoidal timestep → MLP → hidden_size (same as modules.py)."""
def __init__(self, hidden_size: int, frequency_embedding_size: int = 256): super().__init__() self.mlp = nn.Sequential( nn.Linear(frequency_embedding_size, hidden_size), nn.SiLU(), nn.Linear(hidden_size, hidden_size), ) self.frequency_embedding_size = frequency_embedding_size
def forward(self, t): half = self.frequency_embedding_size // 2 freqs = torch.exp( -math.log(10000) * torch.arange(half, device=t.device, dtype=torch.float32) / half ) args = t.float().unsqueeze(-1) * freqs.unsqueeze(0) emb = torch.cat([torch.cos(args), torch.sin(args)], dim=-1) return self.mlp(emb.to(next(self.parameters()).dtype))
class AudioPositionEmbedding(nn.Module): """Non-learnable 1D sinusoidal PE for audio latent frames."""
def __init__(self, max_frames: int, hidden_size: int): super().__init__() pe = torch.zeros(max_frames, hidden_size) position = torch.arange(0, max_frames, dtype=torch.float32).unsqueeze(1) div_term = torch.exp( torch.arange(0, hidden_size, 2, dtype=torch.float32) * (-math.log(10000.0) / hidden_size) ) pe[:, 0::2] = torch.sin(position * div_term) pe[:, 1::2] = torch.cos(position * div_term) self.register_buffer("pe", pe)
def forward(self, position_ids): return self.pe[position_ids]
# ══════════════════════════════════════════════════════════════════════════════# Static KV Cache# ══════════════════════════════════════════════════════════════════════════════
class StaticKVCache: """Bounded, append-only cache for the explicit single-request AR loop.
Returns views of the used prefix and never reallocates/copies its history. Standard HF ``generate`` also supports Transformers' own StaticCache. """
def __init__( self, num_layers: int, batch_size: int, num_kv_heads: int, max_seq_len: int, head_dim: int, dtype: torch.dtype, device: torch.device, ): self.num_layers = num_layers self.max_seq_len = max_seq_len self._seen_tokens = 0 self.key_cache: List[torch.Tensor] = [ torch.zeros(batch_size, num_kv_heads, max_seq_len, head_dim, dtype=dtype, device=device) for _ in range(num_layers) ] self.value_cache: List[torch.Tensor] = [ torch.zeros(batch_size, num_kv_heads, max_seq_len, head_dim, dtype=dtype, device=device) for _ in range(num_layers) ]
def get_seq_length(self, layer_idx=0) -> int: return self._seen_tokens
def update(self, key_states, value_states, layer_idx, cache_kwargs=None): T = key_states.shape[2] pos = self._seen_tokens end = pos + T if end > self.max_seq_len: raise ValueError(f"KV cache capacity {self.max_seq_len} exceeded by {end}; generation was not shortened") self.key_cache[layer_idx][:, :, pos:end] = key_states self.value_cache[layer_idx][:, :, pos:end] = value_states if layer_idx == self.num_layers - 1: self._seen_tokens = end return self.key_cache[layer_idx][:, :, :end], self.value_cache[layer_idx][:, :, :end]
def reset(self): self._seen_tokens = 0
def reorder_cache(self, beam_idx): self.key_cache = [v.index_select(0, beam_idx.to(v.device)) for v in self.key_cache] self.value_cache = [v.index_select(0, beam_idx.to(v.device)) for v in self.value_cache]
# ══════════════════════════════════════════════════════════════════════════════# Model# ══════════════════════════════════════════════════════════════════════════════
class Backbone(nn.Module): """Transformer backbone with MoT dual MLP."""
def __init__(self, config: YuE2Config): super().__init__() self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size) self.layers = nn.ModuleList([DecoderLayer(config) for _ in range(config.num_hidden_layers)]) self.norm = RMSNorm(config.hidden_size, config.rms_norm_eps) self.rotary_emb = RotaryEmbedding(config.head_dim, config.rope_theta)
def forward( self, input_ids: Optional[torch.LongTensor] = None, position_ids: Optional[torch.LongTensor] = None, past_key_values=None, use_cache: bool = True, attention_mask: Optional[torch.Tensor] = None, ar_mask: Optional[torch.Tensor] = None, inputs_embeds: Optional[torch.Tensor] = None, cache_position: Optional[torch.Tensor] = None, ) -> Tuple[torch.Tensor, ...]: if inputs_embeds is not None: x = inputs_embeds else: x = self.embed_tokens(input_ids) cos, sin = self.rotary_emb(position_ids)
if use_cache and past_key_values is None: past_key_values = DynamicCache()
for i, layer in enumerate(self.layers): x = layer(x, cos, sin, past_key_values if use_cache else None, layer_idx=i, attention_mask=attention_mask, ar_mask=ar_mask, cache_position=cache_position)
return self.norm(x), past_key_values
class YuE2PreTrainedModel(PreTrainedModel): config_class = YuE2Config base_model_prefix = "model" supports_gradient_checkpointing = True _no_split_modules = ["DecoderLayer"] _supports_sdpa = True
def _init_weights(self, module): if isinstance(module, nn.Linear): nn.init.normal_(module.weight, std=0.01) if module.bias is not None: nn.init.zeros_(module.bias) elif isinstance(module, nn.Embedding): nn.init.normal_(module.weight, std=0.01)
class YuE2ForCausalLM(YuE2PreTrainedModel, GenerationMixin): """YuE2 model: AR causal LM (generate) + NAR flow matching (ODE)."""
def __init__(self, config: YuE2Config): super().__init__(config) self.model = Backbone(config) self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
# NAR auxiliary self.llm2vae = nn.Linear(config.hidden_size, config.latent_dim) self.vae2llm = nn.Linear(config.latent_dim, config.hidden_size) self.time_embedder = TimestepEmbedder(config.hidden_size) self.latent_pos_embed = AudioPositionEmbedding(config.max_latent_frames, config.hidden_size)
self.post_init()
def get_input_embeddings(self): return self.model.embed_tokens
def set_input_embeddings(self, value): self.model.embed_tokens = value
def get_output_embeddings(self): return self.lm_head
def set_output_embeddings(self, new_embeddings): self.lm_head = new_embeddings
# ── AR forward (standard causal LM, KV cached) ───────────────────
def forward( self, input_ids: Optional[torch.LongTensor] = None, attention_mask: Optional[torch.Tensor] = None, position_ids: Optional[torch.LongTensor] = None, past_key_values=None, inputs_embeds: Optional[torch.FloatTensor] = None, labels: Optional[torch.LongTensor] = None, use_cache: Optional[bool] = None, cache_position: Optional[torch.LongTensor] = None, logits_to_keep: Union[int, torch.Tensor] = 0, return_dict: Optional[bool] = None, **kwargs, ) -> Union[Tuple, CausalLMOutputWithPast]: if (input_ids is None) == (inputs_embeds is None): raise ValueError("Supply exactly one of input_ids or inputs_embeds") use_cache = use_cache if use_cache is not None else getattr(self.config, "use_cache", True) return_dict = return_dict if return_dict is not None else self.config.use_return_dict tensor = input_ids if input_ids is not None else inputs_embeds batch_size, seq_len = tensor.shape[:2] if not seq_len: raise ValueError("Input must contain at least one token") device = tensor.device past_len = past_key_values.get_seq_length() if past_key_values is not None and use_cache else 0 if cache_position is None: cache_position = torch.arange(past_len, past_len + seq_len, device=device) else: cache_position = cache_position.to(device=device, dtype=torch.long) if cache_position.ndim != 1 or cache_position.numel() != seq_len: raise ValueError("cache_position must identify each current token's physical cache slot") if position_ids is None: if attention_mask is not None and attention_mask.ndim == 2: position_ids = attention_mask.long().cumsum(-1) - 1 position_ids.masked_fill_(attention_mask == 0, 0) position_ids = position_ids[:, -seq_len:].to(device) else: position_ids = cache_position[None] else: position_ids = position_ids.to(device=device, dtype=torch.long) if position_ids.shape[-1] != seq_len: raise ValueError("position_ids must cover the current input tokens")
key_length = past_len + seq_len if use_cache and past_key_values is not None and hasattr(past_key_values, "get_max_cache_shape"): capacity = past_key_values.get_max_cache_shape() if capacity is not None and capacity > 0: key_length = capacity # No explicit mask is needed for unpadded prefill or single-token dynamic # decode. Chunked prefill needs bottom-right causal alignment; a full # static cache additionally needs to hide all unfilled slots. needs_mask = attention_mask is not None or key_length != past_len + seq_len or (past_len > 0 and seq_len > 1) causal_mask = _causal_mask(attention_mask, cache_position, key_length, batch_size) if needs_mask else None hidden_states, past_key_values = self.model( input_ids=input_ids, position_ids=position_ids, past_key_values=past_key_values, use_cache=use_cache, attention_mask=causal_mask, inputs_embeds=inputs_embeds, cache_position=cache_position, )
if isinstance(logits_to_keep, int): if logits_to_keep < 0: raise ValueError("logits_to_keep must be nonnegative") selected = hidden_states[:, -logits_to_keep:, :] if logits_to_keep else hidden_states else: selected = hidden_states[:, logits_to_keep.to(device), :] if labels is not None and selected.shape[1] != hidden_states.shape[1]: raise ValueError("Loss computation requires logits_to_keep=0") logits = self.lm_head(selected)
loss = None if labels is not None: shift_logits = logits[..., :-1, :].contiguous() shift_labels = labels[..., 1:].contiguous() loss = F.cross_entropy(shift_logits.view(-1, shift_logits.size(-1)), shift_labels.view(-1))
if not return_dict: output = (logits, past_key_values) if use_cache else (logits,) return ((loss,) + output) if loss is not None else output return CausalLMOutputWithPast(loss=loss, logits=logits, past_key_values=past_key_values if use_cache else None)
def prepare_inputs_for_generation( self, input_ids, past_key_values=None, attention_mask=None, inputs_embeds=None, cache_position=None, position_ids=None, **kwargs, ): """Keep physical cache slots separate from padding-aware RoPE positions.""" past_len = past_key_values.get_seq_length() if past_key_values is not None else 0 if cache_position is None: total = inputs_embeds.shape[1] if inputs_embeds is not None and past_len == 0 else input_ids.shape[1] count = max(total - past_len, 1) if past_len else total cache_position = torch.arange(past_len, past_len + count, device=input_ids.device) count = cache_position.numel() use_embeds = inputs_embeds is not None and past_len == 0 if use_embeds: current_ids, current_embeds = None, inputs_embeds[:, -count:] else: current_ids, current_embeds = input_ids[:, -count:].contiguous(), None if position_ids is None and attention_mask is not None and attention_mask.ndim == 2: position_ids = attention_mask.long().cumsum(-1) - 1 position_ids.masked_fill_(attention_mask == 0, 0) if position_ids is not None: position_ids = position_ids[:, -count:].contiguous() return { "input_ids": current_ids, "inputs_embeds": current_embeds, "past_key_values": past_key_values, "attention_mask": attention_mask, "position_ids": position_ids, "cache_position": cache_position, "use_cache": kwargs.get("use_cache", True), "logits_to_keep": kwargs.get("logits_to_keep", 1), }
# ── NAR velocity (flow matching, no KV cache) ────────────────────
def _shift_t_value(self, t_value: float, device: torch.device, dtype: torch.dtype) -> torch.Tensor: t_sig = torch.sigmoid(torch.tensor(t_value, dtype=dtype, device=device)) shift = self.config.timestep_shift return shift * t_sig / (1 + (shift - 1) * t_sig)
@torch.no_grad() def nar_velocity( self, tokens: torch.LongTensor, ar_mask: torch.BoolTensor, nar_mask: torch.BoolTensor, nar_content_mask: torch.BoolTensor, x_t: torch.Tensor, t_value: float, nar_cond_end: int = 0, ) -> torch.Tensor: """Compute v_theta(x_t, t) — flow-matching velocity field.
Args: tokens: [1, S] full sequence (AR + NAR tokens) ar_mask: [1, S] True for AR positions nar_mask: [1, S] True for NAR positions nar_content_mask: [1, S] True for actual latent positions (not LATENT_START/END) x_t: [T_lat, D] current ODE state t_value: raw timestep (will be sigmoid-shifted) nar_cond_end: if > 0, NAR only sees positions < nar_cond_end (text-only mode) Returns: v_pred: [T_lat, D] predicted velocity """ device = tokens.device dtype = next(self.parameters()).dtype B, S = tokens.shape
# 1. Token embeddings token_emb = self.model.embed_tokens(tokens) # [B, S, H]
# 2. Build latent hidden for ALL NAR positions (START + content + END) # Training injects vae2llm(x_t) + time_emb + pos_emb at ALL NAR positions, # including LATENT_START (clean=0) and LATENT_END (clean=0). # NAR position IDs via cumsum: START=0, content=[1..T_lat], END=T_lat+1. t_shifted = self._shift_t_value(t_value, device, dtype) T_lat = x_t.shape[0]
nar_indices = nar_mask[0].nonzero(as_tuple=True)[0] # all NAR positions content_indices = nar_content_mask[0].nonzero(as_tuple=True)[0] N_nar = nar_indices.shape[0] # START + T_lat + END
# Build x_t for all NAR positions: zeros for START/END, actual x_t for content x_nar = torch.zeros(N_nar, x_t.shape[1], device=device, dtype=dtype) x_nar[1:1 + T_lat] = x_t.to(dtype) # content frames at positions [1, T_lat]
latent_hidden_nar = self.vae2llm(x_nar.unsqueeze(0)) # [1, N_nar, H]
# Timestep embedding (same t for all NAR positions) time_emb = self.time_embedder(t_shifted.expand(N_nar)).unsqueeze(0) latent_hidden_nar = latent_hidden_nar + time_emb
# Position embedding: cumsum-style [0, 1, 2, ..., N_nar-1] pos_ids = torch.arange(N_nar, device=device).clamp(max=self.config.max_latent_frames - 1) pos_emb = self.latent_pos_embed(pos_ids).unsqueeze(0) latent_hidden_nar = latent_hidden_nar + pos_emb
# Inject at ALL NAR positions (matching training's torch.where) token_emb[0, nar_indices] = latent_hidden_nar[0]
# 3. Build hybrid attention mask [B, 1, S, S] # AR→AR: causal, NAR→AR: full, NAR→NAR: bidirectional, AR→NAR: blocked ar_q = ar_mask.unsqueeze(2).float() # [B, S, 1] ar_k = ar_mask.unsqueeze(1).float() # [B, 1, S] nar_q = nar_mask.unsqueeze(2).float() nar_k = nar_mask.unsqueeze(1).float() causal = torch.tril(torch.ones(S, S, device=device))
if nar_cond_end > 0: # Codec dropout: NAR only sees positions < nar_cond_end (text) + NAR text_k = torch.zeros(1, 1, S, device=device) text_k[0, 0, :nar_cond_end] = 1.0 mask = (ar_q * ar_k * causal) + (nar_q * text_k) + (nar_q * nar_k) else: mask = (ar_q * ar_k * causal) + (nar_q * ar_k) + (nar_q * nar_k) # Convert to additive: 0 → attend, -inf → block attn_mask = mask.unsqueeze(1) # [B, 1, S, S] attn_mask = attn_mask.masked_fill(attn_mask == 0, float("-inf")).masked_fill(attn_mask > 0, 0.0)
# 4. Position IDs + RoPE position_ids = torch.arange(S, device=device).unsqueeze(0)
# 5. Forward through decoder (with MoT routing) ar_mask_bt = ar_mask # [B, S] bool for MoT routing hidden_states, _ = self.model( inputs_embeds=token_emb, position_ids=position_ids, use_cache=False, attention_mask=attn_mask, ar_mask=ar_mask_bt, )
# 6. NAR head at content positions nar_pred = self.llm2vae(hidden_states) # [B, S, D] v_pred = nar_pred[0, content_indices] # [T_lat, D] return v_pred
# Keep custom code + auto_map when a local user calls save_pretrained as well# as when the release builder creates a Hub repository.YuE2Config.register_for_auto_class()YuE2ForCausalLM.register_for_auto_class("AutoModelForCausalLM")123456789{ "schema": 1, "files": { "model.safetensors": { "bytes": 7261441640, "sha256": "1d55c42c1a9875c34f5d736e15078449992b044e807ce2a138e6cf289a1e59e9" } }}123456789101112131415161718192021222324{ "abc": { "temperature": 0.7, "top_p": 0.9, "top_k": 30, "repetition_penalty": 1.005, "penalty_window": 100, "min_tokens": 32, "max_tokens": 4096 }, "semantic": { "temperature": 1.0, "top_p": 0.95, "top_k": 100, "repetition_penalty": 1.2, "penalty_window": 50, "min_tokens": 200, "max_tokens": 9000 }, "ode_steps": 32, "ode_method": "midpoint", "context": 24576, "version": "yue2-native-v1"}.gitattributes+8
MANIFEST.tsv+26
README.md+1
SHA256SUMS+26
THIRD_PARTY_NOTICES.md+17
checkpoints/YuE2-3B/LICENSEAdded+429
checkpoints/YuE2-3B/THIRD_PARTY_NOTICES.mdAdded+15
checkpoints/YuE2-3B/assets/architecture.pngAdded

Large File Pointer Details
- SHA256: 53345d556ec1762dc7071b76ab0d79518c8cdf52bbf48ad434c3c34926ff74a3
- Pointer size: 131 Bytes
- Size of remote file: 408 kB
checkpoints/YuE2-3B/assets/audio/auld-lang-syne-jazz-funk-cover.mp3Added+3
checkpoints/YuE2-3B/assets/audio/cyber-metal.mp3Added+3
checkpoints/YuE2-3B/assets/audio/examples.jsonAdded+111
checkpoints/YuE2-3B/assets/audio/jingle-bells-heavy-metal-cover.mp3Added+3
checkpoints/YuE2-3B/assets/audio/passion.mp3Added+3
checkpoints/YuE2-3B/assets/audio/tonight-awake.mp3Added+3
checkpoints/YuE2-3B/assets/audio/zuixuan-ballad-cover.mp3Added+3
checkpoints/YuE2-3B/assets/figure1.pdfAdded
checkpoints/YuE2-3B/assets/figure1.pngAdded

Large File Pointer Details
- SHA256: 0f7e859bfee94eb456a1c38650eb6474568721356349ef490ac4a7e8bc49c68f
- Pointer size: 131 Bytes
- Size of remote file: 172 kB
checkpoints/YuE2-3B/assets/figure1.svgAdded
checkpoints/YuE2-3B/assets/logo.pngAdded

checkpoints/YuE2-3B/config.jsonAdded+38
checkpoints/YuE2-3B/examples/tonight-awake.jsonAdded+11
checkpoints/YuE2-3B/generation_config.jsonAdded+11
checkpoints/YuE2-3B/licenses/SnakeBeta-NVIDIA-MIT.txtAdded+21
checkpoints/YuE2-3B/licenses/stable-audio-tools-MIT.txtAdded+21
checkpoints/YuE2-3B/model.safetensorsAdded+3
checkpoints/YuE2-3B/modeling_yue2.pyAdded+705
checkpoints/YuE2-3B/qwen.tiktokenAdded
checkpoints/YuE2-3B/weights_manifest.jsonAdded+9
checkpoints/YuE2-3B/yue2_generation_config.jsonAdded+24
checkpoints/YuE2-3B/yue2_infer-0.1.3-py3-none-any.whlAdded
checkpoints/YuE2-3B/yue2_infer-0.1.5-py3-none-any.whlAdded