MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / parse_tokens_from_string

Function parse_tokens_from_string

external/ggml/examples/common.cpp:318–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318static std::vector<gpt_vocab::id> parse_tokens_from_string(const std::string& input, char delimiter) {
319 std::vector<gpt_vocab::id> output;
320 std::stringstream ss(input);
321 std::string token;
322
323 while (std::getline(ss, token, delimiter)) {
324 output.push_back(std::stoi(token));
325 }
326
327 return output;
328}
329
330static std::map<std::string, std::vector<gpt_vocab::id>> extract_tests_from_file(const std::string & fpath_test){
331 if (fpath_test.empty()){

Callers 1

extract_tests_from_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected