File size: 2,149 Bytes
b13b860
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
license: mit
library_name: pytorch
tags:
  - music-generation
  - symbolic-music
  - abc-notation
  - classical
  - transformer
pipeline_tag: text-to-audio
---

# NotaGen-X — MAESTRO Mirror

Safetensors mirror of the NotaGen-X model weights, used by
[MAESTRO](https://github.com/AEmotionStudio) for the AI-Workstation "Create →
NotaGen" model card.

This repository ships **only the model weights** (no optimizer state) in the
[safetensors](https://github.com/huggingface/safetensors) format, so they load
into MAESTRO without arbitrary-code execution risk. The original upstream
checkpoints from `ElectricAlexis/NotaGen` are PyTorch `.pth` files bundling
optimizer state, epoch counters, etc.

## Files

| File | Purpose |
| --- | --- |
| `model.safetensors` | NotaGen-X model state dict (516 M params, fp32, ~1.92 GB) |
| `config.json` | Architecture hyperparameters consumed by NotaGen's loader |
| `README.md` | This file |

## Provenance

* Upstream:
  [`ElectricAlexis/NotaGen`](https://huggingface.co/ElectricAlexis/NotaGen)
  · file `weights_notagenx_p_size_16_p_length_1024_p_layers_20_h_size_1280.pth`
* Conversion: `torch.load(...)['model']` → contiguous CPU tensors →
  `safetensors.torch.save_file(...)`. Round-trip verified (zero mismatches over
  all 323 tensors).
* Training metadata preserved in safetensors header
  (`epoch`, `best_epoch`, `min_eval_loss`).

## Architecture

Hierarchical Tunesformer (GPT-2 backbone) generating ABC notation:

* `p_size = 16`  (patch size)
* `p_length = 1024`  (patch sequence length)
* `p_layers = 20`  (patch-level decoder layers)
* `c_layers = 6`   (character-level decoder layers)
* `h_size = 1280`  (hidden size)

## Loading

```python
from safetensors.torch import load_file
state = load_file("model.safetensors")
# Pass to NotaGen's model class — same key layout as the upstream `.pth`'s
# `["model"]` sub-dict.
```

MAESTRO's loader (`backend/ai/models/notagen.py`) handles this automatically and,
if the upstream NotaGen inference script demands a `.pth` on disk, materialises
one alongside the safetensors on first load.

## License

MIT, inherited from upstream NotaGen.