Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server : add speculative decoding support #10455

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Conversation

ggerganov
Copy link
Owner

@ggerganov ggerganov commented Nov 22, 2024

target #10362

Initial implementation that enables speculative decoding in llama-server. Test with this command:

./bin/llama-server \
    -m  ../models/qwen2.5-32b-coder-instruct/ggml-model-q8_0.gguf \
    -md ../models/qwen2.5-0.5b-coder-instruct/ggml-model-q4_0.gguf \
    -ngl 99 -ngld 99 -fa --port 8033 -c 32768 \
    --draft-max 16 --draft-min 5

Feedback is appreciated.

TODO:

  • simplify
  • control draft context size
  • rename server.params to something else to avoid confusions
  • test multi-user
  • test offloading draft model with RPC

@3Simplex
Copy link

3Simplex commented Nov 22, 2024

From what I have read the goal is faster inference while retaining quality of the larger model.

I am using rx6900xt with vulkan
Using Qwen2.5-Coder-7B-Instruct-Q8_0.gguf alone I see 50 t/s
Using Qwen2.5-Coder-0.5B-Instruct-Q8_0.gguf alone I see 230 t/s

I get about 10-12 t/s with an incorrect configuration.

  • .\llama-server.exe -m "...Qwen2.5-Coder-0.5B-Instruct-Q8_0.gguf" -md "...Qwen2.5-Coder-7B-Instruct-Q8_0.gguf" -ngl 99 -ngld 99 -fa --port 8080 -c 32768 --draft 10 --draft-min 5

Flipping the models increased speed and the output looks similar. This makes sense since the -md is the draft model which is supposed to be the smaller model.

I get about 16 t/s with the correct configuration.

  • .\llama-server.exe -m "...Qwen2.5-Coder-7B-Instruct-Q8_0.gguf" -md "...Qwen2.5-Coder-0.5B-Instruct-Q8_0.gguf" -ngl 99 -ngld 99 -fa --port 8080 -c 32768 --draft 10 --draft-min 5

Setting a lower context 2048, when the limit is reached the server crashed.

@ggerganov ggerganov force-pushed the gg/speculative-server branch 5 times, most recently from c5ddee2 to e80f758 Compare November 24, 2024 15:09
@ggerganov ggerganov marked this pull request as ready for review November 24, 2024 15:11
@ggerganov
Copy link
Owner Author

@3Simplex What is the output of the following bench on your machine:

llama-bench.exe -m "...Qwen2.5-Coder-7B-Instruct-Q8_0.gguf" -p 1,1,2,3,4,5,6,7,8,12,16,32 -r 20 -n 0 -ngl 99 -fa 1

@3Simplex
Copy link

@ggerganov

.\llama-bench.exe -m "...\Qwen2.5-Coder-7B-Instruct-Q8_0.gguf" -p 1,1,2,3,4,5,6,7,8,12,16,32 -r 20 -n 0 -ngl 99 -fa 1
ggml_vulkan: Found 1 Vulkan devices:
ggml_vulkan: 0 = AMD Radeon RX 6900 XT (AMD proprietary driver) | uma: 0 | fp16: 1 | warp size: 64

model size params backend ngl fa test t/s
ggml_vulkan: Compiling shaders..............................Done!
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp1 37.79 ± 0.30
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp1 37.81 ± 0.29
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp2 16.14 ± 0.04
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp3 23.40 ± 0.06
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp4 31.10 ± 0.04
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp5 37.39 ± 1.74
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp6 45.52 ± 0.06
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp7 51.53 ± 0.09
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp8 58.57 ± 0.28
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp12 80.38 ± 0.13
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp16 105.83 ± 0.54
qwen2 7B Q8_0 7.54 GiB 7.62 B Vulkan 99 1 pp32 202.53 ± 0.21

build: 0c74590 (4160)

@mostlygeek
Copy link
Contributor

I tried out commit e80f758 with my P40s, 3xP40s and 3090. These are the commands for the baselines and the tests.

Baseline:

./llama-server -m /mnt/nvme/models/Qwen2.5-Coder-32B-Instruct-Q4_K_M.gguf -ngl 99 -ngld 99 -fa --port 9999 -c 4096 --draft-max 16 --draft-min 5

With speculative model (just removed the -md model.gguf):

./llama-server -m /mnt/nvme/models/Qwen2.5-Coder-32B-Instruct-Q4_K_M.gguf -md /mnt/nvme/models/Qwen2.5-Coder-0.5B-Instruct-Q4_K_M.gguf -ngl 99 -ngld 99 -fa --port 9999 -c 4096 --draft-max 16 --draft-min 5

Tested it with curl using:

for n in seq 1 5; do curl http://10.0.1.50:9999/v1/chat/completions -N -v -d '{"messages":[{"role":"user","content":"write hello world in golang"}],"temperature":0.1, "stream":false,"max_tokens":1000, "model":"coder" }'; done

Data:

GPU baseline pp baseline eval -md ... pp -md ... eval
3090 299 tps 34 tps 300 tps 31 tps
P40 101 tps 11.22 tps 101 tps 10.52 tps
3xP40 91 tps 10.6 tps 90 tps 9.8 tps

@ggerganov ggerganov force-pushed the gg/speculative-server branch from e80f758 to d905266 Compare November 24, 2024 19:59
@ggerganov
Copy link
Owner Author

ggerganov commented Nov 24, 2024

Currently, it requires cache_prompt: true to be set do speculation. Will be fixed in next PRs. Using greedy sampling should improve things as well:

cache_prompt: true, top_k: 1, samplers: ["top_k"]

The biggest benefit from speculative sampling is when you have more grounding. For example, if you have enough memory for a bigger context, you can try something like this:

# get the llama.vim plugin source code
code=$(curl -s https://raw.githubusercontent.com/ggml-org/llama.vim/refs/heads/master/autoload/llama.vim | jq -sRr @json)

# ask qwen to implement something (speculative decoding disabled)
curl --request POST --url http://localhost:8033/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer no-key" -d "$(jq -n --arg code "$code" \
  '{ messages: [{ role: "system", content: "You are an expert computer scientist. Respond only with code blocks. Do not add any other comments except code." }, { role: "user", content: "Suggest an improvement for the `chunk_sim` function using Levenstein distance: ```\($code)```" }], cache_prompt: true, top_k: 1, samplers: ["top_k"], "speculative.n_max": 0 }')" | jq -r .choices[0].message.content

# speculative decoding enabled
curl --request POST --url http://localhost:8033/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer no-key" -d "$(jq -n --arg code "$code" \
  '{ messages: [{ role: "system", content: "You are an expert computer scientist. Respond only with code blocks. Do not add any other comments except code." }, { role: "user", content: "Suggest an improvement for the `chunk_sim` function using Levenstein distance: ```\($code)```" }], cache_prompt: true, top_k: 1, samplers: ["top_k"], "speculative.n_max": 16 }')" | jq -r .choices[0].message.content

With CUDA, you might want to try setting "speculative.n_min": 0 or 1 since I think it has efficient small-batch kernels for Q4_K, so no need to skip the small batches.

@mostlygeek
Copy link
Contributor

mostlygeek commented Nov 24, 2024

Thank you for the guidance. Using d905266, I reran the tests.

Results look quite good.

GPU n_max:0 n_max:16 change
P40 8.7 tps 39.4 tps 4.45x
3xP40 -sm row 12.70 tps 53 tps 4.17x
3090 29 tps 167 tps 5.73x

Server command:

./llama-server -m /mnt/nvme/models/Qwen2.5-Coder-32B-Instruct-Q4_K_M.gguf -md /mnt/nvme/models/Qwen2.5-Coder-0.5B-Instruct-Q4_K_M.gguf -ngl 99 -ngld 99 -fa --port 9999 -c 10240 --draft-max 16 --draft-min 0 --host 0.0.0.0 2>&1 | grep 'eval time'

Kept this pretty consistent, except for the 3xP40 run where I added -sm row

Client side:

$ code=$(curl -s https://raw.githubusercontent.com/ggml-org/llama.vim/refs/heads/master/autoload/llama.vim | jq -sRr @json)

$ for n in `seq 1 5`; \
do \
    curl --request POST --url http://10.0.1.50:9999/v1/chat/completions \
        -H "Content-Type: application/json" -H "Authorization: Bearer no-key" \
        -d "$(jq -n --arg code "$code" '{ messages: [{ role: "system", content: "You are an expert computer scientist. Respond only with code blocks. Do not add any other comments except code." }, { role: "user", content: "Suggest an improvement for the `chunk_sim` function using Levenstein distance: ```\($code)```" }], cache_prompt: true, top_k: 1, samplers: ["top_k"], "speculative.n_max": 16 }')" | jq -r .choices[0].message.content; \
done

For the client side curl, I changed speculative.n_max between 0 and 16 to get the different timings.

Here are the raw results. Some observations first:

  • with n_max: 0, 437 tokens were generated. With n_max: 16, 440 tokens were generated.
  • the server was restarted between tests to clear the cache
  • the code generated was identical (ran it through a diff)

3090 data

# speculative.n_max: 0
prompt eval time =    8032.34 ms /  8318 tokens (    0.97 ms per token,  1035.56 tokens per second)
       eval time =   14975.84 ms /   437 tokens (   34.27 ms per token,    29.18 tokens per second)
prompt eval time =      37.56 ms /     1 tokens (   37.56 ms per token,    26.62 tokens per second)
       eval time =   14988.71 ms /   437 tokens (   34.30 ms per token,    29.16 tokens per second)
prompt eval time =      37.15 ms /     1 tokens (   37.15 ms per token,    26.92 tokens per second)
       eval time =   15005.60 ms /   437 tokens (   34.34 ms per token,    29.12 tokens per second)
prompt eval time =      37.27 ms /     1 tokens (   37.27 ms per token,    26.83 tokens per second)
       eval time =   15017.94 ms /   437 tokens (   34.37 ms per token,    29.10 tokens per second)
prompt eval time =      37.49 ms /     1 tokens (   37.49 ms per token,    26.67 tokens per second)
       eval time =   15026.50 ms /   437 tokens (   34.39 ms per token,    29.08 tokens per second)

# speculative.n_max: 16
prompt eval time =    7915.24 ms /  8318 tokens (    0.95 ms per token,  1050.88 tokens per second)
       eval time =    9432.51 ms /   440 tokens (   21.44 ms per token,    46.65 tokens per second)
prompt eval time =      38.44 ms /     1 tokens (   38.44 ms per token,    26.02 tokens per second)
       eval time =    2626.82 ms /   440 tokens (    5.97 ms per token,   167.50 tokens per second)
prompt eval time =      37.93 ms /     1 tokens (   37.93 ms per token,    26.37 tokens per second)
       eval time =    2629.31 ms /   440 tokens (    5.98 ms per token,   167.34 tokens per second)
prompt eval time =      37.91 ms /     1 tokens (   37.91 ms per token,    26.38 tokens per second)
       eval time =    2628.70 ms /   440 tokens (    5.97 ms per token,   167.38 tokens per second)
prompt eval time =      38.20 ms /     1 tokens (   38.20 ms per token,    26.18 tokens per second)
       eval time =    2637.09 ms /   440 tokens (    5.99 ms per token,   166.85 tokens per second)

single P40

# speculative.n_max: 0
prompt eval time =   55669.14 ms /  8318 tokens (    6.69 ms per token,   149.42 tokens per second)
       eval time =   50050.73 ms /   437 tokens (  114.53 ms per token,     8.73 tokens per second)
prompt eval time =     114.98 ms /     1 tokens (  114.98 ms per token,     8.70 tokens per second)
       eval time =   50075.91 ms /   437 tokens (  114.59 ms per token,     8.73 tokens per second)
prompt eval time =     113.24 ms /     1 tokens (  113.24 ms per token,     8.83 tokens per second)
       eval time =   50097.56 ms /   437 tokens (  114.64 ms per token,     8.72 tokens per second)
       
# speculative.n_max: 16
prompt eval time =   55362.42 ms /  8318 tokens (    6.66 ms per token,   150.25 tokens per second)
       eval time =   29859.49 ms /   440 tokens (   67.86 ms per token,    14.74 tokens per second)
prompt eval time =     113.02 ms /     1 tokens (  113.02 ms per token,     8.85 tokens per second)
       eval time =   11146.53 ms /   440 tokens (   25.33 ms per token,    39.47 tokens per second)
prompt eval time =     113.75 ms /     1 tokens (  113.75 ms per token,     8.79 tokens per second)
       eval time =   11142.33 ms /   440 tokens (   25.32 ms per token,    39.49 tokens per second)
prompt eval time =     113.19 ms /     1 tokens (  113.19 ms per token,     8.83 tokens per second)
       eval time =   11175.47 ms /   440 tokens (   25.40 ms per token,    39.37 tokens per second)
prompt eval time =     112.65 ms /     1 tokens (  112.65 ms per token,     8.88 tokens per second)
       eval time =   11159.70 ms /   440 tokens (   25.36 ms per token,    39.43 tokens per second)

3xP40 (-sm row)

# speculative.n_max: 0
prompt eval time =   36909.28 ms /  8318 tokens (    4.44 ms per token,   225.36 tokens per second)
       eval time =   34412.92 ms /   437 tokens (   78.75 ms per token,    12.70 tokens per second)
prompt eval time =      79.49 ms /     1 tokens (   79.49 ms per token,    12.58 tokens per second)
       eval time =   34414.53 ms /   437 tokens (   78.75 ms per token,    12.70 tokens per second)
prompt eval time =      79.40 ms /     1 tokens (   79.40 ms per token,    12.60 tokens per second)
       eval time =   34413.66 ms /   437 tokens (   78.75 ms per token,    12.70 tokens per second)

# speculative.n_max: 16
prompt eval time =   36858.25 ms /  8318 tokens (    4.43 ms per token,   225.68 tokens per second)
       eval time =   27168.81 ms /   440 tokens (   61.75 ms per token,    16.20 tokens per second)
prompt eval time =      79.72 ms /     1 tokens (   79.72 ms per token,    12.54 tokens per second)
       eval time =    8290.25 ms /   440 tokens (   18.84 ms per token,    53.07 tokens per second)
prompt eval time =      79.73 ms /     1 tokens (   79.73 ms per token,    12.54 tokens per second)
       eval time =    8295.16 ms /   440 tokens (   18.85 ms per token,    53.04 tokens per second)
prompt eval time =      79.99 ms /     1 tokens (   79.99 ms per token,    12.50 tokens per second)
       eval time =    8295.91 ms /   440 tokens (   18.85 ms per token,    53.04 tokens per second)
prompt eval time =      79.88 ms /     1 tokens (   79.88 ms per token,    12.52 tokens per second)
       eval time =    8301.95 ms /   440 tokens (   18.87 ms per token,    53.00 tokens per second)

Code generated:

function! s:chunk_sim(c0, c1)
    let l:lines0 = join(a:c0, "\n")
    let l:lines1 = join(a:c1, "\n")

    let l:distance = levenshtein(l:lines0, l:lines1)

    return 1 - (l:distance / max([strlen(l:lines0), strlen(l:lines1)]))
endfunction

function! levenshtein(s1, s2)
    let l:len1 = strlen(a:s1)
    let l:len2 = strlen(a:s2)

    if l:len1 == 0
        return l:len2
    endif

    if l:len2 == 0
        return l:len1
    endif

    let l:dp = []
    for i in range(l:len1 + 1)
        call add(l:dp, [])
        for j in range(l:len2 + 1)
            call add(l:dp[i], 0)
        endfor
    endfor

    for i in range(l:len1 + 1)
        let l:dp[i][0] = i
    endfor

    for j in range(l:len2 + 1)
        let l:dp[0][j] = j
    endfor

    for i in range(1, l:len1 + 1)
        for j in range(1, l:len2 + 1)
            let l:cost = (strcharpart(a:s1, i - 1, 1) == strcharpart(a:s2, j - 1, 1)) ? 0 : 1
            let l:dp[i][j] = min([l:dp[i - 1][j] + 1, l:dp[i][j - 1] + 1, l:dp[i - 1][j - 1] + l:cost])
        endfor
    endfor

    return l:dp[l:len1][l:len2]
endfunction

@mostlygeek
Copy link
Contributor

mostlygeek commented Nov 24, 2024

Also, is 0 and 16 the only valid values for speculative.n_max? I tried it with 4, 12, and got this error: common/common.cpp:1480: GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded") failed

@ggerganov
Copy link
Owner Author

ggerganov commented Nov 24, 2024

Thanks for the detailed tests. The results are inflated because there is one tricky side effect from the caching - consecutive runs with the same prompt will reuse the previous draft context which combined with greedy sampling would make the drafting instantaneous. So basically, in the following data for example, only the first result is relevant:

# speculative.n_max: 16
prompt eval time =    7915.24 ms /  8318 tokens (    0.95 ms per token,  1050.88 tokens per second)
       eval time =    9432.51 ms /   440 tokens (   21.44 ms per token,    46.65 tokens per second)    <--- only this is relevant
prompt eval time =      38.44 ms /     1 tokens (   38.44 ms per token,    26.02 tokens per second)
       eval time =    2626.82 ms /   440 tokens (    5.97 ms per token,   167.50 tokens per second)
prompt eval time =      37.93 ms /     1 tokens (   37.93 ms per token,    26.37 tokens per second)
       eval time =    2629.31 ms /   440 tokens (    5.98 ms per token,   167.34 tokens per second)
prompt eval time =      37.91 ms /     1 tokens (   37.91 ms per token,    26.38 tokens per second)
       eval time =    2628.70 ms /   440 tokens (    5.97 ms per token,   167.38 tokens per second)
prompt eval time =      38.20 ms /     1 tokens (   38.20 ms per token,    26.18 tokens per second)
       eval time =    2637.09 ms /   440 tokens (    5.99 ms per token,   166.85 tokens per second)

i.e. 46.65 t/s. The next runs are reusing the drafts and are not representative.

Also, is 0 and 16 the only valid values for speculative.n_max? I tried it with 4, 12, and got this error: common/common.cpp:1480: GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded") failed

This was a bug - it is fixed now. You should be able to change n_max to any value. Btw, for CUDA it might make sense to set n_min to 0 or 1 and keep n_max ~ 16. But feel free to experiment.

Btw, here is another fun test that I came up with which uses less context and is suitable for speculation:

# get top 10 stories from Hacker News
hn=$(curl -s https://hacker-news.firebaseio.com/v0/topstories.json | jq -r '.[:10] | @tsv' | tr '\t' '\n' | xargs -I {} curl -s "https://hacker-news.firebaseio.com/v0/item/{}.json" | jq -sRr @json)

# make a Markdown table based on some criteria
curl --request POST --url http://localhost:8033/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer no-key" -d "$(jq -n --arg hn "$hn" \
  '{ messages: [{ role: "system", content: "You are a helpful text-editing assistant. Respond only with the requested text. Do not add any other comments to your response." }, { role: "user", content: "Extract a Markdown table that contains only stories about software engineering, AI or machine learning from the front-page of HN. The table should include: author, title, score, comments and an URL to the story: ```\($hn)```." }], cache_prompt: true, top_k: 1, samplers: ["top_k"], "speculative.n_max": 16 }')" | jq -r .choices[0].message.content

@mostlygeek
Copy link
Contributor

i.e. 46.65 t/s. The next runs are reusing the drafts and are not representative.

Thanks. That seems a lot more realistic.

I did some tests with a much shorter prompt: "write snake game in swift"

GPU n_max:0 n_max:16 change
P40 10.54 tps 17.11 tps 1.62x
3xP40 -sm row 16.22 tps 22.80 tps 1.4x
3090 34.78 tps 51.31 tps 1.47x

curl --request POST --url http://10.0.1.50:9999/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer no-key" -d "$(jq -n --arg code "$code" '{ messages: [{ role: "system", content: "You are an expert computer scientist. Respond only with code blocks. Do not add any other comments except code." }, { role: "user", content: "write snake game in swift"}], cache_prompt: true, top_k: 1, samplers: ["top_k"], "speculative.n_max": 0 }')" | jq -r .choices[0].message.content;

@ggerganov
Copy link
Owner Author

These numbers look reasonable. The speedup can vary in both ways based on the inputs, but enabling speculative should almost never result in slower than normal decoding.

@3Simplex
Copy link

These numbers look reasonable. The speedup can vary in both ways based on the inputs, but enabling speculative should almost never result in slower than normal decoding.

With this build I am up to 25t/s on first run generation with speculative decoding using 15/5 draft tokens.

@mostlygeek
Copy link
Contributor

mostlygeek commented Nov 25, 2024

A bit of data with llama-3.1 70B and llama-3.2 1B as the draft model. Prompt: "write a story about the natural resources in Canada".

GPU n_max:0 n_max:16 change
3xP40 -sm row 9.80 tps 12.27 tps 1.25x

Server:

$ ./llama-server -m /mnt/nvme/models/Meta-Llama-3.1-70B-Instruct-Q4_K_L.gguf \
-md /mnt/nvme/models/Llama-3.2-1B-Instruct-Q4_K_M.gguf \
-ngl 99 -ngld 99 -fa --port 9999 -c 10240 --draft-max 16 --draft-min 1 \
--host 0.0.0.0 -sm row

client (changed speculative.n_max between 0 and 16)

$ curl --request POST --url http://10.0.1.50:9999/v1/chat/completions \
-d "$(jq -n --arg code "$code" '{ messages: [{ role: "system", content: "You are a helpful AI."}, {role: "user",content: "write a story about the natural resources in Canada"}], cache_prompt: true, top_k: 1, samplers: ["top_k"], "speculative.n_max": 0 }')" \
| jq -r .choices[0].message.content;

@ggerganov
Copy link
Owner Author

Note that I am not very sure what happens with multiple GPUs, but it is possible that the draft model gets split across them, which is not desired (see the logs if that is the case). You would want to keep the draft model fully on one GPU.

Base automatically changed from gg/speculative-refactor to master November 25, 2024 07:58
@ggerganov ggerganov force-pushed the gg/speculative-server branch from c277c4d to 156aa6d Compare November 25, 2024 08:05
@sorasoras
Copy link

Note that I am not very sure what happens with multiple GPUs, but it is possible that the draft model gets split across them, which is not desired (see the logs if that is the case). You would want to keep the draft model fully on one GPU.

I wonder if it is possible to load draft and main model onto different backend. Ie a 7900xtx and P40 in a -cb process

@ggerganov ggerganov merged commit 9ca2e67 into master Nov 25, 2024
62 checks passed
@vitobotta
Copy link

Could someone help me out? I'm trying to figure out where I'm going wrong.

I have an M4 Pro with 64 GB of memory and when I use the 32-bit Qwen models (both the regular and coder versions) with Llama.cpp, I usually get about 11 tokens per second. I'm trying to see if I can boost the speed by using speculative decoding, but I haven't had much luck so far.

For instance, when I run the following command:

llama-speculative -m $HOME/.cache/lm-studio/models/bartowski/Qwen2.5-Coder-32B-Instruct-GGUF/Qwen2.5-Coder-32B-Instruct-Q4_K_L.gguf -p "write a ruby script to count the files in a directory recursively" -ngl 1000 -ngld 1000 -fa -md  $HOME/.cache/lm-studio/models/bartowski/Qwen2.5-Coder-3B-GGUF/Qwen2.5-Coder-3B-Q4_0.gguf --top-k 1 --draft-max 16 --draft-min 5

I get this output:

encoded   12 tokens in    0.514 seconds, speed:   23.325 t/s
decoded  371 tokens in   34.412 seconds, speed:   10.781 t/s

n_draft   = 16
n_predict = 371
n_drafted = 912
n_accept  = 313
accept    = 34.320%

draft:

llama_perf_context_print:        load time =     273.47 ms
llama_perf_context_print: prompt eval time =   25054.05 ms /   125 tokens (  200.43 ms per token,     4.99 tokens per second)
llama_perf_context_print:        eval time =    8806.60 ms /   855 runs   (   10.30 ms per token,    97.09 tokens per second)
llama_perf_context_print:       total time =   34928.33 ms /   980 tokens

target:

llama_perf_sampler_print:    sampling time =      16.07 ms /   371 runs   (    0.04 ms per token, 23089.37 tokens per second)
llama_perf_context_print:        load time =    1120.41 ms
llama_perf_context_print: prompt eval time =   24730.76 ms /   981 tokens (   25.21 ms per token,    39.67 tokens per second)
llama_perf_context_print:        eval time =       0.00 ms /     1 runs   (    0.00 ms per token,      inf tokens per second)
llama_perf_context_print:       total time =   35201.82 ms /   982 tokens
ggml_metal_free: deallocating
ggml_metal_free: deallocating

There's no noticeable speed improvement. I also tried running the server with:

llama-server -m $HOME/.cache/lm-studio/models/bartowski/Qwen2.5-Coder-32B-Instruct-GGUF/Qwen2.5-Coder-32B-Instruct-Q4_K_L.gguf -ngl 99 -ngld 99 -fa -md  $HOME/.cache/lm-studio/models/bartowski/Qwen2.5-Coder-3B-GGUF/Qwen2.5-Coder-3B-Q4_0.gguf --top-k 1 --draft-max 16 --draft-min 5 --port 8033

But I still see the same token speed and no improvement. What am I missing here?

@PkmX
Copy link

PkmX commented Nov 26, 2024

I wonder if the default p-min of 0.9 is too high. I can get a further 20-30% speedup by setting a lower --draft-p-min in llama-server.

GPU: RTX 4060Ti 16GB
Model: Qwen2.5-Coder-32B-Instruct-IQ3_M.gguf
Draft: Qwen2.5-Coder-0.5B-Instruct-Q8_0.gguf
Sampling parameters: --temp 0 --top-k 1

p-min Write quicksort in C++ How do transformers in LLM work?
No SD ~17.3 ~17.2
0.9 ~25.0 ~18.3
0.8 ~27.7
0.7 ~29.6 ~20.4
0.6 ~30.7 ~21.9
0.5 ~32.0 ~19.7
0.4 ~30.7
0.3 ~30.0

@ggerganov
Copy link
Owner Author

@PkmX The p-min = 0.9 is very conservative. The idea is to enable the speculation only for blocks of tokens where the LLM is very confident. With CUDA, it might be better to reduce p-min and also n-min. Feel free to experiment.

@Mushoz
Copy link

Mushoz commented Nov 26, 2024

Why am I getting a consistent 60 tokens/sec with llama-speculative while only 40 tokens/s through llama-server? Using the following two commands:

llama-specutalive:

./llama-speculative -m /models/Qwen2.5-Coder-32B-Instruct-Q4_K_S.gguf -ngl 99 -md /models/Qwen2.5.1-Coder-1.5B-Instruct-IQ4_XS.gguf -ngld 99 --draft 10 -p "Please write a minesweeper game using html, js and css. Do not output any explanations. Only give me the 3 different files each in its own codeblock." --top-k 1 --temp 0.0

llama-server:

./llama-server --host 0.0.0.0 --port 8999 -m /models/Qwen2.5-Coder-32B-Instruct-Q4_K_S.gguf -ngl 99 -md /models/Qwen2.5.1-Coder-1.5B-Instruct-IQ4_XS.gguf -ngld 99 --draft 10 --top-k 1 --temp 0.0

And then querying the exact same prompt through openweb ui, with temperature set to 0 and top-k to 1.

Is there anything that can explain this rather big discrepancy?

llama-speculative: decoded 1332 tokens in 22.143 seconds, speed: 60.155 t/s
llama-server: eval time = 31188.10 ms / 1281 tokens ( 24.35 ms per token, 41.07 tokens per second)

@Mushoz
Copy link

Mushoz commented Nov 26, 2024

Quick update: Dropping p-min increased the tokens/second for llama-server. I maxed out the speed at 53 tokens/second at 0.4 p-min, which remaining at 53 tokens/second all the way down to 0. Two questions that come to mind:

  1. Why do I see a performance increase lowering p-min with llama-server, but not with llama-speculative. Both have the same default AFAIK?
  2. While performance is better, it's still not quite at llama-speculative levels. How do I obtain the same performance there?

Update 2:

Managed to obtain the following result: eval time = 21349.26 ms / 1292 tokens ( 16.52 ms per token, 60.52 tokens per second)

This was obtained through the following command: ./llama-server --host 0.0.0.0 --port 8999 -m /models/Qwen2.5-Coder-32B-Instruct-Q4_K_S.gguf -ngl 99 -md /models/Qwen2.5.1-Coder-1.5B-Instruct-IQ4_XS.gguf -ngld 99 --top-k 1 --temp 0.0 --draft-p-min 0 --draft-max 15

Over 60 tokens/second on a single 7900XTX! What a time to be alive :) Thank you so much for all your hard work @ggerganov ! Still very curious why I need different settings between llama-speculative and llama-server, but at least I am extremely happy I was able to fully unlock the potential of my 7900XTX

