Text Generation
GGUF
alignment-handbook
Generated from Trainer
llama-cpp
gguf-my-repo
conversational
Instructions to use Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF", filename="numinamath-7b-tir-q4_k_m.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 Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
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 Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
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 Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-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": "Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
- Ollama
How to use Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF with Ollama:
ollama run hf.co/Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
- Unsloth Studio new
How to use Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-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 Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-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 Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF to start chatting
- Docker Model Runner
How to use Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF with Docker Model Runner:
docker model run hf.co/Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
- Lemonade
How to use Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.NuminaMath-7B-TIR-Q4_K_M-GGUF-Q4_K_M
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: AI-MO/NuminaMath-7B-TIR
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- alignment-handbook
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
- llama-cpp
|
| 9 |
+
- gguf-my-repo
|
| 10 |
+
widget:
|
| 11 |
+
- example_title: Math problem
|
| 12 |
+
messages:
|
| 13 |
+
- role: user
|
| 14 |
+
content: For how many values of the constant $k$ will the polynomial $x^{2}+kx+36$
|
| 15 |
+
have two distinct integer roots?
|
| 16 |
+
output:
|
| 17 |
+
text: "### Solution: \n1- For the polynomial \\\\( x^2 + kx + 36 \\\\) to have\
|
| 18 |
+
\ two distinct integer roots, let's denote these roots by \\\\( r_1 \\\\) and\
|
| 19 |
+
\ \\\\( r_2 \\\\).\n\n\n2- According to Vieta's formulas, the sum of the roots\
|
| 20 |
+
\ \\\\( r_1 + r_2 \\\\) is equal to \\\\(-k\\\\), and the product of the roots\
|
| 21 |
+
\ \\\\( r_1 \\\\cdot r_2 \\\\) is equal to 36.\n\n\n3- To find the distinct\
|
| 22 |
+
\ integer pairs \\\\((r_1, r_2)\\\\) whose product is 36, we need to determine\
|
| 23 |
+
\ all pairs of integers \\\\((r_1, r_2)\\\\) such that \\\\( r_1 \\\\cdot r_2\
|
| 24 |
+
\ = 36 \\\\) and \\\\( r_1 \\\\neq r_2 \\\\).\n\n\n4- From the equation \\\\\
|
| 25 |
+
( r_1 + r_2 = -k \\\\), for each valid pair \\\\((r_1, r_2)\\\\), we can compute\
|
| 26 |
+
\ the corresponding value of \\\\( k \\\\).\n\n\n5- Finally, since we need the\
|
| 27 |
+
\ polynomial to have two distinct integer roots, we need to ensure that \\\\\
|
| 28 |
+
( r_1 \\\\) and \\\\( r_2 \\\\) are distinct.\nLet's start by finding all pairs\
|
| 29 |
+
\ \\\\((r_1, r_2)\\\\) such that \\\\( r_1 \\\\cdot r_2 = 36 \\\\). We'll then\
|
| 30 |
+
\ determine the values of \\\\( k \\\\) and ensure the roots are distinct.\n\
|
| 31 |
+
```python import itertools\n# Find all pairs (r1, r2) such that r1 * r2 = 36\
|
| 32 |
+
\ product_36 = 36 factor_pairs = []\nfor i in range(1, product_36 + 1):\n if\
|
| 33 |
+
\ product_36 % i == 0:\n pair = (i, product_36 // i)\n if pair[0] != pair[1]:\
|
| 34 |
+
\ # Ensure distinct pairs\n factor_pairs.append(pair)\n \n # Calculate\
|
| 35 |
+
\ k for each pair and ensure distinct integer roots\n valid_k_values = set()\n\
|
| 36 |
+
\ for r1, r2 in factor_pairs:\n if r1 != r2:\n k = -(r1 + r2)\n\
|
| 37 |
+
\ valid_k_values.add(k)\n \n print((len(valid_k_values), sorted(valid_k_values)))\n\
|
| 38 |
+
\ ```\n \n ```output\n (4, [-37, -20, -15,-13])\n ```\n The distinct integer\
|
| 39 |
+
\ values of \\\\( k \\\\) that make the\npolynomial \\\\( x^2 + kx + 36 \\\\\
|
| 40 |
+
) have two distinct integer roots are \\\\(-37, -20, -15, \\\\text{and} -13\\\
|
| 41 |
+
\\).\nTherefore, the number of such values of \\\\( k \\\\) is:\n[ \\\\boxed{4}\
|
| 42 |
+
\ \\\\]"
|
| 43 |
+
model-index:
|
| 44 |
+
- name: NuminaMath-7B-TIR
|
| 45 |
+
results: []
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
# Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF
|
| 49 |
+
This model was converted to GGUF format from [`AI-MO/NuminaMath-7B-TIR`](https://huggingface.co/AI-MO/NuminaMath-7B-TIR) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 50 |
+
Refer to the [original model card](https://huggingface.co/AI-MO/NuminaMath-7B-TIR) for more details on the model.
|
| 51 |
+
|
| 52 |
+
## Use with llama.cpp
|
| 53 |
+
Install llama.cpp through brew (works on Mac and Linux)
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
brew install llama.cpp
|
| 57 |
+
|
| 58 |
+
```
|
| 59 |
+
Invoke the llama.cpp server or the CLI.
|
| 60 |
+
|
| 61 |
+
### CLI:
|
| 62 |
+
```bash
|
| 63 |
+
llama-cli --hf-repo Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF --hf-file numinamath-7b-tir-q4_k_m.gguf -p "The meaning to life and the universe is"
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
### Server:
|
| 67 |
+
```bash
|
| 68 |
+
llama-server --hf-repo Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF --hf-file numinamath-7b-tir-q4_k_m.gguf -c 2048
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well.
|
| 72 |
+
|
| 73 |
+
Step 1: Clone llama.cpp from GitHub.
|
| 74 |
+
```
|
| 75 |
+
git clone https://github.com/ggerganov/llama.cpp
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux).
|
| 79 |
+
```
|
| 80 |
+
cd llama.cpp && LLAMA_CURL=1 make
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
Step 3: Run inference through the main binary.
|
| 84 |
+
```
|
| 85 |
+
./llama-cli --hf-repo Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF --hf-file numinamath-7b-tir-q4_k_m.gguf -p "The meaning to life and the universe is"
|
| 86 |
+
```
|
| 87 |
+
or
|
| 88 |
+
```
|
| 89 |
+
./llama-server --hf-repo Tech-Meld/NuminaMath-7B-TIR-Q4_K_M-GGUF --hf-file numinamath-7b-tir-q4_k_m.gguf -c 2048
|
| 90 |
+
```
|