Loose-Info.com
Last Update 2026/07/11
TOP - 各種テスト - LLM - ローカルLLMの実測値比較 - コーディング(設定用パラメータ比較) - Devstral Small 2

低スペック寄りのPCでローカルLLMを動作させた際の記録です。
LLM以外の仮想マシンなどが起動され、多少負荷がかかった状態で実行しています。
ベンチマークなどでLLMの性能を評価する内容ではありません。

検証用PC

OS

Debian GNU/Linux 12 (bookworm)

CPU

Intel(R) Core(TM) i5-14400F

GPU

GeForce RTX 3060 12GB

メモリ

DDR4 PC4-25600 32GB × 4

SSD

crucial P310 CT1000P310SSD8-JP


構築環境 : Docker + Ollama (特別な設定などは無い状態)

検証用プロンプト

``` ### 依頼内容 - コード生成 ### 指示 - C言語 - コード以外の出力は不要 - 中括弧スタイルはオールマン - テストコードも生成 - テストコードは別ファイル - 実行用ソースファイル名 : sample_code.c - テスト用ソースファイル名 : sample_test.c - 標準ヘッダ以外は使用しない - 戻り値はEXIT_SUCCESSを使用 - 関数はmain()の前で定義 ### コード仕様(sample_code.c) - コマンドラインから整数2つを取得 - [引数1]から[引数2]までをインクリメントして空白区切りで標準出力に出力 - 出力する文字列はmain()ではなく関数で生成 ### コード仕様(sample_test.c) - unity.hを使用しない ```

モデル詳細

Model architecture mistral3 parameters 24.0B context length 393216 embedding length 5120 quantization Q4_K_M Capabilities completion vision tools Parameters temperature 0.15

Devstral Small 2 [実測結果一覧へ]

(1) temperature=0.15; top_p=---; top_k=--
(2) temperature=0.15; top_p=0.7; top_k=--
(3) temperature=0.15; top_p=0.5; top_k=--
(4) temperature=0.15; top_p=0.4; top_k=--
(5) temperature=0.15; top_p=0.7; top_k=32
(6) temperature=0.15; top_p=0.7; top_k=16
(7) temperature=0.10; top_p=0.7; top_k=--

(1) temperature=0.15; top_p=---; top_k=--

2026-07-09 total duration: 53.398673271s load duration: 94.639936ms prompt eval count: 774 token(s) prompt eval duration: 1.759502098s prompt eval rate: 439.90 tokens/s eval count: 374 token(s) eval duration: 51.407489539s eval rate: 7.28 tokens/s

コード生成結果の概要

・C言語による生成 ・コード以外の出力無し ・コードの記述スタイルのオールマン指定を無視 ・戻り値は stdlib.h の EXIT_*** を使用 ・文字列生成関数 文字列用メモリはchar配列1024バイト固定 インクリメント+空白区切りでバッファに書き込み バッファへのポインタを返す ・main() 引数個数のチェック(エラー処理有) 開始値、終了値の比較チェック(エラー処理有) 文字列生成関数の呼び出し 生成文字列の標準出力への出力 ・テストコードを別途生成 テスト対象関数の宣言 main()を伴うテストコード 文字列生成関数は次の1種類のみテスト実行 (1) 整数1 < 整数2 (注) LLMの生成結果は毎回一定ではないため、結果によっては上記内容通りではないことが考えられます。

生成コードの実行結果

