NikolayKozloff commited on
Commit
6d14728
1 Parent(s): da828a0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +86 -0
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 1. For the polynomial \\( x^2 + kx + 36 \\) to have two distinct
18
+ integer roots, let''s denote these roots by \\( r_1 \\) and \\( r_2 \\).\n\n2.
19
+ According to Vieta''s formulas, the sum of the roots \\( r_1 + r_2 \\) is equal
20
+ to \\(-k\\), and the product of the roots \\( r_1 \\cdot r_2 \\) is equal to
21
+ 36.\n\n3. To find the distinct integer pairs \\((r_1, r_2)\\) whose product
22
+ is 36, we need to determine all pairs of integers \\((r_1, r_2)\\) such that
23
+ \\( r_1 \\cdot r_2 = 36 \\) and \\( r_1 \\neq r_2 \\).\n\n4. From the equation
24
+ \\( r_1 + r_2 = -k \\), for each valid pair \\((r_1, r_2)\\), we can compute
25
+ the corresponding value of \\( k \\).\n\n5. Finally, since we need the polynomial
26
+ to have two distinct integer roots, we need to ensure that \\( r_1 \\) and \\(
27
+ r_2 \\) are distinct.\n\nLet''s start by finding all pairs \\((r_1, r_2)\\)
28
+ such that \\( r_1 \\cdot r_2 = 36 \\). We''ll then determine the values of \\(
29
+ k \\) and ensure the roots are distinct.\n```python\nimport itertools\n\n# Find
30
+ all pairs (r1, r2) such that r1 * r2 = 36\nproduct_36 = 36\nfactor_pairs = []\n\nfor
31
+ i in range(1, product_36 + 1):\n if product_36 % i == 0:\n pair = (i, product_36
32
+ // i)\n if pair[0] != pair[1]: # Ensure distinct pairs\n factor_pairs.append(pair)\n\n#
33
+ Calculate k for each pair and ensure distinct integer roots\nvalid_k_values
34
+ = set()\nfor r1, r2 in factor_pairs:\n if r1 != r2:\n k = -(r1 + r2)\n valid_k_values.add(k)\n\nprint((len(valid_k_values),
35
+ sorted(valid_k_values)))\n```\n```output\n(4, [-37, -20, -15, -13])\n```\nThe
36
+ distinct integer values of \\( k \\) that make the polynomial \\( x^2 + kx +
37
+ 36 \\) have two distinct integer roots are \\(-37, -20, -15, \\text{and} -13\\).\n\nTherefore,
38
+ the number of such values of \\( k \\) is:\n\n\\[\n\\boxed{4}\n\\]\n'
39
+ model-index:
40
+ - name: NuminaMath-7B-TIR
41
+ results: []
42
+ ---
43
+
44
+ # NikolayKozloff/NuminaMath-7B-TIR-Q4_0-GGUF
45
+ 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.
46
+ Refer to the [original model card](https://huggingface.co/AI-MO/NuminaMath-7B-TIR) for more details on the model.
47
+
48
+ ## Use with llama.cpp
49
+ Install llama.cpp through brew (works on Mac and Linux)
50
+
51
+ ```bash
52
+ brew install llama.cpp
53
+
54
+ ```
55
+ Invoke the llama.cpp server or the CLI.
56
+
57
+ ### CLI:
58
+ ```bash
59
+ llama-cli --hf-repo NikolayKozloff/NuminaMath-7B-TIR-Q4_0-GGUF --hf-file numinamath-7b-tir-q4_0.gguf -p "The meaning to life and the universe is"
60
+ ```
61
+
62
+ ### Server:
63
+ ```bash
64
+ llama-server --hf-repo NikolayKozloff/NuminaMath-7B-TIR-Q4_0-GGUF --hf-file numinamath-7b-tir-q4_0.gguf -c 2048
65
+ ```
66
+
67
+ 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.
68
+
69
+ Step 1: Clone llama.cpp from GitHub.
70
+ ```
71
+ git clone https://github.com/ggerganov/llama.cpp
72
+ ```
73
+
74
+ 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).
75
+ ```
76
+ cd llama.cpp && LLAMA_CURL=1 make
77
+ ```
78
+
79
+ Step 3: Run inference through the main binary.
80
+ ```
81
+ ./llama-cli --hf-repo NikolayKozloff/NuminaMath-7B-TIR-Q4_0-GGUF --hf-file numinamath-7b-tir-q4_0.gguf -p "The meaning to life and the universe is"
82
+ ```
83
+ or
84
+ ```
85
+ ./llama-server --hf-repo NikolayKozloff/NuminaMath-7B-TIR-Q4_0-GGUF --hf-file numinamath-7b-tir-q4_0.gguf -c 2048
86
+ ```