name string | code string | asm string | file string |
|---|---|---|---|
common_chat_templates_apply(common_chat_templates const*, common_chat_templates_inputs const&) | common_chat_params common_chat_templates_apply(
const struct common_chat_templates * tmpls,
const struct common_chat_templates_inputs & inputs)
{
GGML_ASSERT(tmpls != nullptr);
return inputs.use_jinja
? common_chat_templates_apply_jinja(tmpls, inputs)
: common_chat_templates_apply_legacy... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
testq %rsi, %rsi
je 0xb9678
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpb $0x1, 0x59(%rdx)
jne 0xb9232
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xba1e6
jmp 0xb9663
xorl %ebx, %ebx
movq %rbx, 0x30(%rsp)
xorpd %xmm0, %x... | /ggerganov[P]llama/common/chat.cpp |
common_chat_format_name[abi:cxx11](common_chat_format) | std::string common_chat_format_name(common_chat_format format) {
switch (format) {
case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only";
case COMMON_CHAT_FORMAT_GENERIC: return "Generic";
case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo";
case COMMON_CHAT_FORMAT_LLAM... | pushq %r14
pushq %rbx
pushq %rax
cmpl $0xd, %esi
ja 0xba1a1
movq %rdi, %rbx
movl %esi, %eax
leaq 0x89c93(%rip), %rcx # 0x143cc0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8b56d(%rip), %rsi # 0x1455b1
leaq 0x8b572(%rip), %rdx # 0x1455bd
jmp 0xba18e
le... | /ggerganov[P]llama/common/chat.cpp |
common_chat_templates_apply_jinja(common_chat_templates const*, common_chat_templates_inputs const&) | static common_chat_params common_chat_templates_apply_jinja(
const struct common_chat_templates * tmpls,
const struct common_chat_templates_inputs & inputs)
{
templates_params params;
params.tools = common_chat_tools_to_json_oaicompat<json>(inputs.tools);
const auto & tmpl = params.tools.is_array() ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp # imm = 0x278
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
xorl %r12d, %r12d
leaq 0x80(%rsp), %r14
movb %r12b, (%r14)
movq %r12, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0xaa84a
movq %r14, %rdi
movl $0x1, %esi... | /ggerganov[P]llama/common/chat.cpp |
common_chat_parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, common_chat_format) | common_chat_msg common_chat_parse(const std::string & input, common_chat_format format) {
switch (format) {
case COMMON_CHAT_FORMAT_CONTENT_ONLY:
return common_chat_parse_content_only(input);
case COMMON_CHAT_FORMAT_GENERIC:
return common_chat_parse_generic(input);
ca... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movl %edx, %ebp
movq %rdi, (%rsp)
cmpl $0xd, %edx
ja 0xbd0ca
movq %rsi, %r14
movl %ebp, %eax
leaq 0x87ae1(%rip), %rcx # 0x143cf8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rdi
leaq 0... | /ggerganov[P]llama/common/chat.cpp |
common_chat_parse_llama_3_1(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | static common_chat_msg common_chat_parse_llama_3_1(const std::string & input, bool with_builtin_tools = false) {
// TODO: tighten & simplify the parser, don't accept leading text context.
static const std::regex function_regex(
"\\s*\\{\\s*(?:\"type\"\\s*:\\s*\"function\"\\s*,\\s*)?\"name\"\\s*:\\s*\"([... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movb 0xd3e0b(%rip), %al # 0x1914b0
testb %al, %al
je 0xbdbef
movb 0xd3e25(%rip), %al # 0x1914d8
testb %al, %al
je 0xbdc46
movb 0xd3e3f(%rip), %al # ... | /ggerganov[P]llama/common/chat.cpp |
common_chat_parse_command_r7b(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | static common_chat_msg common_chat_parse_command_r7b(const std::string & input, bool extract_reasoning) {
static const std::regex thought_regex("(<\\|START_THINKING\\|>([\\s\\S]*?)<\\|END_THINKING\\|>)([\\s\\S]*)");
static const std::regex action_regex("<\\|START_ACTION\\|>([\\s\\S]*?)<\\|END_ACTION\\|>");
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r13
movb 0xd359f(%rip), %al # 0x1916b8
testb %al, %al
je 0xbe834
movb 0xd35b9(%rip), %al # 0x1916e0
testb %al, %al
je 0xbe88b
movb 0xd35d3(%rip), %al # ... | /ggerganov[P]llama/common/chat.cpp |
common_chat_params_init_generic(minja::chat_template const&, templates_params const&) | static common_chat_params common_chat_params_init_generic(const common_chat_template & tmpl, const struct templates_params & inputs) {
common_chat_params data;
auto tool_call_schemas = json::array();
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool.at("function")... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4f8, %rsp # imm = 0x4F8
movq %rdx, %r15
movq %rsi, %rbx
movl $0x0, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x30... | /ggerganov[P]llama/common/chat.cpp |
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&) | static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct templates_params & inputs) {
// https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt
common_chat_params data;
json tools = inputs.tools.is_null() ? input... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
mov... | /ggerganov[P]llama/common/chat.cpp |
common_chat_params_init_llama_3_1_tool_calls(minja::chat_template const&, templates_params const&, bool) | static common_chat_params common_chat_params_init_llama_3_1_tool_calls(const common_chat_template & tmpl, const struct templates_params & inputs, bool allow_python_tag_builtin_tools) {
auto builtin_tools = json::array();
common_chat_params data;
data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHO... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %rbx
movb %cl, 0xe(%rsp)
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0xd62c4
movl $0x0... | /ggerganov[P]llama/common/chat.cpp |
common_chat_params_init_mistral_nemo(minja::chat_template const&, templates_params const&) | static common_chat_params common_chat_params_init_mistral_nemo(const common_chat_template & tmpl, const struct templates_params & inputs) {
common_chat_params data;
data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_REQUIRED;
data.grammar = build_grammar([&](const common_grammar_builder & bui... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
mov... | /ggerganov[P]llama/common/chat.cpp |
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<... | static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) {
std::map<std::string, size_t> named_positions;
for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i;
re... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq 0xc0(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x8(%rdx), %r... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool) | static std::string strip(const std::string & s, const std::string & chars = "", bool left = true, bool right = true) {
auto charset = chars.empty() ? " \t\n\r" : chars;
auto start = left ? s.find_first_not_of(charset) : 0;
if (start == std::string::npos) return "";
auto end = right ? s.find_last_not_of(charset)... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r9d, %ebp
movl %r8d, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
testq %rcx, %rcx
je 0xc3ad1
addq %rdx, %rcx
movq %rsp, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x2c96e
jmp 0xc3ae7
leaq 0x82591(%rip), ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return s... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, 0x38(%rsp)
movq (%rsi), %rsi
movq 0x8(%r14), %rax
testq %rdx, %rdx
je 0xc3bec
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %edx, %edx
cmpb $0xa, (%rsi,%rcx)
sete %dl
addq %rdx... | /ggerganov[P]llama/common/minja/minja.hpp |
expect_tool_parameters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, st... | static void expect_tool_parameters(const std::string & name, const json & parameters, const std::vector<std::string> & expected_properties) {
if (!parameters.is_object() || !parameters.contains("type") || parameters.at("type") != "object" || !parameters.contains("properties") || !parameters.contains("required")) {
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x60(%rsp)
cmpb $0x1, (%rsi)
jne 0xce98f
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x697bc(%rip), %rsi # 0x137dc7
movq %rbx, %rdi
callq 0xd4ebe
testb %al, %al
je 0xce98f
leaq 0x697a5(%rip), %rsi # ... | /ggerganov[P]llama/common/chat.cpp |
parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_a... | static bool parse_json(std::string::const_iterator & it, const std::string::const_iterator & end, json & out) {
// // https://json.nlohmann.me/features/parsing/sax_interface/
struct json_error_locator : public nlohmann::json_sax<json> {
std::size_t position;
bool found_error;
json_error... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rdx, 0x1b8(%rsp)
movq %rsi, %rcx
leaq 0xbcb8b(%rip), %rax # 0x18e380
movq %rax, 0x88(%rsp)
movq $0x0, 0x90(%rsp)
movb $0x0, 0x98(%rsp)
movq %rdi, 0xe0(%rsp)
movq (%rdi), %rsi
movq %rcx, 0x1b0(%rsp)
mov... | /ggerganov[P]llama/common/chat.cpp |
handle_think_tag_prelude(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, std::function<common_chat_msg (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&) | static common_chat_msg handle_think_tag_prelude(const std::string & input, bool extract_reasoning, const std::function<common_chat_msg(const std::string &)> & rest_parser) {
std::smatch match;
static const std::regex reasoning_content_regex("((?:<think>)?([\\s\\S\\r\\n]*?)</think>)?([\\s\\S\\r\\n]*)");
if (... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp # imm = 0x200
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movb 0xbea2e(%rip), %al # 0x191528
testb %al, %al
je 0xd2daa
movq (%r15), %rdi
movq 0x8(... | /ggerganov[P]llama/common/chat.cpp |
minja::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | static std::vector<std::string> split(const std::string & s, const std::string & sep) {
std::vector<std::string> result;
size_t start = 0;
size_t end = s.find(sep);
while (end != std::string::npos) {
result.push_back(s.substr(start, end - start));
start = end + sep.length();
end = s.find(sep, start)... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %ebp, %ebp
movq %r14, %rdi
xorl %edx, %edx
callq 0x237b0
cmpq $-0x1, %rax
je 0xd47a... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::capitalize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | static std::string capitalize(const std::string & s) {
if (s.empty()) return s;
auto result = s;
result[0] = std::toupper(result[0]);
return result;
} | pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
testq %rdx, %rdx
je 0xd4864
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2c96e
movq (%rbx), %rbx
movsbl (%rbx), %edi
callq 0x24c50
movb %al, (%rbx)
popq %rbx
retq
movq %rbx, %rdi
movq %rsi, %rdx
popq %rbx
jmp 0x2c96e
| /ggerganov[P]llama/common/minja/minja.hpp |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned c... | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xd4f89
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xd4f73
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24500
testl %eax, %eax
je 0xd4f68
addq $0x30, %rbx
movq 0x8... | /ggerganov[P]llama/common/json.hpp |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned c... | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xd5211
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xd51fb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24500
testl %eax, %eax
je 0xd51f0
addq $0x30, %rbx
movq 0x8... | /ggerganov[P]llama/common/json.hpp |
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::v... | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
... | movq (%rdi), %rax
testq %rax, %rax
je 0xd5447
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xd5438
cmpl $0x1, %eax
jne 0xd543f
addq $0x30, 0x8(%rdi)
jmp 0xd5443
addq $0x10, 0x10(%rdi)
jmp 0xd5443
incq 0x18(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0x6b499(%rip), %rdi # 0x1408e8
leaq 0x623d3(%rip), %rdx # 0x137829
le... | /ggerganov[P]llama/common/json.hpp |
minja::chat_template::add_system(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigne... | static nlohmann::ordered_json add_system(const nlohmann::ordered_json & messages, const std::string & system_prompt) {
json messages_with_system = messages;
if (!messages_with_system.empty() && messages_with_system[0].at("role") == "system") {
std::string existing_system = messages_with_sys... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rdx, %r14
movq %rdi, %rbx
callq 0xaea06
movzbl (%rbx), %eax
testl %eax, %eax
je 0xda5b5
cmpl $0x2, %eax
je 0xda445
cmpl $0x1, %eax
jne 0xda456
movq 0x8(%rbx), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je... | /ggerganov[P]llama/common/minja/chat-template.hpp |
minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::... | Value(const json & v) {
if (v.is_object()) {
auto object = std::make_shared<ObjectType>();
for (auto it = v.begin(); it != v.end(); ++it) {
(*object)[it.key()] = it.value();
}
object_ = std::move(object);
} else if (v.is_array()) {
auto array = std::make_shared<ArrayType>()... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r15
leaq 0x40(%rdi), %r14
movq $0x0, 0x48(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movq %rdi, (%rsp)
movb $0x0, 0x40(%rdi)
movq %r14, %rdi
movl $... | /ggerganov[P]llama/common/minja/minja.hpp |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned c... | reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0xe1b4e
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x23280
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0xaa84a
movb (%r14), %al... | /ggerganov[P]llama/common/json.hpp |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [13], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [1... | inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x238c0
movq %rax, %r13
addq 0x8(%r15), %r13
movq %r14, %rdi
callq 0x238c0... | /ggerganov[P]llama/common/json.hpp |
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::v... | iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
JSON_ASSERT(m_data.m_value.array != nullptr);
auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator);
m_data.m_value.array->insert(pos.m_it.array_iterator, std::fo... | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq $0x0, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%rdi)
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0xe23c7
movq %rsi, %r14
movq 0x10(%rdx), %rsi
movq %rsi, %r15
subq (%rdi), %r15
movq %rcx, %rdx
callq 0xe23... | /ggerganov[P]llama/common/json.hpp |
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double... | static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x5e888(%rip), %rsi # 0x141931
leaq 0x5e891(%rip), %rdx # 0x141941
leaq 0x28(%rsp), %rdi
callq 0x2cc94
leaq 0x48(%rsp), %rdi
leaq 0... | /ggerganov[P]llama/common/json.hpp |
minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const | void dump(std::ostringstream & out, int indent = -1, int level = 0, bool to_json = false) const {
auto print_indent = [&](int level) {
if (indent > 0) {
out << "\n";
for (int i = 0, n = level * indent; i < n; ++i) out << ' ';
}
};
auto print_sub_sep = [&]() {
out << ','... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %r13d
movl %ecx, %r14d
movl %edx, %r12d
movq %rsi, %rbx
xorl %ecx, %ecx
testl %r8d, %r8d
sete %sil
movq 0x10(%rdi), %r8
movq 0x20(%rdi), %rdx
movq %rdx, %rax
orq %r8, %rax
sete %r10b
movb 0x40(%rdi), %al
testb %al, %al
sete %r... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Value::dump_string(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char,... | static void dump_string(const json & primitive, std::ostringstream & out, char string_quote = '\'') {
if (!primitive.is_string()) throw std::runtime_error("Value is not a string: " + primitive.dump());
auto s = primitive.dump();
if (string_quote == '"' || s.find('\'') != std::string::npos) {
out << s;... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xe3e0d
movl %edx, %ebp
movq %rsi, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xd4b1a
cmpb $0x22, %bpl
je 0xe3d0d... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Value::to_bool() const | bool to_bool() const {
if (is_null()) return false;
if (is_boolean()) return get<bool>();
if (is_number()) return get<double>() != 0;
if (is_string()) return !get<std::string>().empty();
if (is_array()) return !empty();
return true;
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
cmpq $0x0, 0x20(%rdi)
movq 0x10(%rdi), %rax
movb 0x40(%rdi), %cl
jne 0xe3f3a
testq %rax, %rax
jne 0xe3f3a
testb %cl, %cl
jne 0xe3f3a
cmpq $0x0, 0x30(%rsi)
jne 0xe3f3a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
cmpb $0x4, %cl
jne 0xe3f... | /ggerganov[P]llama/common/minja/minja.hpp |
double minja::Value::get<double>() const | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xe411e
cmpq $0x0, 0x20(%r14)
jne 0xe411e
cmpq $0x0, 0x30(%r14)
jne 0xe411e
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe44ce
movsd (%rbx), %xmm0
addq $0x40, %rsp
popq %rbx
po... | /ggerganov[P]llama/common/minja/minja.hpp |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>() const | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0xe4227
cmpq $0x0, 0x20(%r14)
jne 0xe4227
cmpq $0x0, 0x30(%r14)
jne 0xe4227
movq %rdi, %rbx
addq $0x40, %r14
movq %r14, %rsi
callq 0xe45c0
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
call... | /ggerganov[P]llama/common/minja/minja.hpp |
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, s... | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0xe43b0
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x23880
movq %rax, %rbx
movq %r14, %rdi
callq 0xafdee
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x61a57(%rip),... | /ggerganov[P]llama/common/json.hpp |
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_se... | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0xe4516
cmpl $0x7, %eax
je 0xe450e
cmpl $0x6, %eax
jne 0xe4529
movsd 0x8(%r14), %xmm1
unpcklps 0x52688(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x52690(%rip), %xmm1 # 0x136b90
movapd %xmm1, %x... | /ggerganov[P]llama/common/json.hpp |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_ab... | const noexcept(noexcept(
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))
{
auto ret = ValueType();
JSONSerializer<ValueType>::from_json(*this, ret);
return ret;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rbx, %rsi
callq 0xe460d
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xe4605
movq (%r15), %rsi
incq %rsi
ca... | /ggerganov[P]llama/common/json.hpp |
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&) | Context(Value && values, const std::shared_ptr<Context> & parent = nullptr) : values_(std::move(values)), parent_(parent) {
if (!values_.is_object()) throw std::runtime_error("Context values must be an object: " + values_.dump());
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0xa9835(%rip), %rax # 0x18e520
addq $0x10, %rax
movq %rax, (%rdi)
movups %xmm0, 0x18(%rdi)
xorl %r13d, %r13d
movq %r13, 0x30(%rdi)
movups... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Context::get(minja::Value const&) | virtual Value get(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->get(key);
return Value();
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsi), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xe51d4
testb %al, %al
je 0xe5000
movq %r12, %rdi
movq %r14, %rsi
callq 0xe5420
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe2fa4
jmp 0xe5053
movq 0x68(%r15), %r... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Context::at(minja::Value const&) | virtual Value & at(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->at(key);
throw std::runtime_error("Undefined variable: " + key.dump());
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0xe51d4
testb %al, %al
je 0xe5097
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe5420
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0xe50b... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Value::at(minja::Value const&) | Value& at(const Value & index) {
if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
if (is_array()) return array_->at(index.get<int>());
if (is_object()) return object_->at(index.primitive_);
throw std::runtime_error("Value is not an array or object: " + dump());
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0xe54a7
cmpq $0x0, 0x20(%rsi)
jne 0xe54a7
cmpq $0x0, 0x30(%rsi)
jne 0xe54a7
movq 0x10(%r14), %rbx
testq %rbx, %rbx
je 0xe548d
movq %rsi, %rdi
callq 0xe5830
movslq %eax, %rsi
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx... | /ggerganov[P]llama/common/minja/minja.hpp |
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, s... | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
ca... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0xe5987
leaq 0x5f48c(%rip), %rcx # 0x144dec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0xe597c
movzbl 0x8(%r14), %eax
jmp 0xe597c
cvttsd2si 0x8(%r14), %eax
mo... | /ggerganov[P]llama/common/json.hpp |
long minja::Value::get<long>() const | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xe6d93
cmpq $0x0, 0x20(%r14)
jne 0xe6d93
cmpq $0x0, 0x30(%r14)
jne 0xe6d93
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe6e61
movq (%rbx), %rax
addq $0x40, %rsp
popq %rbx
popq... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Value::contains(char const*) const | bool contains(const char * key) const { return contains(std::string(key)); } | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x2bac6
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe6c02
movl %eax, %ebx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe77b6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x231e0
movl %ebx, %e... | /ggerganov[P]llama/common/minja/minja.hpp |
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::all... | const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
... | pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xe7922
movq %rdi, %rbx
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0xe7910
cmpl $0x2, %eax
jne 0xe7919
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0xe790a
leaq 0x30(%rbx), %rdi
callq 0xe7dc1
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
addq $0x30, %rbx
jmp 0xe791d
movq %rb... | /ggerganov[P]llama/common/json.hpp |
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::all... | ~iteration_proxy_value() = default; | pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
leaq 0x60(%rbx), %rax
cmpq %rax, %rdi
je 0xe79ac
movq (%rax), %rsi
incq %rsi
callq 0x231e0
movq 0x30(%rbx), %rdi
addq $0x40, %rbx
cmpq %rbx, %rdi
je 0xe79c5
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x231e0
popq %rbx
retq
nop
| /ggerganov[P]llama/common/json.hpp |
minja::ArgumentsValue::expectArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::pair<unsigned long, unsigned long> const&, std::pair<unsigned long, unsigned long> const&) | void expectArgs(const std::string & method_name, const std::pair<size_t, size_t> & pos_count, const std::pair<size_t, size_t> & kw_count) {
if (args.size() < pos_count.first || args.size() > pos_count.second || kwargs.size() < kw_count.first || kwargs.size() > kw_count.second) {
std::ostringstream out;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq 0x8(%rdi), %rcx
subq (%rdi), %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rax # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rax
cmpq (%rdx), %rax
jb 0xe9135
cmpq 0x8(%r... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, %r14
movq (%rdi), %rax
callq *(%rax)
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0xf2131
movq %rbx, %rdi
callq 0x23110
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq ... | /ggerganov[P]llama/common/minja/minja.hpp |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned c... | basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {} | pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xf52e4
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0xaa84a
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xaa84a
movq %r14, %rdi
xorl %esi, %esi
callq 0xa... | /ggerganov[P]llama/common/json.hpp |
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::a... | static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4be37(%rip), %rsi # 0x1418d0
leaq 0x4be3c(%rip), %rdx # 0x1418dc
leaq 0x28(%rsp), %rdi
callq 0x2cc94
leaq 0x48(%rsp), %rdi
leaq 0... | /ggerganov[P]llama/common/json.hpp |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned c... | void push_back(const typename object_t::value_type& val)
{
// push_back only works for null objects or objects
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0xf5c84
movb $0x1, (%r14)
movl $0x20, %edi
callq 0x23280
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0xaa84a
jmp 0xf5c89... | /ggerganov[P]llama/common/json.hpp |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_a... | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::cre... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xf6022
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xf6022
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x23880
movq %rax, %rbx
movq %r14, %rdi
callq 0xafdee
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x... | /ggerganov[P]llama/common/json.hpp |
minja::chat_template::chat_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | chat_template(const std::string & source, const std::string & bos_token, const std::string & eos_token)
: source_(source), bos_token_(bos_token), eos_token_(eos_token)
{
template_root_ = minja::Parser::parse(source_, {
/* .trim_blocks = */ true,
/* .lstrip_blocks = */ true,
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5f8, %rsp # imm = 0x5F8
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movb $0x0, 0x8(%rdi)
movq $0x0, (%rdi)
leaq 0x10(%rdi), %r13
leaq 0x20(%rdi), %r12
movq %r12, 0x10(%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
mov... | /ggerganov[P]llama/common/minja/chat-template.hpp |
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&) | static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) {
Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options);
auto tokens = parser.tokenize();
TemplateTokenIterator begin = tokens.begin();
auto it = begin;
... | pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %rdi
movq %rax, %rsi
callq 0x2c96e
movq $0x0, 0x20(%rsp)
movl $0x30, %edi
callq 0x23280
movabsq $0x100000001, %rcx # imm =... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<uns... | std::string try_raw_render(
const nlohmann::ordered_json & messages,
const nlohmann::ordered_json & tools,
bool add_generation_prompt,
const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const
{
try {
chat_template_inputs inputs;
i... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
xorl %r13d, %r13d
leaq 0x48(%rsp), %r14
movb %r13b, (%r14)
movq %r13, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0xaa84a
mov... | /ggerganov[P]llama/common/minja/chat-template.hpp |
minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&) | Parser(const std::shared_ptr<std::string>& template_str, const Options & options) : template_str(template_str), options(options) {
if (!template_str) throw std::runtime_error("Template string is null");
start = it = this->template_str->begin();
end = this->template_str->end();
} | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
testq %rax, %rax
je 0xff5d0
movq 0x909d6(%rip), %rcx # 0x18ff98
cmpb $0x0, (%rcx)
je 0xff5cc
incl 0x8(%rax)
jmp 0xff5d0
lock
incl 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::tokenize() | TemplateTokenVector tokenize() {
static std::regex comment_tok(R"(\{#([-~]?)([\s\S]*?)([-~]?)#\})");
static std::regex expr_open_regex(R"(\{\{([-~])?)");
static std::regex block_open_regex(R"(^\{%([-~])?\s*)");
static std::regex block_keyword_tok(R"((if|else|elif|endif|for|endfor|generation|endg... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movq %rsi, %r14
movq %rdi, 0x28(%rsp)
leaq 0x920a6(%rip), %rax # 0x191730
movb (%rax), %al
testb %al, %al
movq %rsi, 0x30(%rsp)
je 0x1011bd
leaq 0x920b8(%rip), %rax # 0x191758
movb (%rax), %al
testb %al,... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseTemplate(__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken, std::default_delete<minja::TemplateToken>> const*, std::vector<std::unique_ptr<minja::TemplateToken, std::default_delete<minja::TemplateToken>>, std::allocator<std::unique_ptr<minja::TemplateToken, std::default_delete<minja:... | std::shared_ptr<TemplateNode> parseTemplate(
const TemplateTokenIterator & begin,
TemplateTokenIterator & it,
const TemplateTokenIterator & end,
bool fully = false) const {
std::vector<std::shared_ptr<TemplateNode>> children;
while (it != end) {
const au... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r9d, 0xdc(%rsp)
movq %r8, %r12
movq %rcx, %r15
movq %rsi, 0x28(%rsp)
movq %rdi, 0xd0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movq $0x0, 0xc0(%rsp)
movq (%rcx), %rcx
cmpq (%r8), %rcx
je 0x102aae
movq %rdx, 0xa8(%rsp)
leaq ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling) | std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
movq %rsi, %rdi
movl %ecx, %esi
callq 0x1043e0
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x18(%r14), %rsi
movq 0x20(%r14), ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling) | std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match[0].length();
... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
movq %rsi, %rdi
movl %ecx, %esi
callq 0x1043e0
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
movq %r15, %rcx
x... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseVarNames[abi:cxx11]() | std::vector<std::string> parseVarNames() {
static std::regex varnames_regex(R"(((?:\w+)(?:\s*,\s*(?:\w+))*)\s*)");
std::vector<std::string> group;
if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names");
std::vector<std::string> varnames;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x8e3c2(%rip), %rax # 0x191b18
movb (%rax), %al
testb %al, %al
je 0x103951
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x8e380(%rip), %rdx... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling) | std::string consumeToken(const std::string & token, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
if (std::distance(it, end) >= (int64_t) token.size() && std::string(it, it + token.size()) == token) {
it += token.size();
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %r13
movq %rsi, %rdi
movl %ecx, %esi
callq 0x1043e0
movq 0x18(%r15), %rax
movq 0x20(%r15), %rsi
subq %rsi, %rax
movq 0x8(%r14), %rdx
cmpq %rdx, %rax
jl 0x103b7a
addq %rsi, ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseIdentifier() | std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr... | pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8df04(%rip), %rax # 0x191b40
movb (%rax), %al
testb %al, %al
je 0x103cfe
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x103c71
movq 0x8c335(%rip), %rcx # 0x18ff98
cmpb $0x0, (%... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseParameters[abi:cxx11]() | Expression::Parameters parseParameters() {
consumeSpaces();
if (consumeToken("(").empty()) throw std::runtime_error("Expected opening parenthesis in param list");
Expression::Parameters result;
while (it != end) {
if (!consumeToken(")").empty()) {
return res... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, 0x28(%rsp)
movq 0x18(%rsi), %rbx
movq 0x20(%rsi), %r15
cmpq %rbx, %r15
je 0x103dd9
movsbl (%r15), %edi
callq 0x241e0
testl %eax, %eax
je 0x103dd9
incq %r15
movq %r15, 0x20(%r14)
jmp 0x103dbe
leaq 0x40(%rsp), %r... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::CommentTemplateToken::~CommentTemplateToken() | CommentTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, loc, pre, post), text(t) {} | pushq %rbx
movq %rdi, %rbx
leaq 0x8a27b(%rip), %rax # 0x18e8d8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0x10467c
movq (%rax), %rsi
incq %rsi
callq 0x231e0
leaq 0x8a29d(%rip), %rax # 0x18e920
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::CommentTemplateToken::~CommentTemplateToken() | CommentTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, loc, pre, post), text(t) {} | pushq %rbx
movq %rdi, %rbx
leaq 0x8a231(%rip), %rax # 0x18e8d8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0x1046c6
movq (%rax), %rsi
incq %rsi
callq 0x231e0
leaq 0x8a253(%rip), %rax # 0x18e920
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseLogicalOr() | std::shared_ptr<Expression> parseLogicalOr() {
auto left = parseLogicalAnd();
if (!left) throw std::runtime_error("Expected left side of 'logical or' expression");
static std::regex or_tok(R"(or\b)");
auto location = get_location();
while (!consumeToken(or_tok).empty()) {
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x104b9c
cmpq $0x0, (%rbx)
je 0x1048b3
leaq 0x8d1c8(%rip), %rax # 0x191910
movb (%rax), %al
testb %al, %al
je 0x1048e5
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x28... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseIfExpression() | std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>> parseIfExpression() {
auto condition = parseLogicalOr();
if (!condition) throw std::runtime_error("Expected condition expression");
static std::regex else_tok(R"(else\b)");
std::shared_ptr<Expression> else_expr;
... | pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x10471e
cmpq $0x0, (%r15)
je 0x104a94
leaq 0x8d119(%rip), %rax # 0x191af0
movb (%rax), %al
testb %al, %al
je 0x104ac6
leaq 0x8d0e8(%rip), %rdx # 0x191ad0
leaq 0x10(%rsp), %rdi
movq %r14, %rsi... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseLogicalAnd() | std::shared_ptr<Expression> parseLogicalAnd() {
auto left = parseLogicalNot();
if (!left) throw std::runtime_error("Expected left side of 'logical and' expression");
static std::regex and_tok(R"(and\b)");
auto location = get_location();
while (!consumeToken(and_tok).empty()) {
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x104e2a
cmpq $0x0, (%rbx)
je 0x104d31
leaq 0x8cd72(%rip), %rax # 0x191938
movb (%rax), %al
testb %al, %al
je 0x104d63
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x28... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseLogicalCompare() | std::shared_ptr<Expression> parseLogicalCompare() {
auto left = parseStringConcat();
if (!left) throw std::runtime_error("Expected left side of 'logical compare' expression");
static std::regex compare_tok(R"(==|!=|<=?|>=?|in\b|is\b|not\s+in\b)");
static std::regex not_tok(R"(not\b)");
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r15
movq %rdi, 0x50(%rsp)
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x105d52
cmpq $0x0, (%rbx)
je 0x1054c9
leaq 0x8c92b(%rip), %rax # 0x191988
movb (%rax), %al
testb %al, %al
je 0x105500
leaq 0x8c942(%rip), %rax # 0... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op) | Expression(const Location & location) : location(location) {} | leaq 0x891f9(%rip), %rax # 0x18e9e0
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x105818
movq 0x8a78f(%rip), %r8 # 0x18ff98
cmpb $0x0, (%r8)
je 0x105814
incl 0x8(%rax)
jmp 0x105818
lock
incl 0x8(%rax)
movq 0x10(%rsi), ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("UnaryOpExpr.expr is null");
auto e = expr->evaluate(context);
switch (op) {
case Op::Plus: return e;
case Op::Minus: return -e;
case Op::LogicalNo... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x1059c2
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x105b1e
movl 0x30(%r14), %eax
cmpq $0x4, %rax
ja 0x105a12
leaq 0x3f621(%rip), %rcx # 0x144ea4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const | Value evaluate(const std::shared_ptr<Context> & context) const {
try {
return do_evaluate(context);
} catch (const std::exception & e) {
std::ostringstream out;
out << e.what();
if (location.source) out << error_location_suffix(*location.source, location.p... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
callq *(%rax)
movq %rbx, %rax
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x105c88
movq %rbx, %rdi
callq 0x23110
movq %rax, ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseStringConcat() | std::shared_ptr<Expression> parseStringConcat() {
auto left = parseMathPow();
if (!left) throw std::runtime_error("Expected left side of 'string concat' expression");
static std::regex concat_tok(R"(~(?!\}))");
if (!consumeToken(concat_tok).empty()) {
auto right = parseLogic... | pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x105fc6
cmpq $0x0, (%rbx)
je 0x105e96
leaq 0x8bc61(%rip), %rax # 0x1919d8
movb (%rax), %al
testb %al, %al
je 0x105ecd
leaq 0x8bc30(%rip), %rdx # 0x1919b8
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x103502
... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseMathPow() | std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_erro... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x106230
cmpq $0x0, (%rbx)
je 0x106182
leaq 0x30(%rsp), %rbp
leaq 0x20(%rsp), %r13
leaq 0x88f16(%rip), %rax # 0x18ef10
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movq %rbp, 0x20(%rsp)
movq %r13, %rdi... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseArray() | std::shared_ptr<Expression> parseArray() {
if (consumeToken("[").empty()) return nullptr;
std::vector<std::shared_ptr<Expression>> elements;
if (!consumeToken("]").empty()) {
return std::make_shared<ArrayExpr>(get_location(), std::move(elements));
}
auto first_expr =... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %r12
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x38b32(%rip), %rsi # 0x141c3c
leaq 0x38b2c(%rip), %rdx # 0x141c3d
movq %rsp, %rdi
callq 0x2cc94
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %r14, %... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseString[abi:cxx11]() | std::unique_ptr<std::string> parseString() {
auto doParse = [&](char quote) -> std::unique_ptr<std::string> {
if (it == end || *it != quote) return nullptr;
std::string result;
bool escape = false;
for (++it; it != end; ++it) {
if (escape) {
escape = false;
... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
movq 0x18(%rsi), %r12
movq 0x20(%rsi), %r15
cmpq %r12, %r15
je 0x109c00
movq %rsi, %r14
movsbl (%r15), %edi
callq 0x241e0
testl %eax, %eax
je 0x109c00
incq %r15
movq %r15, 0x20(%r14)
cmpq %r12, %r15
jne 0x109be7
cmpq %r12, %r15
je ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&) | json parseNumber(CharIterator& it, const CharIterator& end) {
auto before = it;
consumeSpaces();
auto start = it;
bool hasDecimal = false;
bool hasExponent = false;
if (it != end && (*it == '-' || *it == '+')) ++it;
while (it != end) {
if (std::isdigit... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdx), %r9
movq 0x18(%rsi), %rbp
movq 0x20(%rsi), %r13
movq %r9, %rsi
cmpq %rbp, %r13
je 0x109ca6
movq %rbx, 0x8(%rsp)
movq %r9, %rbx
movsbl (%r13), %edi
callq 0x241e0... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const | std::unique_ptr<std::string> parseString() {
auto doParse = [&](char quote) -> std::unique_ptr<std::string> {
if (it == end || *it != quote) return nullptr;
std::string result;
bool escape = false;
for (++it; it != end; ++it) {
if (escape) {
escape = false;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rsi), %r12
movq 0x18(%r12), %rcx
movq 0x20(%r12), %rax
cmpq %rcx, %rax
je 0x10a191
movl %edx, %ebp
cmpb %bpl, (%rax)
jne 0x10a191
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&) | LiteralExpr(const Location & loc, const Value& v)
: Expression(loc), value(v) {} | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x842d3(%rip), %r15 # 0x18e9e0
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x10a73d
movq 0x85869(%rip), %rcx # 0x18ff98
cmpb $0x0, (%rcx)
je 0x10a739
incl 0x8(%rax)
... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::object();
for (const auto& [key, value] : elements) {
if (!key) throw std::runtime_error("Dict key is null");
if (!value) throw std::runtime_error("Dict value is null");
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x30, %edi
callq 0x23280
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x83681(%rip), %rcx # 0x18e430
addq $0x10, %rcx
movq %rcx, (%rax)
leaq 0x10(... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::SliceExpr::~SliceExpr() | SliceExpr(const Location & loc, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e)
: Expression(loc), start(std::move(s)), end(std::move(e)) {} | pushq %rbx
movq %rdi, %rbx
leaq 0x83783(%rip), %rax # 0x18ec70
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x10b502
callq 0x5a2e4
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x10b510
callq 0x5a2e4
leaq 0x834c9(%rip), %rax # 0x18e9e0
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rb... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) | Expression(const Location & location) : location(location) {} | leaq 0x83329(%rip), %rax # 0x18e9e0
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x10b6e8
movq 0x848bf(%rip), %r8 # 0x18ff98
cmpb $0x0, (%r8)
je 0x10b6e4
incl 0x8(%rax)
jmp 0x10b6e8
lock
incl 0x8(%rax)
movq 0x10(%rsi), ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::SubscriptExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!base) throw std::runtime_error("SubscriptExpr.base is null");
if (!index) throw std::runtime_error("SubscriptExpr.index is null");
auto target_value = base->evaluate(context);
if (auto slice = dynamic_cast<... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %rsi, %r14
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x10bbae
cmpq $0x0, 0x30(%r14)
je 0x10bbcc
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x90(%rsp), %rdi
callq 0x105b1e
movq 0x30(%r14), %r13
testq %r13, %r13
je... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Value::pop(minja::Value const&) | Value pop(const Value& index) {
if (is_array()) {
if (array_->empty())
throw std::runtime_error("pop from empty list");
if (index.is_null()) {
auto ret = array_->back();
array_->pop_back();
return ret;
} else if (!index.is_number_integer()) {
throw std::runt... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %rbp
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x10e7f1
movq 0x8(%rax), %rsi
cmpq %rsi, (%rax)
je 0x10e8ff
cmpq $0x0, 0x20(%rbx)
movb 0x40(%rbx), %al
jne 0x10e856
cmpq $0x0, 0x10(%rbx)
jne 0x10e... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Value::insert(unsigned long, minja::Value const&) | void insert(size_t index, const Value& v) {
if (!array_)
throw std::runtime_error("Value is not an array: " + dump());
array_->insert(array_->begin() + index, v);
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x10ebd2
leaq (%rsi,%rsi,4), %rsi
shlq $0x4, %rsi
addq (%rdi), %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x10f9bc
movl $0x10, %edi
callq 0x23880
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Value::for_each(std::function<void (minja::Value&)> const&) const | void for_each(const std::function<void(Value &)> & callback) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (array_) {
for (auto& item : *array_) {
callback(item);
}
} else if (object_) {
for (auto & item : *object_) {
Value key(it... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rcx
movq 0x20(%rdi), %rax
movb 0x40(%rdi), %dl
testq %rax, %rax
jne 0x10ecdb
testq %rcx, %rcx
jne 0x10ecdb
testb %dl, %dl
jne 0x10ecdb
cmpq $0x0, 0x30(%r15)
je 0x10ef44
testq %rcx, %rcx
j... | /ggerganov[P]llama/common/minja/minja.hpp |
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<... | iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delet... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq %rdx, %rsi
je 0x10f645
movq %rdx, %r12
movq %rdi, %r14
movq %rdx, %rbp
subq %rbx, %rbp
sarq $0x5, %rbp
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbp
movq (%rdi), %rax
movq %rax, (%rsp)
movq... | /ggerganov[P]llama/common/json.hpp |
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&) | Expression(const Location & location) : location(location) {} | leaq 0x7ed4b(%rip), %rax # 0x18e9e0
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x10fcc6
movq 0x802e1(%rip), %r8 # 0x18ff98
cmpb $0x0, (%r8)
je 0x10fcc2
incl 0x8(%rax)
jmp 0x10fcc6
lock
incl 0x8(%rax)
movq 0x10(%rsi), ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!object) throw std::runtime_error("CallExpr.object is null");
auto obj = object->evaluate(context);
if (!obj.is_callable()) {
throw std::runtime_error("Object is not callable: " + obj.dump(2));
}
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x10fe26
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x105b1e
cmpq $0x0, 0x30(%r12)
je 0x10fe58
addq $0x30, %r15
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %r... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op) | Expression(const Location & location) : location(location) {} | leaq 0x7e199(%rip), %rax # 0x18e9e0
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x110878
movq 0x7f72f(%rip), %r9 # 0x18ff98
cmpb $0x0, (%r9)
je 0x110874
incl 0x8(%rax)
jmp 0x110878
lock
incl 0x8(%rax)
movq 0x10(%rsi), ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::ExpressionTemplateToken::~ExpressionTemplateToken() | ExpressionTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && e) : TemplateToken(Type::Expression, loc, pre, post), expr(std::move(e)) {} | pushq %rbx
movq %rdi, %rbx
leaq 0x7ca71(%rip), %rax # 0x18f040
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x1125e4
callq 0x5a2e4
leaq 0x7c335(%rip), %rax # 0x18e920
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x112601
popq %rbx
jmp 0x5a2e4
popq ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::ElifTemplateToken::~ElifTemplateToken() | ElifTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, loc, pre, post), condition(std::move(c)) {} | pushq %rbx
movq %rdi, %rbx
leaq 0x7c9cd(%rip), %rax # 0x18f0b0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x1126f8
callq 0x5a2e4
leaq 0x7c221(%rip), %rax # 0x18e920
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x112715
popq %rbx
jmp 0x5a2e4
popq ... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::TextTemplateToken::TextTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | TextTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Text, loc, pre, post), text(t) {} | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x7b49f(%rip), %r15 # 0x18e920
addq $0x10, %r15
movq %r15, (%rdi)
movl $0x0, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0x1134b8
movq 0x7caee(%rip), %rdi # 0x18ff98
cmpb $0x0, (%rdi)
je 0x... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::TextTemplateToken::~TextTemplateToken() | TextTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Text, loc, pre, post), text(t) {} | pushq %rbx
movq %rdi, %rbx
leaq 0x7bf1b(%rip), %rax # 0x18f438
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0x11353c
movq (%rax), %rsi
incq %rsi
callq 0x231e0
leaq 0x7b3dd(%rip), %rax # 0x18e920
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::TextTemplateToken::~TextTemplateToken() | TextTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Text, loc, pre, post), text(t) {} | pushq %rbx
movq %rdi, %rbx
leaq 0x7bed1(%rip), %rax # 0x18f438
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0x113586
movq (%rax), %rsi
incq %rsi
callq 0x231e0
leaq 0x7b393(%rip), %rax # 0x18e920
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %... | /ggerganov[P]llama/common/minja/minja.hpp |
minja::Parser::unexpected(minja::TemplateToken const&) const | std::runtime_error unexpected(const TemplateToken & token) const {
return std::runtime_error("Unexpected " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x114186
leaq 0x34968(%rip), %rcx # 0x14857c
movl $0xb, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x232b0
leaq 0x38(%rsp), %r... | /ggerganov[P]llama/common/minja/minja.hpp |
set_process_priority(ggml_sched_priority) | bool set_process_priority(enum ggml_sched_priority prio) {
if (prio == GGML_SCHED_PRIO_NORMAL) {
return true;
}
int p = 0;
switch (prio) {
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
case GGML_SCHED_PRIO_HIGH: p = -10... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x3, %edi
ja 0x11aadd
movl %ebx, %eax
leaq 0x2fb9e(%rip), %rcx # 0x14a658
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, %bpl
jmp 0x11ab33
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
jmp 0x11aadf
movl $0xffffffec, %ed... | /ggerganov[P]llama/common/common.cpp |
postprocess_cpu_params(cpu_params&, cpu_params const*) | void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) {
int32_t n_set = 0;
if (cpuparams.n_threads < 0) {
// Assuming everything about cpuparams is invalid
if (role_model != nullptr) {
cpuparams = *role_model;
} else {
cpuparams.n_threa... | pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jns 0x11ab66
testq %rsi, %rsi
je 0x11ab5f
movl $0x214, %edx # imm = 0x214
movq %rbx, %rdi
callq 0x23140
jmp 0x11ab66
callq 0x11a952
movl %eax, (%rbx)
pxor %xmm1, %xmm1
movl $0x4, %eax
pxor %xmm0, %xmm0
movd (%rbx,%rax), %xmm2
punpcklbw %xmm1,... | /ggerganov[P]llama/common/common.cpp |
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x2d, %esi
xorl %edx, %edx
callq 0x24920
movq %rax, %r12
testq %rax, %rax
je 0x11ac36
cmpq $-0x1, %r12
jne 0x11ac43
leaq 0x77184(%rip), %rax # 0x191da0
cmpl $0x0, (%rax)
js 0x11adf4
callq 0x131c0... | /ggerganov[P]llama/common/common.cpp |
common_params_get_system_info[abi:cxx11](common_params const&) | std::string common_params_get_system_info(const common_params & params) {
std::ostringstream os;
os << "system_info: n_threads = " << params.cpuparams.n_threads;
if (params.cpuparams_batch.n_threads != -1) {
os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")";
}
#if defined(... | pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x24620
leaq 0x2f7b1(%rip), %rsi # 0x14a81e
movl $0x19, %edx
movq %r15, %rdi
callq 0x246d0
movl 0x274(%r14), %esi
leaq 0x8(%rsp), %rdi
callq 0x23660
cmpl $-0x1, 0x48... | /ggerganov[P]llama/common/common.cpp |
common_sampler_accept(common_sampler*, int, bool) | void common_sampler_accept(struct common_sampler * gsmpl, llama_token token, bool accept_grammar) {
if (accept_grammar) {
llama_sampler_accept(gsmpl->grmr, token);
}
llama_sampler_accept(gsmpl->chain, token);
gsmpl->prev.push_back(token);
} | pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testl %edx, %edx
je 0x1339eb
movq 0x120(%rbx), %rdi
movl %ebp, %esi
callq 0x24850
movq 0x128(%rbx), %rdi
movl %ebp, %esi
callq 0x24850
movq 0x130(%rbx), %rcx
movq 0x138(%rbx), %rsi
cmpq %rcx, %rsi
jne 0x133a24
movq 0x140(%rbx), %rax
incq %rax
xorl %edx, %... | /ggerganov[P]llama/common/sampling.cpp |
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.