mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 09:04:36 +00:00
integrated gpt2 support
This commit is contained in:
parent
52de932842
commit
14273fea7a
9 changed files with 926 additions and 30 deletions
|
@ -40,7 +40,27 @@ void print_tok_vec(std::vector<int> &embd)
|
|||
first = false;
|
||||
std::cout << i;
|
||||
}
|
||||
std::cout << "]";
|
||||
std::cout << "]\n";
|
||||
}
|
||||
void print_tok_vec(std::vector<float> &embd)
|
||||
{
|
||||
std::cout << "[";
|
||||
bool first = true;
|
||||
int n = 0;
|
||||
for (auto i : embd)
|
||||
{
|
||||
if (!first)
|
||||
{
|
||||
std::cout << ',';
|
||||
}
|
||||
first = false;
|
||||
std::cout << i;
|
||||
if(++n>20)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
std::cout << "]\n";
|
||||
}
|
||||
|
||||
//return val: 0=fail, 1=(original ggml, alpaca), 2=(ggmf), 3=(ggjt)
|
||||
|
@ -67,6 +87,10 @@ void print_tok_vec(std::vector<int> &embd)
|
|||
{
|
||||
fileformat = FileFormat::GPTJ1;
|
||||
}
|
||||
if(vocabsiz==50257)
|
||||
{
|
||||
fileformat = FileFormat::GPT2;
|
||||
}
|
||||
}
|
||||
else if(magic == 0x67676d66) //v2 format ggmf
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue