MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / init_quantize_state_counters

Function init_quantize_state_counters

src/llama-quant.cpp:837–851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835
836
837static void init_quantize_state_counters(quantize_state_impl & qs, std::vector<tensor_metadata> & metadata) {
838 for (auto & tm : metadata) {
839 tensor_category cat = tensor_get_category(tm.name);
840 tm.category = cat;
841
842 if (category_is_attn_v(cat)) {
843 ++qs.n_attention_wv;
844 }
845
846 if (cat == tensor_category::OUTPUT) {
847 qs.has_tied_embeddings = false;
848 }
849 }
850 qs.n_ffn_down = qs.n_ffn_gate = qs.n_ffn_up = (int)qs.model.hparams.n_layer;
851}
852
853//
854// main quantization driver

Callers 2

Calls 2

tensor_get_categoryFunction · 0.85
category_is_attn_vFunction · 0.85

Tested by

no test coverage detected