handle stablecode-completion-alpha-3b
This commit is contained in:
parent
90058d96b0
commit
3a7853d259
1 changed files with 26 additions and 18 deletions
|
@ -133,11 +133,18 @@ void print_tok_vec(std::vector<float> &embd)
|
|||
else if(vocabsiz==50257 || (vocabsiz>=49152&&vocabsiz<=49157)) //49152-6 is starcoder
|
||||
{
|
||||
fileformat = FileFormat::GPT2_1;
|
||||
uint32_t temp;
|
||||
fin.read((char *)&temp, sizeof(temp)); //ctx
|
||||
fin.read((char *)&temp, sizeof(temp)); //n_embd
|
||||
fin.read((char *)&temp, sizeof(temp)); //n_head
|
||||
uint32_t temp, v1,v2,v3;
|
||||
fin.read((char *)&v1, sizeof(temp)); //ctx
|
||||
fin.read((char *)&v2, sizeof(temp)); //n_embd
|
||||
fin.read((char *)&v3, sizeof(temp)); //n_head
|
||||
fin.read((char *)&temp, sizeof(temp)); //n_layer
|
||||
if(vocabsiz==49152 && v1==4096 && v2==2560 && v3==32 && temp==32)
|
||||
{
|
||||
//special case, Stablecode Completion Alpha 3B
|
||||
fileformat = FileFormat::NEOX_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
fin.read((char *)&temp, sizeof(temp)); //f16
|
||||
const int32_t qntvr = temp / 1000;
|
||||
temp %= 1000;
|
||||
|
@ -157,6 +164,7 @@ void print_tok_vec(std::vector<float> &embd)
|
|||
fileformat = FileFormat::GPT2_2; //quantized format cannot be legacy type
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(vocabsiz < 31998 || vocabsiz > 33000)
|
||||
{
|
||||
//anything outside the llama v1 range is assumed to be NeoX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue