spb-wd commited on
Commit
fea50ed
·
verified ·
1 Parent(s): 04e1ac9

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md CHANGED
@@ -68,6 +68,42 @@ llama-cli -m qwen2.5-coder-7b-instruct-Q4_K_M-worthdoing.gguf -p "Your prompt he
68
  2. Open LM Studio -> My Models -> Import
69
  3. Select the GGUF file and start chatting
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  ## Recommended Hardware
72
 
73
  | Quant | Min RAM | Recommended |
 
68
  2. Open LM Studio -> My Models -> Import
69
  3. Select the GGUF file and start chatting
70
 
71
+ ## Quantization Method
72
+
73
+ Our quantization pipeline (**corelm-model v1.0**) follows a rigorous multi-step process to ensure maximum quality and compatibility:
74
+
75
+ ### Step 1 — Download & Validation
76
+ - Model weights are downloaded from HuggingFace Hub in **SafeTensors** format (`.safetensors`)
77
+ - Legacy formats (`.bin`, `.pt`) are excluded to ensure clean, verified weights
78
+ - Tokenizer, configuration, and all metadata are preserved
79
+
80
+ ### Step 2 — Conversion to GGUF F16 Baseline
81
+ - The original model is converted to **GGUF format at FP16 precision** using `convert_hf_to_gguf.py` from [llama.cpp](https://github.com/ggml-org/llama.cpp)
82
+ - This lossless baseline preserves the full original model quality
83
+ - Architecture-specific tensors (attention, FFN, embeddings, MoE routing) are mapped to their GGUF equivalents
84
+
85
+ ### Step 3 — K-Quant Quantization
86
+ - The F16 baseline is quantized using `llama-quantize` with **k-quant methods**
87
+ - K-quants use a mixed-precision approach: more important layers (attention, output) retain higher precision, while less sensitive layers (FFN) are compressed more aggressively
88
+ - Each quantization level offers a different quality/size tradeoff:
89
+
90
+ | Method | Bits per Weight | Strategy |
91
+ |--------|----------------|----------|
92
+ | **Q4_K_M** | ~4.58 bpw | Mixed 4/5-bit. Attention & output layers use Q5_K, FFN layers use Q4_K. Best balance of quality and size. |
93
+ | **Q5_K_M** | ~5.33 bpw | Mixed 5/6-bit. Attention & output layers use Q6_K, FFN layers use Q5_K. Higher quality with moderate size increase. |
94
+ | **Q8_0** | ~7.96 bpw | Uniform 8-bit. All layers quantized to 8-bit. Near-lossless quality, largest file size. |
95
+
96
+ ### Step 4 — Metadata Injection
97
+ - Custom metadata is embedded directly in each GGUF file:
98
+ - `general.quantized_by`: worthdoing
99
+ - `general.quantization_version`: corelm-1.0
100
+ - This ensures full traceability and provenance of every quantized file
101
+
102
+ ### Tools & Environment
103
+ - **llama.cpp**: Used for both conversion and quantization — the industry-standard open-source LLM inference engine
104
+ - **Target platform**: Apple Silicon Macs (M1/M2/M3/M4) with Metal GPU acceleration
105
+ - **Inference runtimes**: Compatible with `llama.cpp`, `Ollama`, `LM Studio`, `koboldcpp`, and any GGUF-compatible runtime
106
+
107
  ## Recommended Hardware
108
 
109
  | Quant | Min RAM | Recommended |
Free AI Image Generator No sign-up. Instant results. Open Now