tinybiggames commited on
Commit
a86f565
1 Parent(s): 99a890b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -11
README.md CHANGED
@@ -30,7 +30,7 @@ Refer to the [original model card](https://huggingface.co/cognitivecomputations/
30
  How to configure LMEngine:
31
 
32
  ```Delphi
33
- Config_Init(
34
  'C:/LLM/gguf', // path to model files
35
  -1 // number of GPU layer, -1 to use all available layers
36
  );
@@ -39,7 +39,7 @@ Config_Init(
39
  How to define model:
40
 
41
  ```Delphi
42
- Model_Define('dolphin-2.9.1-llama-3-8b.Q4_K_M.gguf',
43
  'dolphin-2.9.1-llama-3-8b.Q4_K_M', 8000,
44
  '<|im_start|>{role}\n{content}<|im_end|>\n',
45
  '<|im_start|>assistant');
@@ -48,8 +48,8 @@ Model_Define('dolphin-2.9.1-llama-3-8b.Q4_K_M.gguf',
48
  How to add a message:
49
 
50
  ```Delphi
51
- Message_Add(
52
- ROLE_USER, // role
53
  'What is AI?' // content
54
  );
55
  ```
@@ -66,17 +66,17 @@ var
66
  LOutputTokens: Int32;
67
  LTotalTokens: Int32;
68
 
69
- if Inference_Run('dolphin-2.9.1-llama-3-8b.Q4_K_M', 1024) then
70
  begin
71
- Inference_GetUsage(nil, @LTokenOutputSpeed, @LInputTokens, @LOutputTokens,
72
  @LTotalTokens);
73
- Console_PrintLn('', FG_WHITE);
74
- Console_PrintLn('Tokens :: Input: %d, Output: %d, Total: %d, Speed: %3.1f t/s',
75
- FG_BRIGHTYELLOW, LInputTokens, LOutputTokens, LTotalTokens, LTokenOutputSpeed);
76
  end
77
  else
78
  begin
79
- Console_PrintLn('', FG_WHITE);
80
- Console_PrintLn('Error: %s', FG_RED, Error_Get());
81
  end;
82
  ```
 
30
  How to configure LMEngine:
31
 
32
  ```Delphi
33
+ LME_InitConfig(
34
  'C:/LLM/gguf', // path to model files
35
  -1 // number of GPU layer, -1 to use all available layers
36
  );
 
39
  How to define model:
40
 
41
  ```Delphi
42
+ LME_DefineModel('dolphin-2.9.1-llama-3-8b.Q4_K_M.gguf',
43
  'dolphin-2.9.1-llama-3-8b.Q4_K_M', 8000,
44
  '<|im_start|>{role}\n{content}<|im_end|>\n',
45
  '<|im_start|>assistant');
 
48
  How to add a message:
49
 
50
  ```Delphi
51
+ LME_AddMessage(
52
+ LME_ROLE_USER, // role
53
  'What is AI?' // content
54
  );
55
  ```
 
66
  LOutputTokens: Int32;
67
  LTotalTokens: Int32;
68
 
69
+ if LME_RunInference('dolphin-2.9.1-llama-3-8b.Q4_K_M', 1024) then
70
  begin
71
+ LME_GetInferenceStats(nil, @LTokenOutputSpeed, @LInputTokens, @LOutputTokens,
72
  @LTotalTokens);
73
+ LME_PrintLn('', LME_FG_WHITE);
74
+ LME_PrintLn('Tokens :: Input: %d, Output: %d, Total: %d, Speed: %3.1f t/s',
75
+ LME_FG_BRIGHTYELLOW, LInputTokens, LOutputTokens, LTotalTokens, LTokenOutputSpeed);
76
  end
77
  else
78
  begin
79
+ LME_PrintLn('', LME_FG_WHITE);
80
+ LME_PrintLn('Error: %s', LME_FG_RED, LME_GetError());
81
  end;
82
  ```