@ggerganov
Copy link
Owner Author

@Mushoz llama-speculative is a different implementation of speculative decoding which is mainly used for experimenting and research. In some cases it will be more efficient, in other cases it will be less efficient. The llama-server support which is added here is a conservative approach (greedy speculation) which primarily aims to not make the performance worse than without using SD, across a larger variety of hardware - not just CUDA. With time, it will be improved. Also, you cannot really evaluate the SD gains based on individual prompts like this - the SD gains vary widely on the specific input. And using 3rd party clients introduces unknowns that we cannot analyze. The only expected result is that if you use the instructions in OP, the performance will not be worse compared to SD-less inference.

@countzero
Copy link

Hi,

I got it running on a NVIDIA GeForce RTX 4070 Ti SUPER:

llama-server `
    --model './models/Qwen2.5-Coder-32B-Instruct.IQ3_XXS.gguf' `
    --ctx-size 8192 `
    --threads 16 `
    --n-gpu-layers 99 `
    --flash-attn `
    --top-k 1 `
    --temp 0.1 `
    --model-draft './models/Qwen2.5-Coder-0.5B-Instruct.IQ4_XS.gguf' `
    --ctx-size-draft 8192 `
    --n-gpu-layers-draft 99 `
    --draft-p-min 0.5 `
    --draft-min 5 `
    --draft-max 16
llama-server `
    --model './models/Qwen2.5-Coder-32B-Instruct.IQ3_XXS.gguf' `
    --ctx-size 8192 `
    --threads 16 `
    --n-gpu-layers 99 `
    --flash-attn `
    --top-k 1 `
    --temp 0.1
