|
ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
|
Constants for BFloat16 number format handling. More...
Variables | |
| constexpr uint16_t | EXPONENT_MASK = 0x7F80 |
| constexpr uint16_t | MANTISSA_MASK = 0x007F |
| constexpr uint16_t | SIGN_BIT = 0x8000 |
| constexpr uint16_t | ZERO = 0x0000 |
| constexpr uint16_t | NEG_ZERO = 0x8000 |
| constexpr int | SHIFT_BITS = 16 |
Constants for BFloat16 number format handling.
BFloat16 is a 16-bit floating point format that uses 1 sign bit, 8 exponent bits, and 7 mantissa bits.
Mask for extracting exponent bits
Definition at line 22 of file model_constants.h.
Referenced by bfloat16_to_float32().
Mask for extracting mantissa bits
Definition at line 23 of file model_constants.h.
Referenced by bfloat16_to_float32().
Representation of negative zero
Definition at line 26 of file model_constants.h.
Referenced by bfloat16_to_float32().
Number of bits to shift for conversion
Definition at line 27 of file model_constants.h.
Referenced by bfloat16_to_float32().
Mask for extracting sign bit
Definition at line 24 of file model_constants.h.
Referenced by bfloat16_to_float32().
Representation of positive zero
Definition at line 25 of file model_constants.h.
Referenced by bfloat16_to_float32(), and TinyLlamaModel::initialize_gpu_and_rope().