以前开源小参数模型基本是玩具,但今年情况有所不同,qwen3.5, gemma4, lfm2.5 这些表现其实都可圈可点了。

我最近在鸡哥无界14x上部署了一些小参数的模型进行测试,主要场景是生成 Git Commit Message,本地模型可以不错的完成这个任务。

我好奇不同模型的速度和效果,目前用下来 google/gemma-4-e4b 是比较均衡的,在速度和性能方面表现都不错,不过由于时间有限,本文先测一下速度。

以下是用工具测试的输出报告,后续我会把用到的工具开源(实际上也是大模型爷爷开发的)

LM Studio 文本生成模型基准报告

测试条件

  • 开始时间:2026-08-18T23:02:40+08:00
  • API:http://localhost:1234(模型列表来源:api_v1)
  • 提示词版本:2026.08.18
  • 采样:temperature=0.0, max_tokens=512, top_p=1.0, seed=42
  • 轮次:每个模型 × 场景预热 1 次,正式 3 次
  • 独占加载:开启(同时只保留当前模型,测完即卸载)
  • 超时:180s
  • 输出目录:C:\code\1\land-go\data\benchmarks\20260818-230240
  • 显存 / 内存:本阶段不测。LM Studio 未提供稳定可读的占用数据时,不做不可靠估算。

场景

  • short_answer(短问答):一两句知识问答,主要观察首字延迟。 主要看 ttft_ms。
  • long_generation(长文本生成):要求约 800 字的说明文,主要观察持续生成速度。 主要看 tokens_per_second。
  • reasoning(推理题):固定难度的算术应用题,主要观察总耗时与稳定性。 主要看 total_ms。
  • code_generation(代码生成):编写带说明的短 Python 函数,观察实用输出速度。 主要看 tokens_per_second。
  • long_context(长上下文问答):先读长文再提问,观察长上下文下的首字延迟和吞吐。 主要看 ttft_ms。

参与测试的模型

  • qwen3.5-4b (Q4_K_M),架构 qwen35
  • lfm2.5-8b-a1b (Q4_K_M),架构 lfm2moe
  • liquidai/lfm2.5-2.6b (Q5_K_M),架构 lfm2
  • lmstudio-community/lfm2.5-2.6b (Q4_K_M),架构 lfm2
  • google/gemma-4-e4b (Q4_K_M),架构 gemma4
  • qwen/qwen3.5-2b (Q4_K_M),架构 qwen35

已跳过模型

模型 原因 来源
text-embedding-bge-m3 type=embedding api_v1
text-embedding-qwen3-embedding-0.6b type=embedding api_v1
text-embedding-nomic-embed-text-v1.5 type=embedding api_v1

运行概况

  • 正式请求:90,成功 90,失败 0
  • 预热请求:30

按首字延迟(TTFT)排序

越低越好。日常对话、补全输入更看这项,不要只看 tokens/s。

