MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / tokens_to_str

Function tokens_to_str

examples/server/server.cpp:261–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259// TODO: reuse llama_detokenize
260template <class Iter>
261static std::string tokens_to_str(llama_context *ctx, Iter begin, Iter end)
262{
263 std::string ret;
264 for (; begin != end; ++begin)
265 {
266 ret += llama_token_to_piece(ctx, *begin);
267 }
268 return ret;
269}
270
271static void server_log(const char *level, const char *function, int line,
272 const char *message, const nlohmann::ordered_json &extra)

Callers 2

update_slotsMethod · 0.70
mainFunction · 0.70

Calls 1

llama_token_to_pieceFunction · 0.50

Tested by

no test coverage detected