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
results are quite good
I have run some tests using ChatLLM.cpp. The results are quite good.
Some examples:
You > find the peak of f(x) = 3 (x - 1)^2 - 5
A.I. >
[Rewritten Answer]: To find the peak of the function f(x) = 3(x - 1)^2 - 5, we need to follow these steps:Step 1: Identify the quadratic function
The given function is a quadratic function in the form of f(x) = ax^2 + bx + c, where a = 3, b = -6, and c = -5.Step 2: Find the vertex of the parabola
The vertex of a parabola in the form of f(x) = ax^2 + bx + c is given by the formula:x_vertex = -b / (2a)
Step 3: Plug in the values of a and b
Now, we will plug in the values of a and b that we found earlier:x_vertex = -(-6) / (2 * 3)
Step 4: Simplify the expression
Simplify the expression to find the x-coordinate of the vertex:x_vertex = 6 / 6
x_vertex = 1Step 5: Find the y-coordinate of the vertex
Now that we have the x-coordinate of the vertex, we can find the y-coordinate by plugging it back into the function:f(1) = 3(1 - 1)^2 - 5
Step 6: Simplify the expression
Simplify the expression to find the y-coordinate of the vertex:f(1) = 3(0)^2 - 5
f(1) = -5Step 7: State the final answer
The peak of the function f(x) = 3(x - 1)^2 - 5 is at the point (1, -5).The answer is: the peak of the function f(x) = 3(x - 1)^2 - 5 is at the point (1, -5).
You > is it the maximum or minimum of the function
A.I. > The peak of a function is the highest or lowest point of the function. In this case, since the coefficient of the squared term (x - 1)^2 is positive (3), the parabola opens upwards, which means it has a minimum point. Therefore, the peak of the function f(x) = 3(x - 1)^2 - 5 is the minimum of the function.