compress: add cmath
This commit is contained in:
parent
da444fafd7
commit
d3df98d6ea
1 changed files with 1 additions and 12 deletions
|
@ -5,23 +5,13 @@
|
|||
#include "llama.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <bitset>
|
||||
#include <fstream>
|
||||
|
||||
int msb_log2(int x)
|
||||
{
|
||||
int ret = 0;
|
||||
while (x > 0)
|
||||
{
|
||||
ret++;
|
||||
x >>= 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int msB_log256(int x)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -92,7 +82,6 @@ std::vector<uint8_t> encode(llama_context *ctx, std::vector<llama_token> inp, gp
|
|||
gpt_sampler_sample(smpl, ctx, 0, true);
|
||||
}
|
||||
|
||||
// bit pack sample_ids
|
||||
std::vector<uint8_t> sample_ids_bitpacked;
|
||||
|
||||
int bit_offset = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue