ml-inory / ml-inory/SPADE

feat[cv2-3]: Prune the CosyVoice2 LLM (24 -> 12 Qwen2 layers)

Open
#8 1 comment 0 reactions 0 assignees View on GitHub

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.py prunes llm.pt (24 -> target) via remap_layer_keys and saves a loadable checkpoint + retained-indices json
  • load_cosyvoice2_with_llm loads 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.