antirez / antirez/ds4

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

オープン
#684 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
22.3k
フォーク
2.1k
平均マージ
1日 3時間
マージ済み PR(30日)
4

説明

## 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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。