Skip to content

Experiments with controlling how many tokens to predict for speculative decoding

Notifications You must be signed in to change notification settings

skrider/speculative-forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speculative Forecasting

This repo contains some experiments for controlling how many tokens to predict ahead for speculative decoding. The RL environment scaffolding and DQN implementation is from CS 285 at UC Berkeley.

Install

conda create --name dman
conda activate dman
conda install python=3.10 swig
pip install -r requirements.txt
pip install -e .

Generate Dataset

This repo makes heavy use of offline preprocessing. For now, we preprocess all sequences with scripts/process_dataset.py and cache the main and draft model hidden states for each token. To generate the dataset, download lmsys chat 1m and run scripts/process_dataset.py to generate the caches.

About

Experiments with controlling how many tokens to predict for speculative decoding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published