AEmotionStudio commited on
Commit
b13b860
·
verified ·
1 Parent(s): 04a6a93

Add NotaGen-X safetensors mirror (MIT, from ElectricAlexis/NotaGen)

Browse files
Files changed (3) hide show
  1. README.md +69 -0
  2. config.json +17 -0
  3. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: pytorch
4
+ tags:
5
+ - music-generation
6
+ - symbolic-music
7
+ - abc-notation
8
+ - classical
9
+ - transformer
10
+ pipeline_tag: text-to-audio
11
+ ---
12
+
13
+ # NotaGen-X — MAESTRO Mirror
14
+
15
+ Safetensors mirror of the NotaGen-X model weights, used by
16
+ [MAESTRO](https://github.com/AEmotionStudio) for the AI-Workstation "Create →
17
+ NotaGen" model card.
18
+
19
+ This repository ships **only the model weights** (no optimizer state) in the
20
+ [safetensors](https://github.com/huggingface/safetensors) format, so they load
21
+ into MAESTRO without arbitrary-code execution risk. The original upstream
22
+ checkpoints from `ElectricAlexis/NotaGen` are PyTorch `.pth` files bundling
23
+ optimizer state, epoch counters, etc.
24
+
25
+ ## Files
26
+
27
+ | File | Purpose |
28
+ | --- | --- |
29
+ | `model.safetensors` | NotaGen-X model state dict (516 M params, fp32, ~1.92 GB) |
30
+ | `config.json` | Architecture hyperparameters consumed by NotaGen's loader |
31
+ | `README.md` | This file |
32
+
33
+ ## Provenance
34
+
35
+ * Upstream:
36
+ [`ElectricAlexis/NotaGen`](https://huggingface.co/ElectricAlexis/NotaGen)
37
+ · file `weights_notagenx_p_size_16_p_length_1024_p_layers_20_h_size_1280.pth`
38
+ * Conversion: `torch.load(...)['model']` → contiguous CPU tensors →
39
+ `safetensors.torch.save_file(...)`. Round-trip verified (zero mismatches over
40
+ all 323 tensors).
41
+ * Training metadata preserved in safetensors header
42
+ (`epoch`, `best_epoch`, `min_eval_loss`).
43
+
44
+ ## Architecture
45
+
46
+ Hierarchical Tunesformer (GPT-2 backbone) generating ABC notation:
47
+
48
+ * `p_size = 16` (patch size)
49
+ * `p_length = 1024` (patch sequence length)
50
+ * `p_layers = 20` (patch-level decoder layers)
51
+ * `c_layers = 6` (character-level decoder layers)
52
+ * `h_size = 1280` (hidden size)
53
+
54
+ ## Loading
55
+
56
+ ```python
57
+ from safetensors.torch import load_file
58
+ state = load_file("model.safetensors")
59
+ # Pass to NotaGen's model class — same key layout as the upstream `.pth`'s
60
+ # `["model"]` sub-dict.
61
+ ```
62
+
63
+ MAESTRO's loader (`backend/ai/models/notagen.py`) handles this automatically and,
64
+ if the upstream NotaGen inference script demands a `.pth` on disk, materialises
65
+ one alongside the safetensors on first load.
66
+
67
+ ## License
68
+
69
+ MIT, inherited from upstream NotaGen.
config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "notagen",
3
+ "variant": "notagen-x",
4
+ "patch_size": 16,
5
+ "patch_length": 1024,
6
+ "patch_layers": 20,
7
+ "char_layers": 6,
8
+ "hidden_size": 1280,
9
+ "framework": "pytorch",
10
+ "format": "safetensors",
11
+ "param_count": 515902720,
12
+ "dtype": "float32",
13
+ "source": {
14
+ "repo": "ElectricAlexis/NotaGen",
15
+ "file": "weights_notagenx_p_size_16_p_length_1024_p_layers_20_h_size_1280.pth"
16
+ }
17
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d531d3ec4d191e3448db2315e0d4bfaee222310818a8a71d681984416d33a7b
3
+ size 2063649720