Commit
•
6ea9f80
1
Parent(s):
f25c10f
Update README.md
Browse files
README.md
CHANGED
@@ -22,13 +22,13 @@ widget:
|
|
22 |
# tinybiggames/Phi-3-mini-4k-instruct-Q4_K_M-GGUF
|
23 |
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.
|
24 |
Refer to the [original model card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) for more details on the model.
|
25 |
-
## Use with tinyBigGAMES's [
|
26 |
|
27 |
|
28 |
How to configure LMEngine:
|
29 |
|
30 |
```Delphi
|
31 |
-
|
32 |
'C:/LLM/gguf', // path to model files
|
33 |
-1 // number of GPU layer, -1 to use all available layers
|
34 |
);
|
@@ -37,7 +37,7 @@ LME_InitConfig(
|
|
37 |
How to define model:
|
38 |
|
39 |
```Delphi
|
40 |
-
|
41 |
'phi-3-mini-4k-instruct.Q4_K_M', 4000,
|
42 |
'<|{role}|>{content}<|end|>',
|
43 |
'<|assistant|>');
|
@@ -46,7 +46,7 @@ LME_DefineModel('phi-3-mini-4k-instruct.Q4_K_M.gguf',
|
|
46 |
How to add a message:
|
47 |
|
48 |
```Delphi
|
49 |
-
|
50 |
LME_ROLE_USER, // role
|
51 |
'What is AI?' // content
|
52 |
);
|
@@ -64,17 +64,17 @@ var
|
|
64 |
LOutputTokens: Int32;
|
65 |
LTotalTokens: Int32;
|
66 |
|
67 |
-
if
|
68 |
begin
|
69 |
-
|
70 |
@LTotalTokens);
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
end
|
75 |
else
|
76 |
begin
|
77 |
-
|
78 |
-
|
79 |
end;
|
80 |
```
|
|
|
22 |
# tinybiggames/Phi-3-mini-4k-instruct-Q4_K_M-GGUF
|
23 |
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.
|
24 |
Refer to the [original model card](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) for more details on the model.
|
25 |
+
## Use with tinyBigGAMES's [Inference](https://github.com/tinyBigGAMES) Libraries.
|
26 |
|
27 |
|
28 |
How to configure LMEngine:
|
29 |
|
30 |
```Delphi
|
31 |
+
InitConfig(
|
32 |
'C:/LLM/gguf', // path to model files
|
33 |
-1 // number of GPU layer, -1 to use all available layers
|
34 |
);
|
|
|
37 |
How to define model:
|
38 |
|
39 |
```Delphi
|
40 |
+
DefineModel('phi-3-mini-4k-instruct.Q4_K_M.gguf',
|
41 |
'phi-3-mini-4k-instruct.Q4_K_M', 4000,
|
42 |
'<|{role}|>{content}<|end|>',
|
43 |
'<|assistant|>');
|
|
|
46 |
How to add a message:
|
47 |
|
48 |
```Delphi
|
49 |
+
AddMessage(
|
50 |
LME_ROLE_USER, // role
|
51 |
'What is AI?' // content
|
52 |
);
|
|
|
64 |
LOutputTokens: Int32;
|
65 |
LTotalTokens: Int32;
|
66 |
|
67 |
+
if RunInference('phi-3-mini-4k-instruct.Q4_K_M', 1024) then
|
68 |
begin
|
69 |
+
GetInferenceStats(nil, @LTokenOutputSpeed, @LInputTokens, @LOutputTokens,
|
70 |
@LTotalTokens);
|
71 |
+
PrintLn('', LME_FG_WHITE);
|
72 |
+
PrintLn('Tokens :: Input: %d, Output: %d, Total: %d, Speed: %3.1f t/s',
|
73 |
+
FG_BRIGHTYELLOW, LInputTokens, LOutputTokens, LTotalTokens, LTokenOutputSpeed);
|
74 |
end
|
75 |
else
|
76 |
begin
|
77 |
+
PrintLn('', FG_WHITE);
|
78 |
+
PrintLn('Error: %s', FG_RED, LME_GetError());
|
79 |
end;
|
80 |
```
|