recognize q8_0 as an older format as the new clblast doesnt work correctly with it

This commit is contained in:
Concedo 2023-05-14 11:06:23 +08:00
parent 49d6334dc1
commit 8a5fe628df
2 changed files with 13 additions and 5 deletions

View file

@ -146,9 +146,17 @@ void print_tok_vec(std::vector<float> &embd)
else if(magic == 0x67676a74) //v3 format ggjt
{
fileformat = FileFormat::GGJT_2; //ggjt by default
uint32_t temp;
fin.read((char *)&temp, sizeof(temp)); //file version
if(temp==1)
uint32_t ver, temp, ftype;
fin.read((char *)&ver, sizeof(ver)); //file version
fin.read((char *)&temp, sizeof(temp));//vocab
fin.read((char *)&temp, sizeof(temp)); //embd
fin.read((char *)&temp, sizeof(temp)); //mult
fin.read((char *)&temp, sizeof(temp));//head
fin.read((char *)&temp, sizeof(temp));//layer
fin.read((char *)&temp, sizeof(temp));//rot
fin.read((char *)&ftype, sizeof(ftype));//filetype
if(ver==1 || ftype==7) //q8 formats treat as old one
{
fileformat = FileFormat::GGJT;
}