Skip to content

Use n_embd_gqa instead of n_embd to handle llama-2 70B - #2433

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
randxie:randxie/bug-fix
Jul 28, 2023
Merged

ggerganov merged 1 commit into
ggml-org:masterfrom
randxie:randxie/bug-fix

Conversation

@randxie

@randxie randxie commented Jul 28, 2023 •

Copy link
Copy Markdown
Contributor

This PR fixes #2350. Verified with 2 approaches:

Approach 1

Run make state-load-sate then run ./save-load-state --model /home/randxie/weights/llama-2-70b-chat.ggmlv3.q4_K_M.bin --gqa 8.

Approach 2

Run the reproducing steps in the above issue, and verify no more Segmentation fault.

The model weight is downloaded from https://huggingface.co/TheBloke/Llama-2-70B-Chat-GGML/blob/main/llama-2-70b-chat.ggmlv3.q4_K_M.bin

@ggerganov
ggerganov merged commit 65cdf34 into ggml-org:master Jul 28, 2023
@randxie
randxie deleted the randxie/bug-fix branch July 28, 2023 09:00
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
bong-water-water-bong added a commit to 1bit-MONSTER/llama.cpp that referenced this pull request Nov 14, 2026
…d (engine ggml-org#2433) (#376)

The AMD-pin merge (#327) resolved common/speculative.cpp's draft-mtp
conflicts onto upstream's restructured batch API and lost two onebit
lines from common_speculative_impl_draft_mtp:

- draft() no longer called budget.begin(n_seq). MtpBudgetTrace's
  per-sequence vectors stayed empty, keep()/drafted() wrote past them on
  the first draft, and llama-server died with SIGSEGV in draft() on the
  first request for any GGUF with its own MTP head (MTP is on by default).
  Restored, and MtpBudgetTrace now grows its state for any sequence it is
  handed, so a missing begin() can only reset the rule, not corrupt the
  heap.
- process() seeded the first token of every batch with pending_h,
  dropping the engine #290 continuity guard: a fresh request at pos 0
  drafted from the previous request's last h-row. Restored: pending_h
  only when pending_pos + 1 == the batch's first pos, else a zero row.

tests/test-onebit-mtp-budget: drafts on sequence 3 of 4 without begin(),
begin() resetting the product, and the rule. With the old indexing the
first case aborts (operator[] bounds assertion).

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
bong-water-water-bong pushed a commit to 1bit-MONSTER/llama.cpp that referenced this pull request Nov 14, 2026
…ries a taken port, has a 900 s timeout (review on #379)

Exit 1 never healthy, 2 server died (the ggml-org#2433 SIGSEGV), 3 request failed or timed out, 4 empty content, 5 no draft
acceptance line. The port comes from the OS and a bind failure retries on a fresh one. The ctest row has TIMEOUT 900, and
both files say that CI leaves ONEBIT_MTP_TEST_MODEL unset, so the row is SKIP there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bong-water-water-bong added a commit to 1bit-MONSTER/llama.cpp that referenced this pull request Nov 14, 2026
…ng on the CPU (engine#2433) (#379)

* tests: test-mtp-one-request, one llama-server request with MTP drafting on the CPU (engine#2433)

Runs llama-server -ngl 0 --spec-type draft-mtp on ONEBIT_MTP_TEST_MODEL (a GGUF with its own MTP head) and sends one
/completion request. Passes only on HTTP 200, non-empty content, a live server afterwards and a 'draft acceptance' line,
so the MTP drafter really ran. Skips (77) without a model. CPU only, so it needs no GPU. On the fork at ea2d2eb the
server segfaults in the drafter (engine#2433) and the arm fails; with the drafter's budget.begin restored it passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* tests: test-mtp-one-request gives each failure its own exit code, retries a taken port, has a 900 s timeout (review on #379)

Exit 1 never healthy, 2 server died (the ggml-org#2433 SIGSEGV), 3 request failed or timed out, 4 empty content, 5 no draft
acceptance line. The port comes from the OS and a bind failure retries on a fresh one. The ctest row has TIMEOUT 900, and
both files say that CI leaves ONEBIT_MTP_TEST_MODEL unset, so the row is SKIP there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* tests: test-mtp-one-request needs at least one accepted draft, and its ctest TIMEOUT covers its own budget (review on #379)

A 'draft acceptance' line reading 0 accepted now fails (exit 5): the row exists to catch a drafter that does not work.
TIMEOUT 1800 exceeds the script's worst case (health 200 x 5 s + the 600 s request, ~1600 s), so a slow load
reaches its own exit code instead of a ctest Timeout; the invariant is written next to the number.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Llama 2 70B - with --prompt-cache memory.txt crashing without error

2 participants