Instructions to use microsoft/rho-math-7b-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/rho-math-7b-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="microsoft/rho-math-7b-v0.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/rho-math-7b-v0.1") model = AutoModelForCausalLM.from_pretrained("microsoft/rho-math-7b-v0.1") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use microsoft/rho-math-7b-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "microsoft/rho-math-7b-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/rho-math-7b-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/microsoft/rho-math-7b-v0.1
- SGLang
How to use microsoft/rho-math-7b-v0.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 "microsoft/rho-math-7b-v0.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": "microsoft/rho-math-7b-v0.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 "microsoft/rho-math-7b-v0.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": "microsoft/rho-math-7b-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use microsoft/rho-math-7b-v0.1 with Docker Model Runner:
docker model run hf.co/microsoft/rho-math-7b-v0.1
Update README.md
Browse files
README.md
CHANGED
|
@@ -18,9 +18,7 @@ Rho-1: Not All Tokens Are What You Need
|
|
| 18 |
<a href="https://arxiv.org/abs/2404.07965"><b>[π Arxiv]</b></a> β’
|
| 19 |
<a href="https://huggingface.co/papers/2404.07965"><b>[π¬ HF Paper]</b></a> β’
|
| 20 |
<a href="https://huggingface.co/microsoft/rho-math-1b-v0.1"><b>[π€ Models]</b></a> β’
|
| 21 |
-
<a href="https://github.com/microsoft/rho"><b>[π± GitHub]</b></a>
|
| 22 |
-
<a href="https://twitter.com/zebgou/status/1778676535404396697"><b>[π¦ Twitter]</b></a> β’
|
| 23 |
-
<a href="https://huggingface.co/spaces/zubingou/rho-1"><b>[π€ Gradio Demo]</b></a>
|
| 24 |
</p>
|
| 25 |
|
| 26 |
<p align="center">
|
|
@@ -32,7 +30,6 @@ Rho-1: Not All Tokens Are What You Need
|
|
| 32 |
|
| 33 |
## π₯ News
|
| 34 |
|
| 35 |
-
- [2024/04/14] πππ We release [Gradio demo of Rho-1 Code Interpreter](https://huggingface.co/spaces/zubingou/rho-1), try it out!
|
| 36 |
- [2024/04/12] π₯π₯π₯ Rho-Math-v0.1 models released at π€ HuggingFace!
|
| 37 |
- [Rho-Math-1B](https://huggingface.co/microsoft/rho-math-1b-v0.1) and [Rho-Math-7B](https://huggingface.co/microsoft/rho-math-7b-v0.1) achieve 15.6% and 31.0% few-shot accuracy on MATH dataset, respectively β matching DeepSeekMath with only 3\% of the pretraining tokens.
|
| 38 |
- [Rho-Math-1B-Interpreter](https://huggingface.co/microsoft/rho-math-1b-interpreter-v0.1) is the first 1B LLM that achieves over 40% accuracy on MATH.
|
|
|
|
| 18 |
<a href="https://arxiv.org/abs/2404.07965"><b>[π Arxiv]</b></a> β’
|
| 19 |
<a href="https://huggingface.co/papers/2404.07965"><b>[π¬ HF Paper]</b></a> β’
|
| 20 |
<a href="https://huggingface.co/microsoft/rho-math-1b-v0.1"><b>[π€ Models]</b></a> β’
|
| 21 |
+
<a href="https://github.com/microsoft/rho"><b>[π± GitHub]</b></a>
|
|
|
|
|
|
|
| 22 |
</p>
|
| 23 |
|
| 24 |
<p align="center">
|
|
|
|
| 30 |
|
| 31 |
## π₯ News
|
| 32 |
|
|
|
|
| 33 |
- [2024/04/12] π₯π₯π₯ Rho-Math-v0.1 models released at π€ HuggingFace!
|
| 34 |
- [Rho-Math-1B](https://huggingface.co/microsoft/rho-math-1b-v0.1) and [Rho-Math-7B](https://huggingface.co/microsoft/rho-math-7b-v0.1) achieve 15.6% and 31.0% few-shot accuracy on MATH dataset, respectively β matching DeepSeekMath with only 3\% of the pretraining tokens.
|
| 35 |
- [Rho-Math-1B-Interpreter](https://huggingface.co/microsoft/rho-math-1b-interpreter-v0.1) is the first 1B LLM that achieves over 40% accuracy on MATH.
|