mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
gpt oss harmony template
This commit is contained in:
parent
6eea7b88d2
commit
34487d3c02
5 changed files with 37 additions and 3 deletions
|
@ -61,7 +61,7 @@ add_compile_definitions(LOG_DISABLE_LOGS)
|
|||
add_compile_definitions(GGML_USE_CPU)
|
||||
add_compile_definitions(GGML_USE_CPU_REPACK)
|
||||
add_compile_definitions(NOMINMAX)
|
||||
add_compile_definitions(_REGEX_MAX_STACK_COUNT=80000)
|
||||
add_compile_definitions(_REGEX_MAX_STACK_COUNT=32000)
|
||||
|
||||
if (GGML_HIP_FORCE_ROCWMMA_FATTN_GFX12)
|
||||
add_compile_definitions(GGML_HIP_ROCWMMA_FATTN_GFX12)
|
||||
|
|
|
@ -2293,15 +2293,21 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in
|
|||
// std::string forced = "per_layer_token_embd.weight=CPU"; //this tensor on gpu is problematic on unsloth q4_0
|
||||
// tensoroverrides = (tensoroverrides=="" ? forced: (forced+","+tensoroverrides));
|
||||
// }
|
||||
if(tensoroverrides=="" && ggml_backend_dev_count()>1 && inputs.moecpu>0)
|
||||
if(ggml_backend_dev_count()>1 && inputs.moecpu>0)
|
||||
{
|
||||
std::string toadd = "";
|
||||
for (int i = 0; i < inputs.moecpu; ++i) {
|
||||
std::string tmp = string_format("blk\\.%d\\.ffn_(up|down|gate)_exps=CPU", i);
|
||||
if(i>0)
|
||||
{
|
||||
tmp = "," + tmp;
|
||||
}
|
||||
tensoroverrides += tmp;
|
||||
toadd += tmp;
|
||||
}
|
||||
if (tensoroverrides == "") {
|
||||
tensoroverrides = toadd;
|
||||
} else {
|
||||
tensoroverrides += "," + toadd;
|
||||
}
|
||||
printf("Overriding %d MoE layers to CPU...\n",inputs.moecpu);
|
||||
}
|
||||
|
|
|
@ -186,6 +186,17 @@
|
|||
"assistant_start": "<|response|>",
|
||||
"assistant_end": "<|endofresponse|>"
|
||||
}
|
||||
}, {
|
||||
"search": ["<|start|>user<|message|>", "<|channel|>", "<|end|>"],
|
||||
"name": "OpenAI Harmony",
|
||||
"adapter": {
|
||||
"system_start": "<|start|>system<|message|>",
|
||||
"system_end": "<|end|>\n",
|
||||
"user_start": "<|start|>user<|message|>",
|
||||
"user_end": "<|end|>\n",
|
||||
"assistant_start": "<|start|>assistant<|channel|>final<|message|>",
|
||||
"assistant_end": "<|return|>\n"
|
||||
}
|
||||
}, {
|
||||
"search": ["rwkv_", "'User: '"],
|
||||
"name": "RWKV World",
|
||||
|
|
8
kcpp_adapters/OpenAI-Harmony.json
Normal file
8
kcpp_adapters/OpenAI-Harmony.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"system_start": "<|start|>system<|message|>",
|
||||
"system_end": "<|end|>\n",
|
||||
"user_start": "<|start|>user<|message|>",
|
||||
"user_end": "<|end|>\n",
|
||||
"assistant_start": "<|start|>assistant<|channel|>final<|message|>",
|
||||
"assistant_end": "<|return|>\n"
|
||||
}
|
|
@ -3629,6 +3629,15 @@ Current version indicated by LITEVER below.
|
|||
"assistant_end":"",
|
||||
"system":"",
|
||||
"system_end":"",
|
||||
},
|
||||
{
|
||||
"name":"OpenAI Harmony",
|
||||
"user":"<|start|>user<|message|>",
|
||||
"user_end":"<|end|>\\n",
|
||||
"assistant":"<|start|>assistant<|channel|>final<|message|>",
|
||||
"assistant_end":"<|return|>\\n",
|
||||
"system":"<|start|>system<|message|>",
|
||||
"system_end":"<|end|>\\n",
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue