Joshuant commited on
Commit
c532aa8
·
verified ·
1 Parent(s): c6f03f9

docs: works on modern transformers now; soften version note

Browse files
Files changed (1) hide show
  1. README.md +10 -10
README.md CHANGED
@@ -37,19 +37,19 @@ A LoRA fine-tune of [**MOSS-TTS-Nano**](https://huggingface.co/OpenMOSS-Team/MOS
37
 
38
  The voice became the target Indian-English speaker **without** a reference clip, with intelligibility unchanged.
39
 
40
- ## ⚠️ Requirements — version pin matters
41
- This model uses MOSS-TTS-Nano's **custom modeling code (`trust_remote_code`)**, which targets a
42
- specific Transformers version. On **newer Transformers** you will see errors such as
43
- `TypeError: unsupported operand type(s) for |: 'list' and 'set'` and/or `MISSING ..._lm_head.weight`
44
- (the LM heads are *tied* weights restored on load — a version mismatch breaks the tying). Pin:
45
 
46
  ```bash
47
- # GPU (Blackwell/most NVIDIA): CUDA 12.8 wheels
48
- pip install torch==2.7.0 torchaudio==2.7.0 --index-url https://download.pytorch.org/whl/cu128
49
- # REQUIRED pinned versions (same as MOSS-TTS-Nano upstream)
50
- pip install "transformers==4.57.1" soundfile sentencepiece numpy huggingface_hub
51
- # CPU-only: pip install torch==2.7.0 torchaudio==2.7.0 (default index)
52
  ```
 
 
 
53
 
54
  ## Usage
55
  ```python
 
37
 
38
  The voice became the target Indian-English speaker **without** a reference clip, with intelligibility unchanged.
39
 
40
+ ## Requirements
41
+ This repo's custom modeling code includes a **cross-version compatibility fix**, so it loads on
42
+ both `transformers==4.57.1` and **modern Transformers (tested 5.12.1)** the older
43
+ `TypeError: unsupported operand type(s) for |: 'list' and 'set'` is resolved. Install:
 
44
 
45
  ```bash
46
+ pip install transformers torch torchaudio soundfile sentencepiece numpy huggingface_hub
47
+ # GPU (Blackwell/most NVIDIA), if needed:
48
+ # pip install torch==2.7.0 torchaudio==2.7.0 --index-url https://download.pytorch.org/whl/cu128
 
 
49
  ```
50
+ `torchaudio` is required (the modeling code imports it). The `MISSING ..._lm_head.weight` line in
51
+ the load log is **cosmetic** — those heads are *tied* weights, rebound to the embeddings on load.
52
+ For exact parity with the training environment you may still pin `transformers==4.57.1`.
53
 
54
  ## Usage
55
  ```python