tinybiggames
commited on
Commit
•
232d3a1
1
Parent(s):
37851d5
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -3,15 +3,15 @@ language:
|
|
3 |
- en
|
4 |
license: mit
|
5 |
tags:
|
|
|
|
|
6 |
- llama-cpp
|
7 |
- gguf-my-repo
|
8 |
-
- Infero
|
9 |
-
- Dllama
|
10 |
license_link: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct/resolve/main/LICENSE
|
11 |
pipeline_tag: text-generation
|
12 |
inference:
|
13 |
parameters:
|
14 |
-
temperature: 0.
|
15 |
widget:
|
16 |
- messages:
|
17 |
- role: user
|
@@ -21,59 +21,29 @@ widget:
|
|
21 |
# tinybiggames/Phi-3-mini-4k-instruct-Q4_K_M-GGUF
|
22 |
This model was converted to GGUF format from [`microsoft/Phi-3-mini-4k-instruct`](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
23 |
Refer to the [original model card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) for more details on the model.
|
24 |
-
## Use with
|
25 |
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
```Delphi
|
30 |
-
Config_Init(
|
31 |
-
'C:/LLM/gguf', // path to model files
|
32 |
-
-1 // number of GPU layer, -1 to use all available layers
|
33 |
-
);
|
34 |
```
|
|
|
35 |
|
36 |
-
|
37 |
|
38 |
-
```
|
39 |
-
|
40 |
-
'phi3:4K:Q4KM', 4000,
|
41 |
-
'<|{role}|>{content}<|end|>',
|
42 |
-
'<|assistant|>');
|
43 |
```
|
44 |
|
45 |
-
|
46 |
|
47 |
-
```
|
48 |
-
|
49 |
-
ROLE_USER, // role
|
50 |
-
'What is AI?' // content
|
51 |
-
);
|
52 |
```
|
53 |
|
54 |
-
|
55 |
-
`{content}` - will be substituted with the message "content"
|
56 |
-
|
57 |
-
How to do inference:
|
58 |
|
59 |
-
```
|
60 |
-
|
61 |
-
|
62 |
-
LInputTokens: Int32;
|
63 |
-
LOutputTokens: Int32;
|
64 |
-
LTotalTokens: Int32;
|
65 |
-
|
66 |
-
if Inference_Run('phi3:4K:Q4KM', 1024) then
|
67 |
-
begin
|
68 |
-
Inference_GetUsage(nil, @LTokenOutputSpeed, @LInputTokens, @LOutputTokens,
|
69 |
-
@LTotalTokens);
|
70 |
-
Console_PrintLn('', FG_WHITE);
|
71 |
-
Console_PrintLn('Tokens :: Input: %d, Output: %d, Total: %d, Speed: %3.1f t/s',
|
72 |
-
FG_BRIGHTYELLOW, LInputTokens, LOutputTokens, LTotalTokens, LTokenOutputSpeed);
|
73 |
-
end
|
74 |
-
else
|
75 |
-
begin
|
76 |
-
Console_PrintLn('', FG_WHITE);
|
77 |
-
Console_PrintLn('Error: %s', FG_RED, Error_Get());
|
78 |
-
end;
|
79 |
-
```
|
|
|
3 |
- en
|
4 |
license: mit
|
5 |
tags:
|
6 |
+
- nlp
|
7 |
+
- code
|
8 |
- llama-cpp
|
9 |
- gguf-my-repo
|
|
|
|
|
10 |
license_link: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct/resolve/main/LICENSE
|
11 |
pipeline_tag: text-generation
|
12 |
inference:
|
13 |
parameters:
|
14 |
+
temperature: 0.0
|
15 |
widget:
|
16 |
- messages:
|
17 |
- role: user
|
|
|
21 |
# tinybiggames/Phi-3-mini-4k-instruct-Q4_K_M-GGUF
|
22 |
This model was converted to GGUF format from [`microsoft/Phi-3-mini-4k-instruct`](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
23 |
Refer to the [original model card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) for more details on the model.
|
24 |
+
## Use with llama.cpp
|
25 |
|
26 |
+
Install llama.cpp through brew.
|
27 |
|
28 |
+
```bash
|
29 |
+
brew install ggerganov/ggerganov/llama.cpp
|
|
|
|
|
|
|
|
|
|
|
30 |
```
|
31 |
+
Invoke the llama.cpp server or the CLI.
|
32 |
|
33 |
+
CLI:
|
34 |
|
35 |
+
```bash
|
36 |
+
llama-cli --hf-repo tinybiggames/Phi-3-mini-4k-instruct-Q4_K_M-GGUF --model phi-3-mini-4k-instruct.Q4_K_M.gguf -p "The meaning to life and the universe is"
|
|
|
|
|
|
|
37 |
```
|
38 |
|
39 |
+
Server:
|
40 |
|
41 |
+
```bash
|
42 |
+
llama-server --hf-repo tinybiggames/Phi-3-mini-4k-instruct-Q4_K_M-GGUF --model phi-3-mini-4k-instruct.Q4_K_M.gguf -c 2048
|
|
|
|
|
|
|
43 |
```
|
44 |
|
45 |
+
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.
|
|
|
|
|
|
|
46 |
|
47 |
+
```
|
48 |
+
git clone https://github.com/ggerganov/llama.cpp && cd llama.cpp && make && ./main -m phi-3-mini-4k-instruct.Q4_K_M.gguf -n 128
|
49 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|