Add EXAONE MoE implementations#18543
Conversation
Co-authored-by: Junwon Hwang <nuclear1221@gmail.com>
|
Do we really need a new chat format here? Seems like the standard tool calling format with JSON and |
|
@pwilkin Could you clarify which part you’re referring to? What I intended here was to combine the reasoning parser from |
|
@CISC I’m working on implementing the MTP logic (it seems to be preserved but not actually used yet, right?). Is there a recommended or proper way to load and use the base model’s |
This comment was marked as resolved.
This comment was marked as resolved.
Okay, it might be that you're right (I was sure there was another model with standard Hermes toolcalling + reasoning, but maybe not). |
|
I tested your suggestion encountered the following errors:
the error log is as below:
the error log is as below: Is there any point I'm missing? |
|
@nuxlear haven't checked the entire code, but you might've forgotten to add the default ops for those tensor types to |
|
@pwilkin Thank you for your attention. It seems they are already added to |
|
Ah, sorry, I missed that you're double-tapping those tensors. In this case, you want to use |
|
Here's some sample snippet for a similar case from existing code: tok_embd = create_tensor(tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, 0);
// output
output_norm = create_tensor(tn(LLM_TENSOR_OUTPUT_NORM, "weight"), {n_embd}, 0);
output = create_tensor(tn(LLM_TENSOR_OUTPUT, "weight"), {n_embd, n_vocab}, TENSOR_NOT_REQUIRED);
// if output is NULL, init from the input tok embed
if (output == NULL) {
output = create_tensor(tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, TENSOR_DUPLICATED);
} |
|
Although I use the code below, the GGML_ASSERT(buffer) error raised. |
|
Ok, I think we can merge after CI, can someone do a last verification that conversion and inference is working in the meantime? |
Convert unfortunately fails with the following error on latest master: |
Hmmm, that sounds strange, it should not be a problem... |
|
The problem is that the HF checkpoint (https://huggingface.co/LGAI-EXAONE/K-EXAONE-236B-A23B) includes MTP weights, while Two options are available:
I think option 2 is better. |
Or, you know, update your config: :) llama.cpp/convert_hf_to_gguf.py Lines 8777 to 8778 in 60591f0 |
|
Yes, there is a third option, however, the mismatch between llama.cpp/convert_hf_to_gguf.py Line 8760 in 60591f0 and llama.cpp/convert_hf_to_gguf.py Lines 8775 to 8779 in 60591f0 still remains, so one of them should be fixed. Regardless of this, we will add |
Yes, definitely, please submit a PR, I suggest setting default to 0 as the safer solution. |
|
After adding |
OK, my bad, I didn't notice that And I forgot to ensure that this wasn't Line 1954 in 60591f0 @nuxlear Can you please restore |
|
@nicoboss Merged fix, requires updated |
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
|
Thank you all so much for quickly fixing this issue. I can confirm that after getting latest master, latest model and adding |
This is normal. |
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
* Add EXAONE MoE implementations Co-authored-by: Junwon Hwang <nuclear1221@gmail.com> * Address PR feedback * Address PR feedback * [WIP] Add MTP for EXAONE-MoE * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: LG-AI-EXAONE <exaonemodels@lgresearch.ai>
Make sure to read the contributing guidelines before submitting a PR
Add EXAONE-MoE architecture for the K-EXAONE model released by LG AI Research.
This PR adds the modeling code of EXAONE-MoE (K-EXAONE), and its chat template with according parsers, which is available at the fork of the LG AI Research:
https://github.com/Aim-Highest/llama.cpp