feat[cv2-3]: Prune the CosyVoice2 LLM (24 -> 12 Qwen2 layers)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Goal
Iteration 3 of SPADE-on-CosyVoice2: prune the 24-layer Qwen2 LLM to 12 layers by state-dict key remapping (reusing spade/adapters/hf.py), with a pruned checkpoint that the CosyVoice2 loader can consume after shrinking the Qwen2 stack.
Acceptance
-
spade_cosyvoice2/prune_llm.pyprunesllm.pt(24 -> target) viaremap_layer_keysand saves a loadable checkpoint + retained-indices json -
load_cosyvoice2_with_llmloads the pruned checkpoint into a shrunken Qwen2 and synthesizes speech (verified on the official checkpoint) - Unit tests cover layer counting, key remapping, default retention, and checkpoint roundtrip
Notes
Iteration 3 for: SPADE applied to CosyVoice 2 (arXiv:2509.20802)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with spade_cosyvoice2/prune_llm.py and the remap_layer_keys helper in spade/adapters/hf.py. Trace how load_cosyvoice2_with_llm constructs the Qwen2 stack and run the existing tests, if available, before adding coverage for layer counting, default retention, key remapping, and checkpoint roundtrip. Done means a 24-to-12 checkpoint and retained-indices JSON are produced, loaded by a shrunken Qwen2, and verified to synthesize speech with the official checkpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100