mmnga commited on
Commit
93bf4a6
·
verified ·
1 Parent(s): c79e08f

Add llama.cpp usage instructions

Browse files
Files changed (2) hide show
  1. README-jp.md +22 -5
  2. README.md +22 -5
README-jp.md CHANGED
@@ -69,15 +69,32 @@ Width50では、`ffn_gate_exps.weight`、`ffn_up_exps.weight`、`ffn_down_exps.w
69
 
70
  使用するフォルダの先頭shardを読み込んでください。
71
 
72
- ## 実行環境
73
 
74
- Kimi-K3 sliced-expert対応を含むllama.cppが必要です。
75
 
76
- このモデルはTop-16での使用を想定しています。メタデータを上書きする場合は次を指定してください。
 
 
 
 
77
 
78
- ```text
79
- --override-kv kimi-k3.expert_used_count=int:16
 
 
 
 
 
 
 
 
 
 
 
80
  ```
81
 
 
 
82
  強く削減した実験モデルのため、元のKimi-K3とは品質や安定性が異なる場合があります。
83
 
 
69
 
70
  使用するフォルダの先頭shardを読み込んでください。
71
 
72
+ ## 使い方
73
 
74
+ llama.cppの[Kimi-K3 Width対応ブランチ](https://github.com/mmnga/llama.cpp/tree/kimi-k3-width-support)を使用します。
75
 
76
+ ```bash
77
+ git clone --branch kimi-k3-width-support https://github.com/mmnga/llama.cpp
78
+ cmake -S llama.cpp -B llama.cpp/build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release
79
+ cmake --build llama.cpp/build -j --target llama-server
80
+ ```
81
 
82
+ `UD-IQ1_S`を使う例です。
83
+
84
+ ```bash
85
+ ./llama.cpp/build/bin/llama-server \
86
+ -m ./UD-IQ1_S/Kimi-K3-UD-IQ1_S-00001-of-00014.gguf \
87
+ -ot ".*.ffn_.*_exps.*=CPU" \
88
+ -ngl 45 \
89
+ --ctx-size 8192 \
90
+ --flash-attn on \
91
+ --jinja \
92
+ --override-kv kimi-k3.expert_shared_count=int:2 \
93
+ --override-kv kimi-k3.expert_shared_feed_forward_length=int:6144 \
94
+ --override-kv kimi-k3.expert_used_count=int:16
95
  ```
96
 
97
+ この例はrouted expertsをCPUに置き、32 GBのRTX 5090で動作確認しています。使用可能なVRAMとRAMに合わせて`-ngl`とcontext sizeを調整してください。別の量子化を使う場合も、そのフォルダの先頭shardを指定します。
98
+
99
  強く削減した実験モデルのため、元のKimi-K3とは品質や安定性が異なる場合があります。
100
 
README.md CHANGED
@@ -83,15 +83,32 @@ All other tensor data is unchanged. The shared expert metadata is represented as
83
 
84
  Load the first shard in the selected folder.
85
 
86
- ## Runtime
87
 
88
- A llama.cpp build with Kimi-K3 sliced-expert support is required.
89
 
90
- This build is intended for Top-16 routing. If overriding the metadata, use:
 
 
 
 
91
 
92
- ```text
93
- --override-kv kimi-k3.expert_used_count=int:16
 
 
 
 
 
 
 
 
 
 
 
94
  ```
95
 
 
 
96
  This is a heavily reduced experimental model. Quality and stability may differ from the original Kimi-K3.
97
 
 
83
 
84
  Load the first shard in the selected folder.
85
 
86
+ ## Usage
87
 
88
+ Use the [Kimi-K3 Width support branch](https://github.com/mmnga/llama.cpp/tree/kimi-k3-width-support) of llama.cpp.
89
 
90
+ ```bash
91
+ git clone --branch kimi-k3-width-support https://github.com/mmnga/llama.cpp
92
+ cmake -S llama.cpp -B llama.cpp/build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release
93
+ cmake --build llama.cpp/build -j --target llama-server
94
+ ```
95
 
96
+ Example using `UD-IQ1_S`:
97
+
98
+ ```bash
99
+ ./llama.cpp/build/bin/llama-server \
100
+ -m ./UD-IQ1_S/Kimi-K3-UD-IQ1_S-00001-of-00014.gguf \
101
+ -ot ".*.ffn_.*_exps.*=CPU" \
102
+ -ngl 45 \
103
+ --ctx-size 8192 \
104
+ --flash-attn on \
105
+ --jinja \
106
+ --override-kv kimi-k3.expert_shared_count=int:2 \
107
+ --override-kv kimi-k3.expert_shared_feed_forward_length=int:6144 \
108
+ --override-kv kimi-k3.expert_used_count=int:16
109
  ```
110
 
111
+ The example was tested with a 32 GB RTX 5090 while keeping routed experts on the CPU. Adjust `-ngl` and context size for your available VRAM and RAM. Load the first shard when using another quantization folder.
112
+
113
  This is a heavily reduced experimental model. Quality and stability may differ from the original Kimi-K3.
114