#include <swiglu.h>
#include <transpose_layer.h>
-#if defined(DENABLE_ENCODER)
+#if defined(ENABLE_ENCODER)
#include "json.hpp"
#include <codecvt>
#include <encoder.hpp>
unsigned int init_len;
-#if defined(DENABLE_ENCODER)
+#if defined(ENABLE_ENCODER)
std::string vocab_file_name = "../Applications/LLaMA/jni/vocab.json";
std::string merge_file_name = "../Applications/LLaMA/jni/merges.txt";
std::cout << " Progress Reading: 100 % " << std::endl;
std::cout << std::endl << "### Output : " << std::endl;
if (init_len < INIT_SEQ_LEN) {
-#if defined(DENABLE_ENCODER)
+#if defined(ENABLE_ENCODER)
auto decoded_str = tokenizer.decode({static_cast<int64_t>(ids)});
std::cout << decoded_str << " ";
std::cout.flush();
input_sample[0] = static_cast<float>(init_input[i]);
} else {
input_sample[0] = static_cast<float>(ids);
-#if defined(DENABLE_ENCODER)
+#if defined(ENABLE_ENCODER)
auto decoded_str = tokenizer.decode({static_cast<int64_t>(ids)});
std::cout << decoded_str << " ";
std::cout.flush();
g_model->load(weight_path);
}
-#if defined(DENABLE_ENCODER)
+#if defined(ENABLE_ENCODER)
std::wstring decodeUnicodeEscape(const std::wstring &input) {
std::wstringstream result;
// Setting locale
std::locale::global(std::locale("ko_KR.UTF-8"));
-#if defined(DENABLE_ENCODER)
+#if defined(ENABLE_ENCODER)
// Getting arguments From terminal
std::wstring input;
std::getline(std::wcin, input);
if get_option('enable-tizen-feature-check')
add_project_arguments('-D__FEATURE_CHECK_SUPPORT__', language: ['c', 'cpp'])
endif
-elif get_option('platform') == 'android'
+endif
+
+if get_option('enable_encoder')
add_project_arguments('-DENABLE_ENCODER=1', language: ['c', 'cpp'])
endif
option('enable-nnstreamer-tensor-filter', type: 'feature', value: 'auto')
option('enable-nnstreamer-tensor-trainer', type: 'feature', value: 'auto')
option('nnstreamer-subplugin-install-path', type: 'string', value: '/usr/lib/nnstreamer') # where nnstreamer subplugin should be installed
+
+# application related options
+option('enable_encoder', type: 'boolean', value: false)