https://preview.redd.it/tblmrwxkbexg1.png?width=1193&format=png&auto=webp&s=6dea1e6684e75e22852d57c0c72e9171deb56ae2
手元のラップトップで、A5000 16GB GPUを使ってQwen3.6-27Bを動かす方法をいろいろ試しました。Unsloth imatrix を使って独自の IQ4_XS GGUF "qwen3.6-27b-IQ4_XS-pure.gguf" を作り、それを他の量子化(quant)と平均KLDで比較しました。
また、いくつか異なる turboquant のバージョンも試しました。buun-llama-cpp のフォーク のほうが、TheTom/llama-cpp-turboquant のフォーク より良いようです。
私のバージョンを試してみたい場合は、次の手順を行ってください:
- Huggingface から 私のGGUF をダウンロードします。これは、この投稿 をベースに改良されたチャットテンプレートがすでに含まれています
- https://github.com/spiritbuun/buun-llama-cpp から buun-llama-cpp をクローンします
- ビルドします。私は Windows で次を使いました:
cmake -B build -G Ninja -DGGML_CUDA=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl cmake --build build --config Release -j 16 - たとえば
nvidia-smi で GPU VRAM がすべて空いていることを確認します - 次のコマンドで実行します。私はこのコマンドを使いました:
build/bin/llama-server --model qwen3.6-27b-IQ4_XS-pure.gguf --alias qwen3.6-27b -np 1 -ctk turbo3_tcq -ctv turbo3_tcq -c 100000 --fit off -ngl 999 --no-mmap -fa on --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.0 - OpenCode で使うには、次の ~/.config/opencode/opencode.json ファイルを使用しています:
{ "$schema": "https://opencode.ai/config.json", "plugin": [ "opencode-anthropic-auth@latest", "opencode-copilot-auth@latest" ], "share": "disabled", "provider": { "llama.cpp": { "npm": "@ai-sdk/openai-compatible", "name": "llama.cpp (OpenAI Compatible)", "options": { "baseURL": "http://127.0.0.1:8080/v1", "apiKey": "1234" }, "models": { "qwen3.5-27b": { "name": "Qwen 3.5 27B", "interleaved": { "field": "reasoning_content" }, "limit": { "context": 100000, "output": 32000 }, "temperature": true, "reasoning": true, "attachment": false, "tool_call": true, "modalities": { "input": [ "text" ], "output": [ "text" ] }, "cost": { "input": 0, "output": 0, "cache_read": 0, "cache_write": 0 } } } }, "agent": { "code-reviewer": { "description": "ベストプラクティスと潜在的な問題についてコードをレビューします", "model": "llama.cpp/qwen3.5-27b", "prompt": "あなたはコードレビュアーです。セキュリティ、分かりやすさ、簡潔さ、保守性、パフォーマンスに注目してください。" }, "plan": { "model": "llama.cpp/qwen3.5-27b" } }, "model": "llama.cpp/qwen3.5-27b", "small_model": "llama.cpp/qwen3.5-27b" }{ "$schema": "https://opencode.ai/config.json", "plugin": [ "opencode-anthropic-auth@latest", "opencode-copilot-auth@latest" ], "share": "disabled", "provider": { "llama.cpp": { "npm": "@ai-sdk/openai-compatible", "name": "llama.cpp (OpenAI Compatible)", "options": { "baseURL": "http://127.0.0.1:8080/v1", "apiKey": "1234" }, "models": { "qwen3.5-27b": { "name": "Qwen 3.5 27B", "interleaved": { "field": "reasoning_content" }, "limit": { "context": 100000, "output": 32000 }, "temperature": true, "reasoning": true, "attachment": false, "tool_call": true, "modalities": { "input": [ "text" ], "output": [ "text" ] }, "cost": { "input": 0, "output": 0, "cache_read": 0, "cache_write": 0 } } } }, "agent": { "code-reviewer": { "description": "ベストプラクティスと潜在的な問題についてコードをレビューします", "model": "llama.cpp/qwen3.5-27b", "prompt": "あなたはコードレビュアーです。セキュリティ、分かりやすさ、簡潔さ、保守性、パフォーマンスに注目してください。" }, "plan": { "model": "llama.cpp/qwen3.5-27b" } }, "model": "llama.cpp/qwen3.5-27b", "small_model": "llama.cpp/qwen3.5-27b" }
最初の生成速度は約21 tokens/s、プロンプト処理は約550 tokens/s でしたが、その後はコンテキスト15kのところで約14 tokens/s(プロンプト処理485 tokens/s)まで下がります。
submitted by