Instructions to use m-a-p/ChatMusician with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use m-a-p/ChatMusician with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="m-a-p/ChatMusician")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("m-a-p/ChatMusician") model = AutoModelForCausalLM.from_pretrained("m-a-p/ChatMusician") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use m-a-p/ChatMusician with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "m-a-p/ChatMusician" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "m-a-p/ChatMusician", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/m-a-p/ChatMusician
- SGLang
How to use m-a-p/ChatMusician 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 "m-a-p/ChatMusician" \ --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": "m-a-p/ChatMusician", "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 "m-a-p/ChatMusician" \ --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": "m-a-p/ChatMusician", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use m-a-p/ChatMusician with Docker Model Runner:
docker model run hf.co/m-a-p/ChatMusician
Commit History
Update README.md 0d4fc77 verified
Update README.md b8c2c2e verified
Update README.md e143cea verified
Update README.md 5cd92a8 verified
Upload MusicTheoryBench_result_plt.png d9a159b verified
Update README.md 90be659 verified
Update README.md a8b376d verified
Delete pytorch_model-00003-of-00003.bin f958638 verified
Delete pytorch_model-00002-of-00003.bin a75675f verified
Delete pytorch_model-00001-of-00003.bin 44ca663 verified
Upload LlamaForCausalLM c7f58d2 verified
Upload LlamaForCausalLM 355f76c
Upload tokenizer 21779ce
initial commit 1a90ff5
Hanfeng Lin commited on