antirez / antirez/ds4

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

未关闭
#684 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
22.3k
派生
2.1k
平均合并
1 天 3 小时
30 天内合并 PR
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 摘要。