Instructions to use WizardLMTeam/WizardMath-7B-V1.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WizardLMTeam/WizardMath-7B-V1.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WizardLMTeam/WizardMath-7B-V1.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WizardLMTeam/WizardMath-7B-V1.1") model = AutoModelForCausalLM.from_pretrained("WizardLMTeam/WizardMath-7B-V1.1") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use WizardLMTeam/WizardMath-7B-V1.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WizardLMTeam/WizardMath-7B-V1.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WizardLMTeam/WizardMath-7B-V1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WizardLMTeam/WizardMath-7B-V1.1
- SGLang
How to use WizardLMTeam/WizardMath-7B-V1.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 "WizardLMTeam/WizardMath-7B-V1.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": "WizardLMTeam/WizardMath-7B-V1.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 "WizardLMTeam/WizardMath-7B-V1.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": "WizardLMTeam/WizardMath-7B-V1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WizardLMTeam/WizardMath-7B-V1.1 with Docker Model Runner:
docker model run hf.co/WizardLMTeam/WizardMath-7B-V1.1
Limitation: could not solve the frog jumping from well problem
Although the answer is wrong, WizardMath tries to solve it step by step which is impressive.
You > There is a well with a depth of 10 meters. A frog is at the bottom of the well. The frog can jump up 5 meters each time, but due to the slippery wall, it will slide down 3 meters after each jump. How many times does the frog need to jump to get out of the well?
A.I. > 1. The frog is at the bottom of the well, which is 10 meters deep.
2. The frog jumps up 5 meters, but due to the slippery wall, it slides down 3 meters.
3. After the first jump, the frog is now at a height of (10 - 5 + 3) = 8 meters.
4. The frog needs to jump again to reach the top of the well.
5. The frog jumps up 5 meters, but again slides down 3 meters.
6. After the second jump, the frog is now at a height of (8 - 5 + 3) = 6 meters.
7. The frog needs to jump again to reach the top of the well.
8. The frog jumps up 5 meters, but slides down 3 meters.
9. After the third jump, the frog is now at a height of (6 - 5 + 3) = 4 meters.
10. The frog needs to jump again to reach the top of the well.
11. The frog jumps up 5 meters, but slides down 3 meters.
12. After the fourth jump, the frog is now at a height of (4 - 5 + 3) = 2 meters.
13. The frog needs to jump again to reach the top of the well.
14. The frog jumps up 5 meters, but slides down 3 meters.
15. After the fifth jump, the frog is now at a height of (2 - 5 + 3) = 0 meters.
16. The frog has reached the top of the well.
The frog needs to jump 5 times to get out of the well.
The answer is: 5.
Just a tiny lack of reasoning here but I am impressed with the math calculations and that it was even able to understand you.