名次 模型 场景 成功率
1 lmstudio-community/lfm2.5-2.6b (Q4_K_M) long_context 2132.39 ms 100%
2 lmstudio-community/lfm2.5-2.6b (Q4_K_M) reasoning 2133.84 ms 100%
3 liquidai/lfm2.5-2.6b (Q5_K_M) long_generation 2136.09 ms 100%
4 liquidai/lfm2.5-2.6b (Q5_K_M) code_generation 2139.84 ms 100%
5 liquidai/lfm2.5-2.6b (Q5_K_M) short_answer 2142.14 ms 100%
6 lmstudio-community/lfm2.5-2.6b (Q4_K_M) code_generation 2144.16 ms 100%
7 liquidai/lfm2.5-2.6b (Q5_K_M) reasoning 2162.66 ms 100%
8 liquidai/lfm2.5-2.6b (Q5_K_M) long_context 2171.90 ms 100%
9 lfm2.5-8b-a1b (Q4_K_M) long_context 2181.84 ms 100%
10 lmstudio-community/lfm2.5-2.6b (Q4_K_M) long_generation 2188.06 ms 100%
11 lmstudio-community/lfm2.5-2.6b (Q4_K_M) short_answer 2194.65 ms 100%
12 lfm2.5-8b-a1b (Q4_K_M) short_answer 2196.51 ms 100%
13 lfm2.5-8b-a1b (Q4_K_M) long_generation 2211.24 ms 100%
14 lfm2.5-8b-a1b (Q4_K_M) code_generation 2222.23 ms 100%
15 lfm2.5-8b-a1b (Q4_K_M) reasoning 2240.66 ms 100%
16 qwen/qwen3.5-2b (Q4_K_M) code_generation 2280.83 ms 100%
17 qwen/qwen3.5-2b (Q4_K_M) long_generation 2335.33 ms 100%
18 qwen/qwen3.5-2b (Q4_K_M) reasoning 2411.94 ms 100%
19 qwen/qwen3.5-2b (Q4_K_M) short_answer 2425.75 ms 100%
20 google/gemma-4-e4b (Q4_K_M) short_answer 2435.16 ms 100%
21 google/gemma-4-e4b (Q4_K_M) long_context 2458.39 ms 100%
22 qwen3.5-4b (Q4_K_M) short_answer 2470.26 ms 100%
23 qwen/qwen3.5-2b (Q4_K_M) long_context 2475.28 ms 100%
24 google/gemma-4-e4b (Q4_K_M) reasoning 2483.72 ms 100%
25 qwen3.5-4b (Q4_K_M) long_context 2495.70 ms 100%
26 qwen3.5-4b (Q4_K_M) long_generation 2500.24 ms 100%
27 google/gemma-4-e4b (Q4_K_M) code_generation 2514.18 ms 100%
28 qwen3.5-4b (Q4_K_M) reasoning 2519.97 ms 100%
29 qwen3.5-4b (Q4_K_M) code_generation 2528.72 ms 100%
30 google/gemma-4-e4b (Q4_K_M) long_generation 2619.88 ms 100%

按持续生成速度(tokens/s)排序

越高越好。长文写作更看这项。无法从 API 拿到 completion_tokens 的行不会出现在这里。

名次 模型 场景 成功率
1 lfm2.5-8b-a1b (Q4_K_M) short_answer 46.19 tok/s 100%
2 lfm2.5-8b-a1b (Q4_K_M) code_generation 44.96 tok/s 100%
3 lfm2.5-8b-a1b (Q4_K_M) long_generation 44.82 tok/s 100%
4 lfm2.5-8b-a1b (Q4_K_M) reasoning 44.54 tok/s 100%
5 lfm2.5-8b-a1b (Q4_K_M) long_context 44.18 tok/s 100%
6 lmstudio-community/lfm2.5-2.6b (Q4_K_M) code_generation 31.12 tok/s 100%
7 lmstudio-community/lfm2.5-2.6b (Q4_K_M) short_answer 30.92 tok/s 100%
8 lmstudio-community/lfm2.5-2.6b (Q4_K_M) reasoning 30.68 tok/s 100%
9 lmstudio-community/lfm2.5-2.6b (Q4_K_M) long_generation 30.68 tok/s 100%
10 liquidai/lfm2.5-2.6b (Q5_K_M) long_generation 30.23 tok/s 100%
11 lmstudio-community/lfm2.5-2.6b (Q4_K_M) long_context 30.19 tok/s 100%
12 liquidai/lfm2.5-2.6b (Q5_K_M) reasoning 30.17 tok/s 100%
13 liquidai/lfm2.5-2.6b (Q5_K_M) code_generation 30.10 tok/s 100%
14 liquidai/lfm2.5-2.6b (Q5_K_M) short_answer 30.04 tok/s 100%
15 liquidai/lfm2.5-2.6b (Q5_K_M) long_context 29.79 tok/s 100%
16 qwen/qwen3.5-2b (Q4_K_M) short_answer 20.57 tok/s 100%
17 qwen/qwen3.5-2b (Q4_K_M) long_generation 17.25 tok/s 100%
18 qwen/qwen3.5-2b (Q4_K_M) reasoning 17.24 tok/s 100%
19 qwen/qwen3.5-2b (Q4_K_M) long_context 17.24 tok/s 100%
20 qwen/qwen3.5-2b (Q4_K_M) code_generation 17.09 tok/s 100%
21 qwen3.5-4b (Q4_K_M) short_answer 16.56 tok/s 100%
22 google/gemma-4-e4b (Q4_K_M) short_answer 16.54 tok/s 100%
23 qwen3.5-4b (Q4_K_M) reasoning 16.53 tok/s 100%
24 qwen3.5-4b (Q4_K_M) long_generation 16.53 tok/s 100%
25 qwen3.5-4b (Q4_K_M) code_generation 16.48 tok/s 100%
26 qwen3.5-4b (Q4_K_M) long_context 16.36 tok/s 100%
27 google/gemma-4-e4b (Q4_K_M) long_generation 15.83 tok/s 100%
28 google/gemma-4-e4b (Q4_K_M) reasoning 15.83 tok/s 100%
29 google/gemma-4-e4b (Q4_K_M) code_generation 15.66 tok/s 100%
30 google/gemma-4-e4b (Q4_K_M) long_context 15.40 tok/s 100%

