antirez / antirez/ds4

Metal SSD streaming: medium-length prompts fail with "model range is not covered by mapped model views"

Abierto
#684 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
22.3k
Forks
2.1k
Merge medio
1 d 3 h
PR fusionados (30 d)
4

Descripción

## Environment

**Hardware**
- Apple MacBook Pro M5 Pro
- 48 GB unified memory

**Operating System**
- macOS 26.5 (Build 25F71)

**Kernel**
```
Darwin Kernel Version 25.5.0
```

**DS4**
- Commit: `ae504c963e975f8b76352a9bd5895f39909042f9`

**Model**
- `ds4f-q2`
- `DeepSeek-V4-Flash-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-chat-v2-imatrix-0731.gguf`

---

## Command

```bash
./ds4 \
--model ./ds4flash.gguf \
--metal \
--ssd-streaming \
--ssd-streaming-cache-experts 16GB \
--ctx 8192 \
--nothink
```

---

## Problem

Certain prompts consistently fail during prompt processing with:

```
Metal model range ... is not covered by mapped model views
```

The failure occurs before any prompt token is processed.

For example, the following prompt reliably reproduces the issue:

```
Implement a plain HTML5 website with the Atari game simulator just to copy and paste as single file.
```

---

## Error

```
processing 30 input tokens: 0/30

Metal model range 0.26..0.26 GiB is not covered by mapped model views
Metal model range 1.43..1.43 GiB is not covered by mapped model views
Metal model range 0.84..0.84 GiB is not covered by mapped model views

prompt processing failed: metal prefill failed
```

---

## Observations

- The issue reproduces in both interactive mode and with `--prompt-file`.
- Simple prompts such as `hi` work correctly.
- Other prompts such as `create an atari game` also work correctly.
- A very large prompt (~6600 input tokens) loaded with `--prompt-file` is processed successfully.
- The issue is therefore not simply related to prompt length.
- The issue reproduces with different expert cache sizes (tested with 16 GB and 28 GB).
- I also downloaded the DSpark support model, but the issue reproduces without `--dspark` or `--mtp`, so it does not appear to be related.

---

## Additional Observation

During one of the reproduction attempts, macOS became unresponsive and rebooted. Unfortunately, no kernel panic log was generated, so I cannot confirm whether the reboot was directly related to this issue.

---

Please let me know if there is any additional logging or a debug build I can use to help narrow down the problem.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.