ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
Loading...
Searching...
No Matches
kv_quant.h File Reference
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <stdexcept>
#include <string>
Include dependency graph for kv_quant.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ember_kvq
 

Enumerations

enum  ember_kvq::Format : int { ember_kvq::kF32 = 0 , ember_kvq::kF16 = 1 , ember_kvq::kQ8 = 2 , ember_kvq::kQ4 = 3 }
 

Functions

Format ember_kvq::parse_format (const char *s)
 
const char * ember_kvq::format_name (int f)
 
size_t ember_kvq::data_bytes (int f, size_t row)
 
size_t ember_kvq::scale_bytes (int f, size_t row)
 
std::string ember_kvq::shape_error (int f, int head_dim)
 
uint16_t ember_kvq::f32_to_f16 (float x)
 
float ember_kvq::f16_to_f32 (uint16_t h)
 
void ember_kvq::roundtrip_block (int f, float *x)
 
void ember_kvq::roundtrip_rows (int f, float *x, size_t rows, size_t row)
 

Variables

constexpr int ember_kvq::kBlock = 32