2026-02-20
skills
C言語 + テスト
インストール
LLM
Claude.icon============================
Qwen3 Swallowのラインナップは、3つの軸で整理すると分かりやすくなります。
1. モデルサイズ(ベースモデル)
8B — Qwen3-8B ベース。単一GPUで動く軽量モデル
30B-A3B — Mixture of Experts (MoE)。総パラメータ30Bだが推論時にアクティブなのは3Bだけなので、サイズの割に軽い
32B — Qwen3-32B ベース。最も高性能だがVRAMも最大
2. 学習段階(縦の進行度)
下から上に向かって学習が進んでいます。
CPT (Continual Pre-Training) — 日本語データで追加事前学習しただけ。指示に従う能力はまだ弱い。研究・実験向け
SFT (Supervised Fine-Tuning) — CPTの上に指示追従の教師あり学習を実施。会話はできるが最適化が甘い
RL (Reinforcement Learning) — SFTの上にさらに強化学習(GRPO等)を実施。これが完成版
つまり CPT → SFT → RL の順に仕上がっていて、普通に使うならRL版を選べばOKです。CPTとSFTは「試験版」と明記されている通り、学習プロセスの途中成果物です。
3. 量子化(推論コスト削減)
完全版(量子化なし) — フル精度。品質最高だがVRAM大
AWQ-INT4 — 4bit量子化の一方式。速度寄りの最適化
GPTQ-INT4 — 4bit量子化のもう一方式。互換性が広い
品質はほぼ同等で、使うフレームワーク(vLLM → AWQ、text-generation-webui → GPTQ など)に合わせて選ぶのが一般的です。
table:実用的な選び方
目的 おすすめ
手元のGPUで手軽に試したい 8B RL v0.2 (AWQ or GPTQ)
コスパ重視で賢いモデルが欲しい 30B-A3B RL v0.2(MoEで軽い)
最高性能 32B RL v0.2
学習パイプラインの研究 CPT/SFT版を比較
Q. vLLM/AWQ/text-generation-webui/GPTQ とは何か
推論フレームワーク
LLMをローカルで動かすためのソフトウェアです。
vLLM — 高速なLLM推論・サービング用エンジン。PagedAttentionという技術でメモリを効率的に使い、APIサーバーとして複数リクエストを高スループットでさばくのが得意です。本番デプロイやバッチ処理向き。 量子化手法
モデルの重みを低ビット(例: FP16→INT4)に圧縮して、VRAM使用量を大幅に減らす技術です。どちらもINT4(4ビット)にする点は同じですが、やり方が違います。
AWQ (Activation-aware Weight Quantization) — 推論時のアクティベーション(中間出力)の重要度を考慮して、重要な重みの精度を優先的に保つ手法。vLLMとの相性が良く、サーバー用途で多く使われます。 GPTQ (GPT Quantization) — キャリブレーションデータを使って、レイヤーごとに量子化誤差を最小化する手法。歴史が長く対応ツールが多いため、text-generation-webuiなど幅広い環境で動きます。 まとめると
table:まとめ
用語 役割 一言で
vLLM 推論エンジン 高速サーバー向け
text-generation-webui 推論UI 個人のローカル利用向け
AWQ 量子化手法 vLLMと好相性
GPTQ 量子化手法 対応ツールが広い
フレームワークと量子化手法の組み合わせで「どの環境でどう軽くするか」が決まる、という関係です。
============================
ccls インストール
$ clang -print-resource-dir
/usr/lib/llvm-18/lib/clang/18
$ cd /path/to/ccls
code:memo
pogin503@DESKTOP-66Q50RC /u/l/l/l/c/18> cmake -S. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-18/lib/clang/18
CMake Error: The source directory "/usr/lib/llvm-18/lib/clang/18" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
pogin503@DESKTOP-66Q50RC /u/l/l/l/c/18 1> cd - pogin503@DESKTOP-66Q50RC /u/local> cd ~/ghq/github.com/MaskRay/ccls/
pogin503@DESKTOP-66Q50RC ~/g/g/M/ccls (master)> cmake -S. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-18/lib/clang/18
-- The CXX compiler identification is GNU 13.3.0
-- The C compiler identification is GNU 13.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /usr/lib/x86_64-linux-gnu/libffi.so
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /usr/lib/x86_64-linux-gnu/libtinfo.so
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.3")
-- Found zstd: /usr/lib/x86_64-linux-gnu/libzstd.so
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.14")
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at /usr/lib/llvm-18/lib/cmake/clang/ClangTargets.cmake:833 (message):
The imported target "clangBasic" references the file
"/usr/lib/llvm-18/lib/libclangBasic.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/llvm-18/lib/cmake/clang/ClangTargets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib/cmake/clang-18/ClangConfig.cmake:20 (include)
CMakeLists.txt:72 (find_package)
$ cmake -S. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-18/cmake
code:memo
$ cmake -H.. -BRelease -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/usr/local/Cellar/llvm/<Your llvm Version>/lib/cmake
code:ccls
pogin503@DESKTOP-66Q50RC ~/g/g/M/ccls (master)> cmake -S. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-18/cmake
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at /usr/lib/llvm-18/lib/cmake/clang/ClangTargets.cmake:833 (message):
The imported target "clangBasic" references the file
"/usr/lib/llvm-18/lib/libclangBasic.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/llvm-18/lib/cmake/clang/ClangTargets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib/cmake/clang-18/ClangConfig.cmake:20 (include)
CMakeLists.txt:72 (find_package)
$ sudo apt install libclang-18-dev
code:memo
pogin503@DESKTOP-66Q50RC ~/g/g/M/ccls (master)> cmake -S. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-18/cmake
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Using local RapidJSON
fatal: No names found, cannot describe anything.
-- Configuring done (6.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/pogin503/ghq/github.com/MaskRay/ccls/Release
$ sudo apt install libedit-dev libcurl4-openssl-dev
code:memo
pogin503@DESKTOP-66Q50RC ~/g/g/M/ccls (master)> cmake -S. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-18/cmake
-- Looking for histedit.h
CMake Warning (dev) at /usr/share/cmake-3.28/Modules/CheckIncludeFile.cmake:77 (message):
Policy CMP0075 is not set: Include file check macros honor
CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
CMAKE_REQUIRED_LIBRARIES is set to:
/usr/lib/x86_64-linux-gnu/libedit.so
For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
/usr/lib/llvm-18/lib/cmake/llvm/FindLibEdit.cmake:28 (check_include_file)
/usr/lib/llvm-18/lib/cmake/llvm/LLVMConfig.cmake:286 (find_package)
/usr/lib/cmake/clang-18/ClangConfig.cmake:11 (find_package)
CMakeLists.txt:72 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Looking for histedit.h - found
-- Found LibEdit: /usr/include (found version "2.11")
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "8.5.0")
-- Using local RapidJSON
fatal: No names found, cannot describe anything.
-- Configuring done (5.2s)
-- Generating done (0.0s)
-- Build files have been written to: /home/pogin503/ghq/github.com/MaskRay/ccls/Release
code:memo
cmake --help
Usage
cmake options <path-to-existing-build> cmake options -S <path-to-source> -B <path-to-build> Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
Options
-S <path-to-source> = Explicitly specify a source directory.
-B <path-to-build> = Explicitly specify a build directory.
-C <initial-cache> = Pre-load a script to populate the cache.
-D <var>:<type>=<value> = Create or update a cmake cache entry. -U <globbing_expr> = Remove matching entries from CMake cache.
-G <generator-name> = Specify a build system generator.
-T <toolset-name> = Specify toolset name if supported by
generator.
-A <platform-name> = Specify platform name if supported by
generator.
~~~~~~省略~~~~~~~~~
ccls --help
OVERVIEW: C/C++/Objective-C language server
OPTIONS:
Generic Options:
--help - Display available options (--help-hidden for more)
--help-list - Display list of available options (--help-list-hidden for more)
--version - Display the version of this program
ccls options:
-h - Alias for -help
--index=<root> - standalone mode: index a project and exit
--init=<string> - extra initialization options in JSON
--log-file=<file> - stderr or log file
--log-file-append - append to log file
-v <int> - verbosity, from -3 (fatal) to 2 (verbose)