tinybiggames commited on
Commit
981a5a0
1 Parent(s): 097d40c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -10
README.md CHANGED
@@ -45,7 +45,7 @@ Refer to the [original model card](https://huggingface.co/NousResearch/Hermes-2-
45
  How to configure LMEngine:
46
 
47
  ```Delphi
48
- Config_Init(
49
  'C:/LLM/gguf', // path to model files
50
  -1 // number of GPU layer, -1 to use all available layers
51
  );
@@ -54,7 +54,7 @@ Config_Init(
54
  How to define model:
55
 
56
  ```Delphi
57
- Model_Define('hermes-2-pro-llama-3-8b.Q4_K_M.gguf',
58
  'hermes-2-pro-llama-3-8b.Q4_K_M', 8000, '<|im_start|>{role}\n{content}<|im_end|>\n',
59
  '<|im_start|>assistant');
60
  ```
@@ -62,7 +62,7 @@ Model_Define('hermes-2-pro-llama-3-8b.Q4_K_M.gguf',
62
  How to add a message:
63
 
64
  ```Delphi
65
- Message_Add(
66
  ROLE_USER, // role
67
  'What is AI?' // content
68
  );
@@ -80,17 +80,17 @@ var
80
  LOutputTokens: Int32;
81
  LTotalTokens: Int32;
82
 
83
- if Inference_Run('hermes-2-pro-llama-3-8b.Q4_K_M', 1024) then
84
  begin
85
- Inference_GetUsage(nil, @LTokenOutputSpeed, @LInputTokens, @LOutputTokens,
86
  @LTotalTokens);
87
- Console_PrintLn('', FG_WHITE);
88
- Console_PrintLn('Tokens :: Input: %d, Output: %d, Total: %d, Speed: %3.1f t/s',
89
- FG_BRIGHTYELLOW, LInputTokens, LOutputTokens, LTotalTokens, LTokenOutputSpeed);
90
  end
91
  else
92
  begin
93
- Console_PrintLn('', FG_WHITE);
94
- Console_PrintLn('Error: %s', FG_RED, Error_Get());
95
  end;
96
  ```
 
45
  How to configure LMEngine:
46
 
47
  ```Delphi
48
+ LME_InitConfig(
49
  'C:/LLM/gguf', // path to model files
50
  -1 // number of GPU layer, -1 to use all available layers
51
  );
 
54
  How to define model:
55
 
56
  ```Delphi
57
+ LME_DefineModel('hermes-2-pro-llama-3-8b.Q4_K_M.gguf',
58
  'hermes-2-pro-llama-3-8b.Q4_K_M', 8000, '<|im_start|>{role}\n{content}<|im_end|>\n',
59
  '<|im_start|>assistant');
60
  ```
 
62
  How to add a message:
63
 
64
  ```Delphi
65
+ LME_AddMessage(
66
  ROLE_USER, // role
67
  'What is AI?' // content
68
  );
 
80
  LOutputTokens: Int32;
81
  LTotalTokens: Int32;
82
 
83
+ if LME_RunInference('hermes-2-pro-llama-3-8b.Q4_K_M', 1024) then
84
  begin
85
+ LME_GetInferenceStats(nil, @LTokenOutputSpeed, @LInputTokens, @LOutputTokens,
86
  @LTotalTokens);
87
+ LME_PrintLn('', LME_FG_WHITE);
88
+ LME_PrintLn('Tokens :: Input: %d, Output: %d, Total: %d, Speed: %3.1f t/s',
89
+ LME_FG_BRIGHTYELLOW, LInputTokens, LOutputTokens, LTotalTokens, LTokenOutputSpeed);
90
  end
91
  else
92
  begin
93
+ LME_PrintLn('', LME_FG_WHITE);
94
+ LME_PrintLn('Error: %s', LME_FG_RED, LME_GetError());
95
  end;
96
  ```