p-min Write the Quicksort algorithm in TypeScript. How many persons are needed to power a 800W toaster?
No SD 38 t/s 38 t/s
0.9 62 t/s 23 t/s
0.8 66 t/s 23 t/s
0.7 67 t/s 23 t/s
0.6 72 t/s 35 t/s
0.5 79 t/s 35 t/s
0.4 78 t/s 34 t/s
0.3 73 t/s 32 t/s
0.2 71 t/s 25 t/s
0.1 71 t/s 23 t/s

@ggerganov I could reproduce the findings of @PkmX that a --draft-p-min value of 0.5 is the optimum. At least on my hardware. Thank you for your work!

@ggerganov
Copy link
Owner Author

Thanks for the feedback. Does --draft-min 0 help in these cases?

@countzero
Copy link

@ggerganov I did some tests with draft-min and found a sweet spot with the value 3:

Device: NVIDIA GeForce RTX 4070 Ti SUPER
Build: b4202

llama-server `
    --model './models/Qwen2.5-Coder-32B-Instruct.IQ3_XXS.gguf' `
    --ctx-size 8192 `
    --threads 16 `
    --n-gpu-layers 99 `
    --flash-attn `
    --top-k 1 `
    --temp 0.1 `
    --model-draft './models/Qwen2.5-Coder-0.5B-Instruct.IQ4_XS.gguf' `
    --ctx-size-draft 8192 `
    --n-gpu-layers-draft 99 `
    --draft-p-min 0.5 `
    --draft-min 3 `
    --draft-max 16
draft-min Write the Quicksort algorithm in TypeScript. How many persons are needed to power a 800W toaster?
No SD 38 t/s 38 t/s
8 77 t/s 33 t/s
7 77 t/s 34 t/s
6 76 t/s 34 t/s
4 79 t/s 36 t/s
3 81 t/s 37 t/s
2 80 t/s 37 t/s
1 79 t/s 37 t/s
0 64 t/s 32 t/s

Roughly doubling the t/s in optimal use cases is a very respectable speed bump! And falling back to nearly the performance as without speculative decoding for worst case scenarios is good to see.

Performance drop of speculative decoding with cache quantization

Combining speculative decoding with a --cache-type-[k|v] other than f16 resulted in a massive performance drop:

SD cache-type Write the Quicksort algorithm in TypeScript. How many persons are needed to power a 800W toaster?
0 f16 38 t/s 38 t/s
0 q8_0 38 t/s 38 t/s
0 q4_0 38 t/s 38 t/s
1 f16 81 t/s 37 t/s
1 q8_0 45 t/s 33 t/s
1 q4_0 33 t/s 24 t/s

I was not expecting the cache quantization to have such a drastic impact. Is this to be expected, or a bug?

@JeroenAdam
Copy link

I was not expecting the cache quantization to have such a drastic impact. Is this to be expected, or a bug?

I reported the same earlier here, I experienced overflow to shared GPU-mem of the KV cache although GPU memory still got room. For now I'm only using flash attention and not KV cache quantization with similar +100% speed bump in optimal cases.

@webbigdata-jp
Copy link

Hello
I used AMD's iGPU and it was very fast, so I'm excited, thank you.

However, I noticed that using speculative decoding with only the CPU can slow things down.

Does speculative decoding require a GPU?

@dagbdagb
Copy link

dagbdagb commented Dec 1, 2024

Hello I used AMD's iGPU and it was very fast, so I'm excited, thank you.

However, I noticed that using speculative decoding with only the CPU can slow things down.

Does speculative decoding require a GPU?

I am curious about what numbers you see with/without speculative decoding on CPU. Please include details.

  • What models/model sizes/quants are you using
  • What CPU/memory do you have?
  • How much memory?
  • What are your prompts for testing?
  • Results with/without a draft model

@webbigdata-jp
Copy link

webbigdata-jp commented Dec 1, 2024

@dagbdagb
Hello.
thank you for your reply.

What models/model sizes/quants are you using

-m  .\gemma-2-27B-it-Q4_K_M-fp16.gguf ^ [18 GB]
-md .\gemma-2-2b-it-IQ3_XXS.gguf ^ [1.18 GB]

repository
https://huggingface.co/dahara1/gemma-2-2b-it-gguf-japanese-imatrix
https://huggingface.co/dahara1/gemma-2-27b-it-gguf-japanese-imatrix

What CPU/memory do you have?

AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Windows 11 Pro (not docker, not WSL)

How much memory?

Total 32.0GB available 27.8 GB (4GB for iGPU)
I visually check during execution that no swapping is occurring.

What are your prompts for testing?

extract specific data from around 1500 tokens of text in Japanese (repeat 26 times)

Results with/without a draft model

(1)b4219(llama.cpp official binary)

..\llama-b4219-bin-win-avx512-x64\llama-server.exe ^
    -m  .\gemma-2-27B-it-Q4_K_M-fp16.gguf ^
    -md .\gemma-2-2b-it-IQ3_XXS.gguf ^
    -e --temp 0 -c 4096 ^
    --draft-max 16 --draft-min 5

5764.07 second

..\llama-b4219-bin-win-avx512-x64\llama-server.exe ^
    -m  .\gemma-2-27B-it-Q4_K_M-fp16.gguf ^
    -e --temp 0 -c 4096

4968.42 second

(2)locally built myself(b4227)

..\llama.cpp\build\bin\Release\llama-server.exe ^
    -m  .\gemma-2-27B-it-Q4_K_M-fp16.gguf ^
    -md .\gemma-2-2b-it-IQ3_XXS.gguf ^
    -e --temp 0 -c 4096 ^
    --draft-max 16 --draft-min 5

5807.13 second

..\llama.cpp\build\bin\Release\llama-server.exe ^
    -m  .\gemma-2-27B-it-Q4_K_M-fp16.gguf ^
    -e --temp 0 -c 4096

5003.03 second

(3)ROCm (b4215)

set HSA_OVERRIDE_GFX_VERSION=gfx1103 && .\llama-server.exe ^
    -m  .\gemma-2-27B-it-Q4_K_M-fp16.gguf ^
    -md .\gemma-2-2b-it-IQ3_XXS.gguf ^
    -ngl 10 -ngld 10 -e --temp 0 -c 4096 ^
    --draft-max 16 --draft-min 5

1576.67 second

I feel that the 2B model may not be able to run fast enough on the CPU. This causing a bottleneck.

@mybyte
Copy link

mybyte commented Dec 2, 2024

Tried it with Qwen-2.5 on my 2x 3090s. No performance improvements whatsoever with 72b split across both GPUs. Lost some performance, actually. Ran a bunch of experiments using different hints I picked up here. No performance gains still, running the 14b variant on the same gpu as draft models (tried 0.5, 1.5b, 3b) or the other gpu, any permutation of draft-p-min and speculative.n_max. Best I got was 2-3 tps more (around 56 tps) as compare to ~54 I'm getting running without the draft model.

llama-server -m /models/qwen2.5-14b-instruct-q6_k.gguf -md /models/qwen2.5-0.5b-instruct-q5_0.gguf -ngl 99 -ngld 99 -c 32000 --n-gpu-layers 99 --host 0.0.0.0 -fa --draft-max 16 --draft-min 5 -devd CUDA1 -dev CUDA1 --n-gpu-layers-draft 99 --draft-p-min 0.5 --top-k 1 --n-gpu-layers-draft 99 -cd 32000

Maybe I'm missing something obvious, but no clue how other folks got such huge performance gains.

@JeroenAdam
Copy link

JeroenAdam commented Dec 2, 2024

I tested b4240 with 150% speed bump which must be an optimal use case with my non-optimal hardware (16GB P5000 + 8GB RTX 2070 Max-Q). These tweaks contributed to that: draft-min 0, draft-p-min 0.5 and temperature 0.1.
That said, I lose 30% of that optimal speed when using ctk q8_0 and ctv q8_0 with 32K context instead of 16K context unquantized.

llama-server -m Qwen2.5-Coder-32B-Instruct-IQ4_XS.gguf -md Qwen2.5-Coder-0.5B-Instruct-Q4_0.gguf -ngl 99 -ngld 99 -fa -c 32768 -ctk q8_0 -ctv q8_0 --draft-max 16 --draft-min 0 --draft-p-min 0.5 --device-draft CUDA0 -ts 0.4,1
eval time = 70247.85 ms / 1077 tokens ( 65.23 ms per token, 15.33 tokens per second)
eval time = 128839.95 ms / 1439 tokens ( 89.53 ms per token, 11.17 tokens per second)
eval time = 153567.05 ms / 1805 tokens ( 85.08 ms per token, 11.75 tokens per second)

llama-server -m Qwen2.5-Coder-32B-Instruct-IQ4_XS.gguf -md Qwen2.5-Coder-0.5B-Instruct-Q4_0.gguf -ngl 99 -ngld 99 -fa -c 16384 --draft-max 16 --draft-min 0 --draft-p-min 0.5 --device-draft CUDA0 -ts 0.4,1
eval time = 60899.25 ms / 1077 tokens ( 56.55 ms per token, 17.68 tokens per second)
eval time = 74965.36 ms / 1180 tokens ( 63.53 ms per token, 15.74 tokens per second)
eval time = 87163.09 ms / 1695 tokens ( 51.42 ms per token, 19.45 tokens per second)

@ggerganov
Copy link
Owner Author

@mybyte Did you remember to set Top K = 1 in the UI?

image

@ggerganov
Copy link
Owner Author

ggerganov commented Dec 3, 2024

That said, I lose 30% of that optimal speed when using ctk q8_0 and ctv q8_0 with 32K context instead of 16K context unquantized.

@JeroenAdam This should be fixed now (#10586)

@mybyte
Copy link

mybyte commented Dec 3, 2024

@mybyte Did you remember to set Top K = 1 in the UI?

Yup. Tried both, UI and my app via REST.

I wonder if a potential culprit is the model choice?

@David-AU-github
Copy link

David-AU-github commented Dec 9, 2024

First - wow ; is this some upgrade- Hats off.
My testing is a different direction:
How does this affect creative generation?

So I "mixed" two versions of the same model (llama3, 8B) , one reg quant, one imatrix quant (draft):
(release b4291)

``
./llama-server --model 'd:/llm/L3-Dark-Planet-8B-D_AU-IQ4_XS.gguf'
--ctx-size 2048 `
--n-gpu-layers 99 `
--model-draft 'd:/llm/L3-Dark-Planet-8B-NEO-IMAT-D_AU-IQ2_S-imat.gguf' `
--ctx-size-draft 2048 `
--n-gpu-layers-draft 99 `
--draft-p-min 0.5 `
--draft-min 3 `
--draft-max 16

