Instructions to use m-a-p/ChatMusician-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use m-a-p/ChatMusician-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="m-a-p/ChatMusician-Base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("m-a-p/ChatMusician-Base") model = AutoModelForCausalLM.from_pretrained("m-a-p/ChatMusician-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use m-a-p/ChatMusician-Base 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-Base" # 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-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/m-a-p/ChatMusician-Base
- SGLang
How to use m-a-p/ChatMusician-Base 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-Base" \ --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-Base", "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-Base" \ --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-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use m-a-p/ChatMusician-Base with Docker Model Runner:
docker model run hf.co/m-a-p/ChatMusician-Base
Commit History
-
Update README.md
Verified signature49ca840
-
Upload tokenizer
Verified signaturec8be162
-
Update README.md
Verified signature664a334
-
Update README.md
Verified signature8994243 -
Upload chatmusician_demo.png
Verified signatureb9d47bc -
Update README.md
Verified signature8087657 -
Update README.md
Verified signaturedc08d7b -
Upload MusicTheoryBench_result_plt.png
Verified signature1e0c343 -
Delete MusicTheoryBench_result_plt.png
Verified signature04d5a23 -
Upload MusicTheoryBench_result_plt.png
Verified signature9c31035 -
Delete MusicTheoryBench_result_plt.png
Verified signature83620c8 -
Update README.md
Verified signature00a76ac
-
Update README.md
Verified signaturea4bd5fb -
Upload MusicTheoryBench_result_plt.png
Verified signature1c4d391 -
Update README.md
Verified signaturefbba3d8 -
Update README.md
Verified signature8556c6e -
Update README.md
Verified signature0cc3f19 -
Upload LlamaForCausalLM
Verified signatureefa1309 -
initial commit
Verified signature87bf235