TinyLlama.cpp 1.0
A lightweight C++ implementation of the TinyLlama language model
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
api.cpp File Reference
#include "api.h"
#include "gguf_parser.h"
#include "model_macros.h"
#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <nlohmann/json.hpp>
#include <numeric>
#include <random>
#include <stdexcept>
#include <string>
#include <vector>
#include <iomanip>
#include <sstream>
#include "logger.h"
#include "model.h"
#include "safetensors_loader.h"
#include "tokenizer.h"
Include dependency graph for api.cpp:

Go to the source code of this file.

Namespaces

namespace  tinyllama
 

Macros

#define SAFE_SQRT(x)   detail::safe_sqrt(x)
 

Functions

static void tinyllama::log_vector_summary_detailed (const std::string &name, const std::vector< float > &v, int current_pos, int current_layer, int N)
 
static std::string tinyllama::read_file_api (const std::string &path)
 
static int tinyllama::argmax (const std::vector< float > &v)
 
static int tinyllama::sample_top_k_top_p_temperature (const std::vector< float > &logits, float temperature, int top_k, float top_p, std::mt19937 &rng)
 

Macro Definition Documentation

◆ SAFE_SQRT

#define SAFE_SQRT (   x)    detail::safe_sqrt(x)