按稳定性(总耗时变异系数)排序

越低越好。用正式成功轮的总耗时标准差 / 均值;样本少于 2 次的组合不参与。

名次 模型 场景 成功率
1 qwen/qwen3.5-2b (Q4_K_M) reasoning 0.00 100%
2 qwen3.5-4b (Q4_K_M) long_context 0.00 100%
3 lfm2.5-8b-a1b (Q4_K_M) long_generation 0.00 100%
4 liquidai/lfm2.5-2.6b (Q5_K_M) code_generation 0.00 100%
5 qwen/qwen3.5-2b (Q4_K_M) code_generation 0.00 100%
6 lfm2.5-8b-a1b (Q4_K_M) long_context 0.00 100%
7 lmstudio-community/lfm2.5-2.6b (Q4_K_M) short_answer 0.00 100%
8 liquidai/lfm2.5-2.6b (Q5_K_M) reasoning 0.00 100%
9 liquidai/lfm2.5-2.6b (Q5_K_M) long_context 0.00 100%
10 google/gemma-4-e4b (Q4_K_M) long_generation 0.00 100%
11 lfm2.5-8b-a1b (Q4_K_M) reasoning 0.00 100%
12 google/gemma-4-e4b (Q4_K_M) short_answer 0.00 100%
13 lmstudio-community/lfm2.5-2.6b (Q4_K_M) reasoning 0.00 100%
14 liquidai/lfm2.5-2.6b (Q5_K_M) short_answer 0.00 100%
15 lfm2.5-8b-a1b (Q4_K_M) code_generation 0.00 100%
16 google/gemma-4-e4b (Q4_K_M) reasoning 0.01 100%
17 lmstudio-community/lfm2.5-2.6b (Q4_K_M) long_generation 0.01 100%
18 google/gemma-4-e4b (Q4_K_M) long_context 0.01 100%
19 google/gemma-4-e4b (Q4_K_M) code_generation 0.01 100%
20 lfm2.5-8b-a1b (Q4_K_M) short_answer 0.01 100%
21 qwen3.5-4b (Q4_K_M) short_answer 0.01 100%
22 liquidai/lfm2.5-2.6b (Q5_K_M) long_generation 0.01 100%
23 qwen/qwen3.5-2b (Q4_K_M) short_answer 0.01 100%
24 lmstudio-community/lfm2.5-2.6b (Q4_K_M) code_generation 0.01 100%
25 qwen3.5-4b (Q4_K_M) reasoning 0.01 100%
26 qwen3.5-4b (Q4_K_M) long_generation 0.01 100%
27 qwen/qwen3.5-2b (Q4_K_M) long_generation 0.01 100%
28 lmstudio-community/lfm2.5-2.6b (Q4_K_M) long_context 0.01 100%
29 qwen3.5-4b (Q4_K_M) code_generation 0.02 100%
30 qwen/qwen3.5-2b (Q4_K_M) long_context 0.02 100%

综合推荐

  • 日常交互更看低 TTFT:优先看 lmstudio-community/lfm2.5-2.6b (Q4_K_M)(场景 long_context,中位 TTFT 2132.39 ms)。
  • 长文 / 代码更看持续 tokens/s:优先看 lfm2.5-8b-a1b (Q4_K_M)(场景 code_generation,中位 44.96 tok/s)。
  • 稳定性:qwen/qwen3.5-2b (Q4_K_M)(场景 reasoning,总耗时 CV 0.000)波动较小。

明细摘要

