distilgpt2 abc irish music generation
Overview
Highlights
- Generates music using lightweight, text-based ABC notation
- Optimized for traditional Irish folk melody structures
- Low latency inference via distilled GPT-2 architecture
- Easy integration with MIDI and sheet music converters
- Permissive Apache-2.0 license for commercial deployment
Usage
# Install Hugging Face transformers
pip install transformers torch
# Load model with transformers
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("ehcalabres/distilgpt2-abc-irish-music-generation")
tokenizer = AutoTokenizer.from_pretrained("ehcalabres/distilgpt2-abc-irish-music-generation")
Hugging Face Download
We recommend downloading the model via the Hugging Face CLI or Hub SDK.
Guidance:Before downloading, install huggingface_hub with:
pip install -U huggingface_hub
CLI Download
Download the full repository
huggingface-cli download ehcalabres/distilgpt2-abc-irish-music-generation
Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download ehcalabres/distilgpt2-abc-irish-music-generation config.json --local-dir ./dir
See the official docs for more CLI options
SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('ehcalabres/distilgpt2-abc-irish-music-generation')
Git Download
Make sure git-lfs is installed first
git lfs install
git clone https://huggingface.co/ehcalabres/distilgpt2-abc-irish-music-generation
To skip LFS large-file downloads, use:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/ehcalabres/distilgpt2-abc-irish-music-generation
Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.
PyTorch / Transformers Usage
Install Transformers
pip install -U transformers torch
Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('ehcalabres/distilgpt2-abc-irish-music-generation')
tokenizer = AutoTokenizer.from_pretrained('ehcalabres/distilgpt2-abc-irish-music-generation')
Full Documentation
---
license: apache-2.0
tags:
- generated_from_trainer
base_model: distilgpt2
model-index:
- name: distilgpt2-abc-irish-music-generation
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
distilgpt2-abc-irish-music-generation
This model is a fine-tuned version of distilgpt2 on an unknown dataset.
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 10
Training results
Framework versions
- Transformers 4.19.2
- Pytorch 1.11.0+cu113
- Datasets 2.2.2
- Tokenizers 0.12.1