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
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,7 +8,7 @@ pipeline_tag: text-generation
|
|
| 8 |
---
|
| 9 |
# πΌ ChatMusician: Fostering Intrinsic Musical Abilities Into LLM
|
| 10 |
|
| 11 |
-
[**π DemoPage**](https://ezmonyi.github.io/ChatMusician/) | [**π€ Dataset**](https://huggingface.co/datasets/m-a-p/MusicPile) | [**π€ Benchmark**](https://huggingface.co/datasets/m-a-p/MusicTheoryBench) | [**π arXiv**](http://arxiv.org/abs/2402.16153) | [**Code**](https://github.com/hf-lin/ChatMusician)
|
| 12 |
|
| 13 |
## πNews
|
| 14 |
- **π₯[2023-12-10]: The release of ChatMusician's demo, code, model, data, and benchmark. π**
|
|
|
|
| 8 |
---
|
| 9 |
# πΌ ChatMusician: Fostering Intrinsic Musical Abilities Into LLM
|
| 10 |
|
| 11 |
+
[**π DemoPage**](https://ezmonyi.github.io/ChatMusician/) | [**π€ Dataset**](https://huggingface.co/datasets/m-a-p/MusicPile) | [**π€ Benchmark**](https://huggingface.co/datasets/m-a-p/MusicTheoryBench) | [**π arXiv**](http://arxiv.org/abs/2402.16153) | [**Code**](https://github.com/hf-lin/ChatMusician) | [**Model**](https://huggingface.co/m-a-p/ChatMusician)
|
| 12 |
|
| 13 |
## πNews
|
| 14 |
- **π₯[2023-12-10]: The release of ChatMusician's demo, code, model, data, and benchmark. π**
|