YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Llama2Device_ParamsParser.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6
7// Generated by yarpDeviceParamParserGenerator (2.0)
8// This is an automatically generated file. Please do not edit it.
9// It will be re-generated if the cmake flag ALLOW_DEVICE_PARAM_PARSER_GERNERATION is ON.
10
11// Generated on: Mon Apr 13 16:55:49 2026
12
13
14#ifndef LLAMA2DEVICE_PARAMSPARSER_H
15#define LLAMA2DEVICE_PARAMSPARSER_H
16
17#include <yarp/os/Searchable.h>
19#include <string>
20#include <cmath>
21
49{
50public:
52 ~Llama2Device_ParamsParser() override = default;
53
54public:
55 const std::string m_device_classname = {"Llama2Device"};
56 const std::string m_device_name = {"yarp_llama2Device"};
57 bool m_parser_is_strict = false;
59 {
60 int major = 2;
61 int minor = 0;
62 };
64
66
67 const std::string m_model_context_defaultValue = {""};
68 const std::string m_model_name_defaultValue = {""};
69 const std::string m_npredict_defaultValue = {"128"};
70 const std::string m_ngl_defaultValue = {"50"};
71 const std::string m_offload_gpu_defaultValue = {"true"};
72 const std::string m_context_defaultValue = {"4096"};
73 const std::string m_prompt_file_defaultValue = {""};
74 const std::string m_prompt_context_defaultValue = {""};
75
76 std::string m_model_context = {}; //This default value of this string is an empty string. It is highly recommended to provide a suggested value also for optional string parameters.
77 std::string m_model_name = {}; //This default value is autogenerated. It is highly recommended to provide a suggested value also for mandatory parameters.
78 int m_npredict = {128};
79 int m_ngl = {50};
80 bool m_offload_gpu = {true};
81 int m_context = {4096};
82 std::string m_prompt_file = {}; //This default value of this string is an empty string. It is highly recommended to provide a suggested value also for optional string parameters.
83 std::string m_prompt_context = {}; //This default value of this string is an empty string. It is highly recommended to provide a suggested value also for optional string parameters.
84
85 bool parseParams(const yarp::os::Searchable & config) override;
86 std::string getDeviceClassName() const override { return m_device_classname; }
87 std::string getDeviceName() const override { return m_device_name; }
88 std::string getDocumentationOfDeviceParams() const override;
89 std::vector<std::string> getListOfParams() const override;
90 bool getParamValue(const std::string& paramName, std::string& paramValue) const override;
91 std::string getConfiguration() const override;
92};
93
94#endif
This class is the parameters parser for class Llama2Device.
~Llama2Device_ParamsParser() override=default
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
const parser_version_type m_parser_version
bool getParamValue(const std::string &paramName, std::string &paramValue) const override
Return the value (represented as a string) of the requested parameter.
std::string getConfiguration() const override
Return the configuration of the device.
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
const std::string m_prompt_context_defaultValue
std::string getDeviceName() const override
Get the name of the device (i.e.
std::string getDeviceClassName() const override
Get the name of the DeviceDriver class.
const std::string m_model_context_defaultValue
An interface for the management of the parameters of a DeviceDriver.
A base class for nested structures that can be searched.
Definition Searchable.h:31