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
Update README.md
Browse files
README.md
CHANGED
|
@@ -345,13 +345,9 @@ response = tokenizer.decode(response[0][inputs["input_ids"].shape[1]:], skip_spe
|
|
| 345 |
print(response)
|
| 346 |
```
|
| 347 |
|
| 348 |
-
## Intended Uses
|
| 349 |
-
These models are trained for research purposes. They are designed to solve general math problems. They can be used in educational software, tutoring systems, or any application where a solution to a math problem is needed. The models can generate both a chain of thought (CoT) rationale and a program of thought (PoT) rationale, providing a comprehensive solution to a given math problem.
|
| 350 |
-
|
| 351 |
-
|
| 352 |
## Limitations
|
| 353 |
-
|
| 354 |
-
|
| 355 |
|
| 356 |
## Citation
|
| 357 |
If you find our work helpful, feel free to give us a cite.
|
|
|
|
| 345 |
print(response)
|
| 346 |
```
|
| 347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
## Limitations
|
| 349 |
+
The current iteration of ChatMusician predominantly generates music in the style of Irish music, attributable to a significant portion of the dataset being sourced from this genre.
|
| 350 |
+
The model exhibits hallucinations and faces limitations in supporting open-ended music generation tasks due to the lack of diversity in handcrafted music instructions.
|
| 351 |
|
| 352 |
## Citation
|
| 353 |
If you find our work helpful, feel free to give us a cite.
|