``
Dark Planet is a model I created; Neo Imatrix is a dataset I also created (specifically SI-FI).
This setup takes 7.5 GB of VRAM.

Using a custom sampler profile (includes use of DRY, temp .84, and penalty samplers) ... here is part output from a ONE LINE prompt:

_I stood frozen at my desk, staring into the abyss of the office park outside our high-rise building. My fingers were still poised above the keyboard, the cursor blinking mockingly at me like some malignant eye. The air was thick with tension, the kind that precedes an announcement no one wants to hear. But this was different. This was personal.

As I gazed out over the sea of cubicles and fluorescent lights, something began to rumble beneath my feet, like thunder growing nearer. A low, ominous hum filled my ears, making my teeth ache. Suddenly, the sky scraper swayed, as if buffeted by a storm force wind. I grabbed onto the edge of my desk for support, my heart racing with alarm.

My coworkers gasped and screamed as we all stumbled about, our chairs scraping against tile floors. Glass shattered somewhere nearby, and a panicked shout rose up from below. It felt like a seismic event, a catastrophic shift in the earth's crust that had nothing to do with geology.

Then came the blast._
(full output is just over 1000 tokens)

You don't get this level of detail at 8B. Or prose, or metaphors.
Just does not happen.
Lucky if you can get this with a 35B... or higher.