模型 场景 成功 TTFT 中位 (ms) TTFT P95 总耗时中位 (ms) tokens/s 中位 CV
google/gemma-4-e4b (Q4_K_M) code_generation 3/3 2514.18 2735.55 35199.15 15.66 0.006
google/gemma-4-e4b (Q4_K_M) long_context 3/3 2458.39 2474.59 32838.83 15.40 0.006
google/gemma-4-e4b (Q4_K_M) long_generation 3/3 2619.88 2666.51 34960.42 15.83 0.003
google/gemma-4-e4b (Q4_K_M) reasoning 3/3 2483.72 2643.85 34827.64 15.83 0.005
google/gemma-4-e4b (Q4_K_M) short_answer 3/3 2435.16 2484.14 11666.89 16.54 0.004
lfm2.5-8b-a1b (Q4_K_M) code_generation 3/3 2222.23 2241.98 13610.13 44.96 0.005
lfm2.5-8b-a1b (Q4_K_M) long_context 3/3 2181.84 2198.25 13767.07 44.18 0.001
lfm2.5-8b-a1b (Q4_K_M) long_generation 3/3 2211.24 2226.72 13627.74 44.82 0.001
lfm2.5-8b-a1b (Q4_K_M) reasoning 3/3 2240.66 2263.09 13737.13 44.54 0.003
lfm2.5-8b-a1b (Q4_K_M) short_answer 3/3 2196.51 2218.51 6061.26 46.19 0.006
liquidai/lfm2.5-2.6b (Q5_K_M) code_generation 3/3 2139.84 2167.26 19167.46 30.10 0.001
liquidai/lfm2.5-2.6b (Q5_K_M) long_context 3/3 2171.90 2182.63 19369.20 29.79 0.003
liquidai/lfm2.5-2.6b (Q5_K_M) long_generation 3/3 2136.09 2183.35 19122.93 30.23 0.007
liquidai/lfm2.5-2.6b (Q5_K_M) reasoning 3/3 2162.66 2205.05 19115.59 30.17 0.003
liquidai/lfm2.5-2.6b (Q5_K_M) short_answer 3/3 2142.14 2160.60 9458.92 30.04 0.004
lmstudio-community/lfm2.5-2.6b (Q4_K_M) code_generation 3/3 2144.16 2207.68 18585.27 31.12 0.008
lmstudio-community/lfm2.5-2.6b (Q4_K_M) long_context 3/3 2132.39 2189.60 19156.49 30.19 0.012
lmstudio-community/lfm2.5-2.6b (Q4_K_M) long_generation 3/3 2188.06 2233.76 18926.16 30.68 0.005
lmstudio-community/lfm2.5-2.6b (Q4_K_M) reasoning 3/3 2133.84 2199.58 18837.67 30.68 0.004
lmstudio-community/lfm2.5-2.6b (Q4_K_M) short_answer 3/3 2194.65 2202.20 6819.38 30.92 0.003
qwen/qwen3.5-2b (Q4_K_M) code_generation 3/3 2280.83 2439.16 32249.37 17.09 0.001
qwen/qwen3.5-2b (Q4_K_M) long_context 3/3 2475.28 2588.00 7100.64 17.24 0.022
qwen/qwen3.5-2b (Q4_K_M) long_generation 3/3 2335.33 2398.09 32080.69 17.25 0.010
qwen/qwen3.5-2b (Q4_K_M) reasoning 3/3 2411.94 2472.15 27465.57 17.24 0.000
qwen/qwen3.5-2b (Q4_K_M) short_answer 3/3 2425.75 2445.08 2863.18 20.57 0.007
qwen3.5-4b (Q4_K_M) code_generation 3/3 2528.72 2834.62 33741.61 16.48 0.016
qwen3.5-4b (Q4_K_M) long_context 3/3 2495.70 2536.37 33783.69 16.36 0.000
qwen3.5-4b (Q4_K_M) long_generation 3/3 2500.24 2869.27 33473.31 16.53 0.008
qwen3.5-4b (Q4_K_M) reasoning 3/3 2519.97 2883.59 33488.80 16.53 0.008
qwen3.5-4b (Q4_K_M) short_answer 3/3 2470.26 2858.09 33390.12 16.56 0.006

如何读结论

  • 不要只按单一 tokens/s 决定「最快」。
  • 实际选型还要看生成质量、显存占用和失败率,这些不在本报告的速度排名里。
  • 修改提示词后应提升 PROMPT_VERSION,把新结果当成新的基准版本。