MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / get_meta

Method get_meta

subprojects/llama.cpp/tools/server/server-context.cpp:2876–2909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2874}
2875
2876server_context_meta server_context::get_meta() const {
2877 auto bos_id = llama_vocab_bos(impl->vocab);
2878 auto eos_id = llama_vocab_eos(impl->vocab);
2879 auto bos_token_str = bos_id != LLAMA_TOKEN_NULL ? common_token_to_piece(impl->ctx, bos_id, true) : "";
2880 auto eos_token_str = eos_id != LLAMA_TOKEN_NULL ? common_token_to_piece(impl->ctx, eos_id, true) : "";
2881
2882 return server_context_meta {
2883 /* build_info */ build_info,
2884 /* model_name */ impl->model_name,
2885 /* model_path */ impl->params_base.model.path,
2886 /* has_mtmd */ impl->mctx != nullptr,
2887 /* has_inp_image */ impl->chat_params.allow_image,
2888 /* has_inp_audio */ impl->chat_params.allow_audio,
2889 /* json_webui_settings */ impl->json_webui_settings,
2890 /* slot_n_ctx */ impl->get_slot_n_ctx(),
2891 /* pooling_type */ llama_pooling_type(impl->ctx),
2892
2893 /* chat_params */ impl->chat_params,
2894 /* chat_template_caps */ common_chat_templates_get_caps(impl->chat_params.tmpls.get()),
2895
2896 /* bos_token_str */ bos_token_str,
2897 /* eos_token_str */ eos_token_str,
2898 /* fim_pre_token */ llama_vocab_fim_pre(impl->vocab),
2899 /* fim_sub_token */ llama_vocab_fim_suf(impl->vocab),
2900 /* fim_mid_token */ llama_vocab_fim_mid(impl->vocab),
2901
2902 /* model_vocab_type */ llama_vocab_type(impl->vocab),
2903 /* model_vocab_n_tokens */ llama_vocab_n_tokens(impl->vocab),
2904 /* model_n_ctx_train */ llama_model_n_ctx_train(impl->model),
2905 /* model_n_embd_inp */ llama_model_n_embd(impl->model),
2906 /* model_n_params */ llama_model_n_params(impl->model),
2907 /* model_size */ llama_model_size(impl->model),
2908 };
2909}
2910
2911
2912

Callers

nothing calls this directly

Calls 15

llama_vocab_bosFunction · 0.85
llama_vocab_eosFunction · 0.85
common_token_to_pieceFunction · 0.85
llama_vocab_fim_preFunction · 0.85
llama_vocab_fim_sufFunction · 0.85
llama_vocab_fim_midFunction · 0.85
llama_vocab_n_tokensFunction · 0.85
llama_model_n_ctx_trainFunction · 0.85
llama_model_n_embdFunction · 0.85
llama_model_n_paramsFunction · 0.85
llama_model_sizeFunction · 0.85

Tested by

no test coverage detected