Skip to content

Commit 9d93927

Browse files
dhiltgenrick-github
authored andcommitted
int: adjust a few models for integration tests (ollama#11872)
1 parent 3f9fe3e commit 9d93927

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

integration/concurrency_test.go

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ package integration
44

55
import (
66
"context"
7+
"fmt"
78
"log/slog"
9+
"math"
810
"os"
911
"strconv"
1012
"sync"
@@ -21,7 +23,7 @@ func TestMultiModelConcurrency(t *testing.T) {
2123
var (
2224
req = [2]api.GenerateRequest{
2325
{
24-
Model: "llama3.2:1b",
26+
Model: smol,
2527
Prompt: "why is the ocean blue?",
2628
Stream: &stream,
2729
KeepAlive: &api.Duration{Duration: 10 * time.Second},
@@ -30,7 +32,7 @@ func TestMultiModelConcurrency(t *testing.T) {
3032
"temperature": 0.0,
3133
},
3234
}, {
33-
Model: "tinydolphin",
35+
Model: "qwen3:0.6b",
3436
Prompt: "what is the origin of the us thanksgiving holiday?",
3537
Stream: &stream,
3638
KeepAlive: &api.Duration{Duration: 10 * time.Second},
@@ -132,34 +134,38 @@ func TestMultiModelStress(t *testing.T) {
132134
size: 2876 * format.MebiByte,
133135
},
134136
{
135-
name: "phi",
136-
size: 2616 * format.MebiByte,
137+
name: "qwen3:0.6b",
138+
size: 1600 * format.MebiByte,
137139
},
138140
{
139141
name: "gemma:2b",
140142
size: 2364 * format.MebiByte,
141143
},
142144
{
143-
name: "stable-code:3b",
144-
size: 2608 * format.MebiByte,
145+
name: "deepseek-r1:1.5b",
146+
size: 2048 * format.MebiByte,
145147
},
146148
{
147149
name: "starcoder2:3b",
148150
size: 2166 * format.MebiByte,
149151
},
150152
}
151153
mediumModels := []model{
154+
{
155+
name: "qwen3:8b",
156+
size: 6600 * format.MebiByte,
157+
},
152158
{
153159
name: "llama2",
154160
size: 5118 * format.MebiByte,
155161
},
156162
{
157-
name: "mistral",
158-
size: 4620 * format.MebiByte,
163+
name: "deepseek-r1:7b",
164+
size: 5600 * format.MebiByte,
159165
},
160166
{
161-
name: "orca-mini:7b",
162-
size: 5118 * format.MebiByte,
167+
name: "mistral",
168+
size: 4620 * format.MebiByte,
163169
},
164170
{
165171
name: "dolphin-mistral",
@@ -254,7 +260,7 @@ func TestMultiModelStress(t *testing.T) {
254260
}
255261
go func() {
256262
for {
257-
time.Sleep(2 * time.Second)
263+
time.Sleep(10 * time.Second)
258264
select {
259265
case <-ctx.Done():
260266
return
@@ -265,7 +271,21 @@ func TestMultiModelStress(t *testing.T) {
265271
continue
266272
}
267273
for _, m := range models.Models {
268-
slog.Info("loaded model snapshot", "model", m)
274+
var procStr string
275+
switch {
276+
case m.SizeVRAM == 0:
277+
procStr = "100% CPU"
278+
case m.SizeVRAM == m.Size:
279+
procStr = "100% GPU"
280+
case m.SizeVRAM > m.Size || m.Size == 0:
281+
procStr = "Unknown"
282+
default:
283+
sizeCPU := m.Size - m.SizeVRAM
284+
cpuPercent := math.Round(float64(sizeCPU) / float64(m.Size) * 100)
285+
procStr = fmt.Sprintf("%d%%/%d%%", int(cpuPercent), int(100-cpuPercent))
286+
}
287+
288+
slog.Info("loaded model snapshot", "model", m.Name, "CPU/GPU", procStr, "expires", format.HumanTime(m.ExpiresAt, "Never"))
269289
}
270290
}
271291
}

0 commit comments

Comments
 (0)