mscheong01/speculative_decoding.c

minimal C implementation of speculative decoding based on llama2.c

23
/ 100
Experimental

Implements speculative decoding by pairing a lightweight draft model with a larger base model to accelerate inference—the draft model generates token candidates which the base model validates and accepts or rejects, with visual output distinguishing accepted vs. rejected tokens. Extends llama2.c with multi-token forwarding support and works with both TinyLlama and Meta's Llama 2 model weights. Trade-off: generation length is limited by the draft model's maximum sequence length.

No commits in the last 6 months.

Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 7 / 25
Maturity 9 / 25
Community 7 / 25

How are scores calculated?

Stars

28

Forks

2

Language

C

License

MIT

Last pushed

Jul 15, 2024

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/mscheong01/speculative_decoding.c"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.