This is like a MOE on steroids. A lot of steroids.
And on my card (4060TI geforce, 16GB): 30 t/s. (a minus 20 t/s hit from IQ4XS , well worth it)
thank you - this is fantastic.

@Mushoz
Copy link

Mushoz commented Dec 9, 2024

@David-AU-github I don't think you quite understand how speculative decoding works. It will generate identical results to the non-speculative decoding case and will always generate what the main model would have generated on its own. It's only useful as a speed boost, it will not alter the output at all.

@David-AU-github
Copy link

@Mushoz
From what I read speculative decoding takes tokens from the draft model and either accepts or rejects them.
Please clarify if this is off base / incorrect.
The information on this is not clear.

Also - number of "drafts" ? Great variance here in output here.
I read all the charts and comments - still not sure.
This model has been tested a lot, and I have tested a lot of 8B models ; this level of detail is unheard of.

I also tested this model - both main and draft - separately to see if I could replicate this level of detail.
Going to try again and see what happens.

Note : The two models - even thou the same model - one is imatrix version and the other non-imatrix version. In static tests (temp=0) each model will output different content from the same prompt.

@Mushoz
Copy link

Mushoz commented Dec 9, 2024

Normally a model can only predict one token at a time, because the token at position N depends on all previous tokens 0 through N-1. It would be much quicker if a model could predict not only token at position N, but also (depending on number of drafts) N+1, N+2, N+3. The reason why this is much faster, is because all the weight data of the big slow model only needs to be retrieved once for all 4 tokens, and LLMs are generally memory bandwidth limited. More calculations need to be done, but GPUs are extremely good at parallel computations which is what this is. But this cannot normally be done, because you need all previous tokens to be able to generate the next.