sample_code.c : 検証用プロンプトにて生成されたコード
sample_test.c : 生成されたテストコード
$ gcc -Wall -o sample_code sample_code.c sample_code.c: In function ‘generate_incremented_string’: sample_code.c:10:9: warning: implicit declaration of function ‘strcat’ [-Wimplicit-function-declaration] 10 | strcat(buffer, num_str); | ^~~~~~ sample_code.c:3:1: note: include ‘<string.h>’ or provide a declaration of ‘strcat’ 2 | #include <stdlib.h> +++ |+#include <string.h> 3 | sample_code.c:10:9: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch] 10 | strcat(buffer, num_str); | ^~~~~~ sample_code.c:10:9: note: include ‘<string.h>’ or provide a declaration of ‘strcat’ $ gcc -Wall -o sample_test sample_code.c sample_test.c sample_code.c: In function ‘generate_incremented_string’: sample_code.c:10:9: warning: implicit declaration of function ‘strcat’ [-Wimplicit-function-declaration] 10 | strcat(buffer, num_str); | ^~~~~~ sample_code.c:3:1: note: include ‘<string.h>’ or provide a declaration of ‘strcat’ 2 | #include <stdlib.h> +++ |+#include <string.h> 3 | sample_code.c:10:9: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch] 10 | strcat(buffer, num_str); | ^~~~~~ sample_code.c:10:9: note: include ‘<string.h>’ or provide a declaration of ‘strcat’ sample_test.c: In function ‘test_generate_incremented_string’: sample_test.c:6:20: warning: implicit declaration of function ‘generate_incremented_string’; did you mean ‘test_generate_incremented_string’? [-Wimplicit-function-declaration] 6 | char* result = generate_incremented_string(1, 5); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | test_generate_incremented_string sample_test.c:6:20: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] /bin/ld: /tmp/ccsP1G59.o: in function `main': sample_test.c:(.text+0xb0): multiple definition of `main'; /tmp/ccazMVQc.o:sample_code.c:(.text+0xaa): first defined here collect2: error: ld returned 1 exit status $ vi sample_code.c ← main()関数重複エラー解消のため条件付きコンパイル用の#ifndefマクロを追加 $ vi sample_test.c ← テスト対象関数の宣言を追加 $ gcc -D TEST_MAIN -Wall -o sample_test sample_code.c sample_test.c sample_code.c: In function ‘generate_incremented_string’: sample_code.c:10:9: warning: implicit declaration of function ‘strcat’ [-Wimplicit-function-declaration] 10 | strcat(buffer, num_str); | ^~~~~~ sample_code.c:3:1: note: include ‘<string.h>’ or provide a declaration of ‘strcat’ 2 | #include <stdlib.h> +++ |+#include <string.h> 3 | sample_code.c:10:9: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch] 10 | strcat(buffer, num_str); | ^~~~~~ sample_code.c:10:9: note: include ‘<string.h>’ or provide a declaration of ‘strcat’ $ ./sample_code 1 5 1 2 3 4 5 $ ./sample_code -3 3 -3 -2 -1 0 1 2 3 $ ./sample_code 1 1 1 $ ./sample_code 5 1 Error: start must be less than or equal to end $ ./sample_test Test passed: generate_incremented_string(1, 5)

(2) temperature=0.15; top_p=0.7; top_k=--

2026-07-09 total duration: 53.461420792s load duration: 87.683948ms prompt eval count: 774 token(s) prompt eval duration: 1.756589341s prompt eval rate: 440.63 tokens/s eval count: 374 token(s) eval duration: 51.479143813s eval rate: 7.27 tokens/s

コード生成結果の概要

生成されたコードは(1)と同一コード

(3) temperature=0.15; top_p=0.5; top_k=--

2026-07-09 total duration: 51.759199985s load duration: 94.803177ms prompt eval count: 774 token(s) prompt eval duration: 161.79332ms prompt eval rate: 4783.88 tokens/s eval count: 374 token(s) eval duration: 51.409891701s eval rate: 7.27 tokens/s

コード生成結果の概要

生成されたコードは(1)とほぼ同一コード 文字列生成時のループ内仮置き用配列サイズが異なるのみ (1) char num_str[16] (3) char num_str[12]

(4) temperature=0.15; top_p=0.4; top_k=--

2026-07-09 total duration: 51.788833133s load duration: 99.679446ms prompt eval count: 774 token(s) prompt eval duration: 149.869746ms prompt eval rate: 5164.48 tokens/s eval count: 374 token(s) eval duration: 51.440809483s eval rate: 7.27 tokens/s

コード生成結果の概要

生成されたコードは(3)と同一コード

(5) temperature=0.15; top_p=0.7; top_k=32

2026-07-11 total duration: 54.279602235s load duration: 97.928491ms prompt eval count: 774 token(s) prompt eval duration: 1.791094089s prompt eval rate: 432.14 tokens/s eval count: 374 token(s) eval duration: 52.24816861s eval rate: 7.16 tokens/s

コード生成結果の概要

生成されたコードは(3)と同一コード

(6) temperature=0.15; top_p=0.7; top_k=16

2026-07-11 total duration: 52.59763155s load duration: 116.062649ms prompt eval count: 774 token(s) prompt eval duration: 158.734378ms prompt eval rate: 4876.07 tokens/s eval count: 374 token(s) eval duration: 52.238126318s eval rate: 7.16 tokens/s

コード生成結果の概要

生成されたコードは(3)と同一コード

(7) temperature=0.10; top_p=0.7; top_k=--

2026-07-11 total duration: 52.712995788s load duration: 118.825399ms prompt eval count: 774 token(s) prompt eval duration: 152.469918ms prompt eval rate: 5076.41 tokens/s eval count: 374 token(s) eval duration: 52.343873507s eval rate: 7.15 tokens/s

コード生成結果の概要

生成されたコードは(3)と同一コード