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 |
+
# kawchar85/NuminaMath-7B-TIR-Q6_K-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 kawchar85/NuminaMath-7B-TIR-Q6_K-GGUF --hf-file numinamath-7b-tir-q6_k.gguf -p "The meaning to life and the universe is"
|
64 |
+
```
|
65 |
+
|
66 |
+
### Server:
|
67 |
+
```bash
|
68 |
+
llama-server --hf-repo kawchar85/NuminaMath-7B-TIR-Q6_K-GGUF --hf-file numinamath-7b-tir-q6_k.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 kawchar85/NuminaMath-7B-TIR-Q6_K-GGUF --hf-file numinamath-7b-tir-q6_k.gguf -p "The meaning to life and the universe is"
|
86 |
+
```
|
87 |
+
or
|
88 |
+
```
|
89 |
+
./llama-server --hf-repo kawchar85/NuminaMath-7B-TIR-Q6_K-GGUF --hf-file numinamath-7b-tir-q6_k.gguf -c 2048
|
90 |
+
```
|