mit-han-lab / TinyChatEngine

TinyChatEngine: On-Device LLM Inference Library

Home Page:https://mit-han-lab.github.io/TinyChatEngine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing nlohmann-json3-dev is required

dt1729 opened this issue · comments

Otherwise I see the error:

In file included from src/OPTTokenizer.cc:1: ./include/OPTTokenizer.h:22:10: fatal error: nlohmann/json.hpp: No such file or directory 22 | #include "nlohmann/json.hpp" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:180: build/transformer/src/OPTTokenizer.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from ./include/Generate.h:26, from src/Generate.cc:8: ./include/OPTTokenizer.h:22:10: fatal error: nlohmann/json.hpp: No such file or directory 22 | #include "nlohmann/json.hpp" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ./include/Generate.h:26, from src/nn_modules/non_cuda/LLaMAGenerate.cc:2: ./include/OPTTokenizer.h:22:10: fatal error: nlohmann/json.hpp: No such file or directory 22 | #include "nlohmann/json.hpp" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:180: build/transformer/src/Generate.o] Error 1 In file included from ./include/Generate.h:26, from src/OPTGenerate.cc:1: ./include/OPTTokenizer.h:22:10: fatal error: nlohmann/json.hpp: No such file or directory 22 | #include "nlohmann/json.hpp" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:180: build/transformer/src/nn_modules/non_cuda/LLaMAGenerate.o] Error 1 make: *** [Makefile:180: build/transformer/src/OPTGenerate.o] Error 1

Fix:

sudo apt-get install nlohmann-json3-dev