|
ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
|
Classes | |
| class | DistributedCoordinator |
| Distributed coordinator for multi-node LLM inference. More... | |
| class | TinyLlamaSession |
| Represents an active TinyLlama session holding the loaded model and tokenizer. More... | |
| struct | TtftBreakdown |
| Where the time went between generate() being called and its first output token being emitted (docs/TTFT.md). More... | |
Functions | |
| static void | log_vector_summary_detailed (const std::string &name, const std::vector< float > &v, int current_pos, int current_layer, int N) |
| static std::string | read_file_api (const std::string &path) |
| static int | argmax (const std::vector< float > &v) |
| static std::vector< int > | prompt_lookup_draft (const std::vector< int > &h, int k) |
| static const ember_draft::DraftTable * | corpus_draft_table (int vocab_size) |
| static void | apply_repetition_penalty (std::vector< float > &logits, const std::vector< int > &generated, float penalty, size_t window=64) |
| template<class IsStop > | |
| static void | apply_contract_penalty (std::vector< float > &lg, const std::vector< int > &a, const std::vector< int > &b, float p, int last_n, IsStop is_stop, std::vector< char > &seen) |
| static void | debug_dump_topk (const std::vector< float > &logits) |
| static bool | logits_debug_on () |
| static int | sample_top_k_top_p_temperature (const std::vector< float > &logits, float temperature, int top_k, float top_p, std::mt19937 &rng) |
|
static |
Definition at line 170 of file api.cpp.
Referenced by tinyllama::TinyLlamaSession::generate(), and tinyllama::TinyLlamaSession::sample_step().
|
static |
Definition at line 152 of file api.cpp.
References id.
Referenced by tinyllama::TinyLlamaSession::generate().
Definition at line 84 of file api.cpp.
References Logger::error(), and v.
|
static |
Definition at line 109 of file api.cpp.
References ember_draft::DraftTable::entries(), Logger::info(), ember_draft::DraftTable::load(), ember_draft::DraftTable::orders(), Logger::warning(), and why.
Referenced by tinyllama::TinyLlamaSession::generate().
Definition at line 188 of file api.cpp.
References a.
Referenced by tinyllama::TinyLlamaSession::generate().
|
static |
Definition at line 43 of file api.cpp.
References Logger::info(), name, and v.
Referenced by tinyllama::TinyLlamaSession::generate().
Definition at line 216 of file api.cpp.
Referenced by tinyllama::TinyLlamaSession::generate().
|
static |
Definition at line 96 of file api.cpp.
Referenced by tinyllama::TinyLlamaSession::generate().
|
static |
Definition at line 222 of file api.cpp.
References scale.
Referenced by tinyllama::TinyLlamaSession::generate(), tinyllama::TinyLlamaSession::generate_batch(), and tinyllama::TinyLlamaSession::sample_step().