Instructions to use MCES10/maths-problems-gemma-2-2b-it-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use MCES10/maths-problems-gemma-2-2b-it-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MCES10/maths-problems-gemma-2-2b-it-GGUF", filename="maths-problems-gemma-2-2B-it-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use MCES10/maths-problems-gemma-2-2b-it-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MCES10/maths-problems-gemma-2-2b-it-GGUF:F16 # Run inference directly in the terminal: llama-cli -hf MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MCES10/maths-problems-gemma-2-2b-it-GGUF:F16 # Run inference directly in the terminal: llama-cli -hf MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf MCES10/maths-problems-gemma-2-2b-it-GGUF:F16 # Run inference directly in the terminal: ./llama-cli -hf MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf MCES10/maths-problems-gemma-2-2b-it-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
Use Docker
docker model run hf.co/MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
- LM Studio
- Jan
- vLLM
How to use MCES10/maths-problems-gemma-2-2b-it-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MCES10/maths-problems-gemma-2-2b-it-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MCES10/maths-problems-gemma-2-2b-it-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
- Ollama
How to use MCES10/maths-problems-gemma-2-2b-it-GGUF with Ollama:
ollama run hf.co/MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
- Unsloth Studio new
How to use MCES10/maths-problems-gemma-2-2b-it-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MCES10/maths-problems-gemma-2-2b-it-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MCES10/maths-problems-gemma-2-2b-it-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MCES10/maths-problems-gemma-2-2b-it-GGUF to start chatting
- Docker Model Runner
How to use MCES10/maths-problems-gemma-2-2b-it-GGUF with Docker Model Runner:
docker model run hf.co/MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
- Lemonade
How to use MCES10/maths-problems-gemma-2-2b-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MCES10/maths-problems-gemma-2-2b-it-GGUF:F16
Run and chat with the model
lemonade run user.maths-problems-gemma-2-2b-it-GGUF-F16
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)- Maths Problem Solving AI Based on Google Gemma 2 2b it GGUF
- Input:
- A ship traveling along a river has covered $24 \mathrm{
km}$ upstream and $28 \mathrm{km}$ downstream. For this journey, it took half an hour less than for traveling $30 \mathrm{km}$ upstream and $21 \mathrm{km}$ downstream, or half an hour more than for traveling $15 \mathrm{km}$ upstream and $42 \mathrm{km}$ downstream, assuming that both the ship and the river move uniformly. Determine the speed of the ship in still water and the speed of the river. - Output:
Maths Problem Solving AI Based on Google Gemma 2 2b it GGUF
Based on OpenR1-Math-220k
Input:
A ship traveling along a river has covered $24 \mathrm{km}$ upstream and $28 \mathrm{km}$ downstream. For this journey, it took half an hour less than for traveling $30 \mathrm{km}$ upstream and $21 \mathrm{km}$ downstream, or half an hour more than for traveling $15 \mathrm{km}$ upstream and $42 \mathrm{km}$ downstream, assuming that both the ship and the river move uniformly. Determine the speed of the ship in still water and the speed of the river.
Output:
Here's how to solve this problem:
Let's denote:
- x = speed of the ship in still water
- y = speed of the river
Formulate the equations:
- Upstream: x - y = x / 2 (The ship travels against the current, so its speed is reduced)
- Downstream: x + y = x / 2 (The ship travels with the current, so its speed is increased)
Solve the system of equations:
Simplify the equations:
- x - y = x/2 => x - x/2 = y => x/2 = y
- x + y = x/2 => x + x/2 = y => 3x/2 = y
Substitute the value of y from the first equation into the second equation:
- x/2 = 3x/2
Solve for x:
- x = 0
Substitute the value of x back into the equation for y:
- y = 0
Answer:
- The speed of the ship in still water is 0 km/h.
- The speed of the river is 0 km/h.
Conclusion:
The ship is stationary, and the river is also stationary. This means that the ship and the river are at rest relative to each other.
========== Prompt: 114 tokens, 417.293 tokens-per-sec Generation: 358 tokens, 28.375 tokens-per-sec Peak memory: 5.406 GB
- Downloads last month
- 16
16-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MCES10/maths-problems-gemma-2-2b-it-GGUF", filename="maths-problems-gemma-2-2B-it-F16.gguf", )