Views
No views yet
| Spec | Value |
|---|---|
| Architecture | Patch-level GPT (16 layers) + Char-level GPT (3 layers) |
| Hidden size | 1024 |
| Total parameters | ~231M |
| Patch size | 16 chars |
| Max patches per sequence | 1024 |
| Vocab | 128 (ASCII) |
| Base model | ElectricAlexis/NotaGen (medium pretrained) |
data/dataset.jsonl of the GitHub repo.WeightedRandomSampler.1import torch
2from safetensors.torch import load_file
3from transformers import GPT2Config
4# (Add NotaGen's `finetune/` to PYTHONPATH; see github.com/anjieliu/guzheng)
5from utils import Patchilizer, NotaGenLMHeadModel
6
7state = load_file("model.safetensors")
8patch_cfg = GPT2Config(num_hidden_layers=16, max_length=1024,
9 max_position_embeddings=1024, n_embd=1024,
10 num_attention_heads=16, vocab_size=1)
11char_cfg = GPT2Config(num_hidden_layers=3, max_length=17,
12 max_position_embeddings=17, hidden_size=1024,
13 num_attention_heads=16, vocab_size=128)
14model = NotaGenLMHeadModel(encoder_config=patch_cfg, decoder_config=char_cfg)
15model.load_state_dict(state)
16model.eval()notagen/generate.py is a working entry point).K:C M:4/4 L:1/32 metadata; the model has not seen other meters or unit notes.