llama : do not quantize pos embd and token type tensors
This commit is contained in:
parent
895407f31b
commit
ce730ad7e3
1 changed files with 5 additions and 1 deletions
|
@ -10444,7 +10444,11 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s
|
||||||
quantize &= !params->only_copy;
|
quantize &= !params->only_copy;
|
||||||
|
|
||||||
// do not quantize expert gating tensors
|
// do not quantize expert gating tensors
|
||||||
quantize &= name.find("ffn_gate_inp.weight") == std::string::npos;
|
quantize &= name != LLM_TN(model.arch)(LLM_TENSOR_FFN_GATE_INP, "weight");
|
||||||
|
|
||||||
|
// do not quantize positional embeddings and token types (BERT)
|
||||||
|
quantize &= name != LLM_TN(model.arch)(LLM_TENSOR_POS_EMBD, "weight");
|
||||||
|
quantize &= name != LLM_TN(model.arch)(LLM_TENSOR_TOKEN_TYPES, "weight");
|
||||||
|
|
||||||
enum ggml_type new_type;
|
enum ggml_type new_type;
|
||||||
void * new_data;
|
void * new_data;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue