DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
model_inference_config.h
1 /*********************************************************************************************************************************************/
2 /* DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. */
3 /* Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, */
4 /* document analysis. Offline processing possible for security and confidentiality */
5 /* */
6 /* Copyright (c) SILVERCODERS Ltd, http://silvercoders.com */
7 /* Project homepage: https://github.com/docwire/docwire */
8 /* */
9 /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-DocWire-Commercial */
10 /*********************************************************************************************************************************************/
11 
12 #ifndef DOCWIRE_AI_MODEL_INFERENCE_CONFIG_H
13 #define DOCWIRE_AI_MODEL_INFERENCE_CONFIG_H
14 #include "model_inference_config_type.h"
15 #include <string>
16 
17 namespace docwire::ai
18 {
19 /*
20  * @brief Handles configuration for llama model initialization and paramters
21  */
23 {
24  std::string model_path;
25  context_size n_ctx{4096};
26  batch_size n_batch{1024};
27  thread_count n_threads{4};
28  token_limit max_tokens{512};
29  temperature temp{0.2f};
30  min_p min_probability{0.05f};
31  bool verbose = false;
32  std::string system_prompt = "Do NOT repeat the input. Answer concisely and directly.";
33  std::string grammar{};
34  std::string grammar_root = "root";
35 };
36 
37 } // namespace docwire::ai
38 
39 #endif