What the draft model does, is generate a sequence of draft tokens N, N+1, N+2. The big model then assumes these to be true and generates 1 token ahead of each of these draft token, so it can do multiple at the same time. That means that despite the draft model generating N, N+1, N+2, the big model still generates these as well to verify them, but is able to do so in parallel (fast) instead of in sequence as is done in normal generation.

If the base model generates a different token than what the draft model predicted, all subsequent tokens are discarded and the drafting is started all over again. This means that tokens are only retained if the draft model predicted the token the base model generated, which is why the output in speculative decoding is identical to what the base model would have generated in non speculative decoding. And this is also why a speed up is only observed if the predictions are good enough, because if not, all the extra work is simply discarded.

@David-AU-github
Copy link

@Mushoz

Thank you.

To clarify ; you get a speed increase in the vast majority of draft sequence tokens are "in agreement" between the draft and main model.

The "draft" min / max is the number of tokens to generate for sequence? -> that is the min/max size of sequence?
or is that the min/max to accept ?

If the draft sequence / token(s) are not in agreement do both models "go back to the drawing board" and both models "redraft" a sequence of tokens?

If this point is true - specifically both models - , that explains what I am observing and I can work with that.
One of the core issues with creative use of a model is poor token choice(s).

It sounds like when I am err... using speculative decoding in this way it is forcing different choices to occur than would otherwise happen. Almost like a strange version of temp and/or a "light" rep pen sampler ? or adding a random element into the generation?

I have tested this method with other models / archs too and observing an increase in generational quality, with a decrease in T/S.
I do understand the intent of spc decoding is a net speed increase.
I am just looking at alt uses... because you just never know.

@Mushoz
Copy link

Mushoz commented Dec 9, 2024

The maximum amount of tokens to draft, is just that: How long of a sequence the draft model will draft. The higher this value is, the higher potential speed increase (up to a maximum, where you become compute bound), as long as the predictions are correct. For longer sequences, the draft model will most definitely generate something else than the main model. That means there is a sweet spot somewhere. Too high and you're just wasting work that is discarded, leading to slowdowns.

The draft min is a variable that will tune how long your draft sequence needs to be at a minimum before the main model uses the draft predictions to do the final predictions. Some GPUs might not be terribly efficient at certain batch sizes, so it might be better to force them to higher batch sizes where the kernels are better optimized for batch processing.

When the main model is in disagreement, all draft tokens are discarded and all tokens generated by the main model that were BASED ON THE INCORRECT DRAFT TOKEN(S) are discarded as well. Importantly, the token that was generated by the main model that proved the draft wrong is NOT discarded, and the main model essentially falls back to the normal non-speculative decoding case.

Again, the main model will generate the exact same tokens with speculative decoding on vs off. The differences you are observing are purely due to sampler settings. Speculative decoding does not alter the output in any way, and anything you believe you are seeing is merely placebo.

@David-AU-github
Copy link

David-AU-github commented Dec 9, 2024

@Mushoz

Excellent. thank you.
One last question:

RE:
Importantly, the token that was generated by the main model that proved the draft wrong is NOT discarded, and the main model essentially falls back to the normal non-speculative decoding case.

How long does the model fall back into "normal non-speculative decoding" operation?

Until the next sequence of draft tokens from the draft model?
or is this a hard fall back - like the draft model is ignored from this point forward until generation is complete?

@Mushoz
Copy link

Mushoz commented Dec 9, 2024

It doesn't really fall back in the literal sense. What I mean is that the draft tokens that were generated incorrectly are simply ignored as if speculative decoding had never been turned on in the first place. Speculative decoding will remain effective in the sense that the draft model will immediately generate a new draft sequence after getting corrected by the main model and the main model will then again use that sequence to do the validation, just as it had been doing before.

@Mushoz
Copy link

Mushoz commented Dec 9, 2024

Note that this only applies to the incorrect draft token itself, and all subsequent tokens (as they are based on an incorrect preceding token). All correct draft tokens before the incorrect one are retained of course. If a draft sequence is 16 tokens long, it's perfectly possible the first 8 tokens are correct (which are retained) and the 9th is incorrect, which means token 9 through 16 of the sequence are discarded.

@David-AU-github
Copy link

@Mushoz Thank you for your help with this.
I think there is something there - for off use case - just not sure what.

There is an interesting divergence for creative use with very low bit quants VS mid/high which may benefit or be a benefit. (this is separate and part from spec decoding). Hmmm.

Never mind two different models all together (with same vocab)... hmmm 2x.

MOEs... raise even more questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.