Instructions to use Felita/midi_nGram_model_1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Felita/midi_nGram_model_1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Felita/midi_nGram_model_1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Felita/midi_nGram_model_1") model = AutoModelForCausalLM.from_pretrained("Felita/midi_nGram_model_1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Felita/midi_nGram_model_1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Felita/midi_nGram_model_1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Felita/midi_nGram_model_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Felita/midi_nGram_model_1
- SGLang
How to use Felita/midi_nGram_model_1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Felita/midi_nGram_model_1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Felita/midi_nGram_model_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Felita/midi_nGram_model_1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Felita/midi_nGram_model_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Felita/midi_nGram_model_1 with Docker Model Runner:
docker model run hf.co/Felita/midi_nGram_model_1
midi_nGram_model_1
This model is a fine-tuned version of gpt2 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.4755
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: 0.0005
- train_batch_size: 4
- eval_batch_size: 2
- seed: 1
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.01
- num_epochs: 10
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.6287 | 0.3319 | 300 | 0.6577 |
| 0.6573 | 0.6637 | 600 | 0.6499 |
| 0.6555 | 0.9956 | 900 | 0.6492 |
| 0.6367 | 1.3274 | 1200 | 0.6387 |
| 0.6376 | 1.6593 | 1500 | 0.6290 |
| 0.6321 | 1.9912 | 1800 | 0.6259 |
| 0.6125 | 2.3230 | 2100 | 0.6171 |
| 0.6129 | 2.6549 | 2400 | 0.6081 |
| 0.6055 | 2.9867 | 2700 | 0.5928 |
| 0.5802 | 3.3186 | 3000 | 0.5890 |
| 0.5831 | 3.6504 | 3300 | 0.5779 |
| 0.5735 | 3.9823 | 3600 | 0.5668 |
| 0.5448 | 4.3142 | 3900 | 0.5566 |
| 0.5443 | 4.6460 | 4200 | 0.5482 |
| 0.5357 | 4.9779 | 4500 | 0.5364 |
| 0.5068 | 5.3097 | 4800 | 0.5340 |
| 0.5028 | 5.6416 | 5100 | 0.5210 |
| 0.497 | 5.9735 | 5400 | 0.5125 |
| 0.4683 | 6.3053 | 5700 | 0.5069 |
| 0.4657 | 6.6372 | 6000 | 0.4984 |
| 0.4589 | 6.9690 | 6300 | 0.4911 |
| 0.4336 | 7.3009 | 6600 | 0.4904 |
| 0.4319 | 7.6327 | 6900 | 0.4849 |
| 0.4274 | 7.9646 | 7200 | 0.4802 |
| 0.4106 | 8.2965 | 7500 | 0.4808 |
| 0.4093 | 8.6283 | 7800 | 0.4775 |
| 0.4059 | 8.9602 | 8100 | 0.4760 |
| 0.3974 | 9.2920 | 8400 | 0.4755 |
| 0.3969 | 9.6239 | 8700 | 0.4756 |
| 0.3928 | 9.9558 | 9000 | 0.4755 |
Framework versions
- Transformers 4.46.3
- Pytorch 2.5.1+cu121
- Datasets 3.2.0
- Tokenizers 0.20.3
- Downloads last month
- 14
Model tree for Felita/midi_nGram_model_1
Base model
openai-community/gpt2