├── .env.example ├── .gitignore ├── LICENSE ├── README.md ├── assets ├── d2cache.png ├── framework.png ├── hooks.png └── logo.png ├── configs ├── cache │ ├── d2cache.yaml │ ├── dllm.yaml │ └── prefix.yaml ├── default.yaml ├── eval.yaml ├── gen_args.py ├── generation │ ├── daedal.yaml │ ├── klass.yaml │ ├── pc_sampler.yaml │ └── vanilla.yaml └── model │ ├── dream-base.yaml │ ├── dream-common.yaml │ ├── dream-inst.yaml │ ├── llada-base.yaml │ ├── llada-common.yaml │ └── llada-inst.yaml ├── docs ├── code_reading_guides.md ├── customization.md ├── decoding_strategies.md └── kv_caching.md ├── eval.py ├── pyproject.toml ├── requirements └── common.txt ├── scripts ├── fix_code_eval.sh └── run_eval.sh ├── src ├── __init__.py ├── cache │ ├── __init__.py │ ├── base.py │ ├── d2cache.py │ ├── dllm_cache.py │ └── prefix_cache.py ├── dream │ ├── __init__.py │ ├── configuration_dream.py │ ├── generation_utils.py │ └── modeling_dream.py ├── eval_model │ ├── __init__.py │ ├── dream.py │ ├── llada.py │ └── model_base.py ├── frame.py ├── generation │ ├── __init__.py │ ├── daedal.py │ ├── klass.py │ ├── utils.py │ └── vanilla.py ├── llada │ ├── __init__.py │ ├── configuration_llada.py │ └── modeling_llada.py ├── third_party │ ├── __init__.py │ ├── dream_corpus.json │ └── llada_corpus.json └── utils.py └── tasks ├── humaneval ├── README.md ├── humaneval.yaml ├── humaneval_64.yaml ├── humaneval_64_instruct.yaml ├── humaneval_instruct.yaml ├── humaneval_plus.yaml └── utils.py └── math-500 ├── math-500.yaml └── utils.py /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/.env.example -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/README.md -------------------------------------------------------------------------------- /assets/d2cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/assets/d2cache.png -------------------------------------------------------------------------------- /assets/framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/assets/framework.png -------------------------------------------------------------------------------- /assets/hooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/assets/hooks.png -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/assets/logo.png -------------------------------------------------------------------------------- /configs/cache/d2cache.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/cache/d2cache.yaml -------------------------------------------------------------------------------- /configs/cache/dllm.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/cache/dllm.yaml -------------------------------------------------------------------------------- /configs/cache/prefix.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/cache/prefix.yaml -------------------------------------------------------------------------------- /configs/default.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/default.yaml -------------------------------------------------------------------------------- /configs/eval.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/eval.yaml -------------------------------------------------------------------------------- /configs/gen_args.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/gen_args.py -------------------------------------------------------------------------------- /configs/generation/daedal.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/generation/daedal.yaml -------------------------------------------------------------------------------- /configs/generation/klass.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/generation/klass.yaml -------------------------------------------------------------------------------- /configs/generation/pc_sampler.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/generation/pc_sampler.yaml -------------------------------------------------------------------------------- /configs/generation/vanilla.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/generation/vanilla.yaml -------------------------------------------------------------------------------- /configs/model/dream-base.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/model/dream-base.yaml -------------------------------------------------------------------------------- /configs/model/dream-common.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/model/dream-common.yaml -------------------------------------------------------------------------------- /configs/model/dream-inst.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/model/dream-inst.yaml -------------------------------------------------------------------------------- /configs/model/llada-base.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/model/llada-base.yaml -------------------------------------------------------------------------------- /configs/model/llada-common.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/model/llada-common.yaml -------------------------------------------------------------------------------- /configs/model/llada-inst.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/configs/model/llada-inst.yaml -------------------------------------------------------------------------------- /docs/code_reading_guides.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/docs/code_reading_guides.md -------------------------------------------------------------------------------- /docs/customization.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/docs/customization.md -------------------------------------------------------------------------------- /docs/decoding_strategies.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/docs/decoding_strategies.md -------------------------------------------------------------------------------- /docs/kv_caching.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/docs/kv_caching.md -------------------------------------------------------------------------------- /eval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/eval.py -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/pyproject.toml -------------------------------------------------------------------------------- /requirements/common.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/requirements/common.txt -------------------------------------------------------------------------------- /scripts/fix_code_eval.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/scripts/fix_code_eval.sh -------------------------------------------------------------------------------- /scripts/run_eval.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/scripts/run_eval.sh -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/__init__.py -------------------------------------------------------------------------------- /src/cache/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/cache/__init__.py -------------------------------------------------------------------------------- /src/cache/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/cache/base.py -------------------------------------------------------------------------------- /src/cache/d2cache.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/cache/d2cache.py -------------------------------------------------------------------------------- /src/cache/dllm_cache.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/cache/dllm_cache.py -------------------------------------------------------------------------------- /src/cache/prefix_cache.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/cache/prefix_cache.py -------------------------------------------------------------------------------- /src/dream/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/dream/__init__.py -------------------------------------------------------------------------------- /src/dream/configuration_dream.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/dream/configuration_dream.py -------------------------------------------------------------------------------- /src/dream/generation_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/dream/generation_utils.py -------------------------------------------------------------------------------- /src/dream/modeling_dream.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/dream/modeling_dream.py -------------------------------------------------------------------------------- /src/eval_model/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/eval_model/__init__.py -------------------------------------------------------------------------------- /src/eval_model/dream.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/eval_model/dream.py -------------------------------------------------------------------------------- /src/eval_model/llada.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/eval_model/llada.py -------------------------------------------------------------------------------- /src/eval_model/model_base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/eval_model/model_base.py -------------------------------------------------------------------------------- /src/frame.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/frame.py -------------------------------------------------------------------------------- /src/generation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/generation/__init__.py -------------------------------------------------------------------------------- /src/generation/daedal.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/generation/daedal.py -------------------------------------------------------------------------------- /src/generation/klass.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/generation/klass.py -------------------------------------------------------------------------------- /src/generation/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/generation/utils.py -------------------------------------------------------------------------------- /src/generation/vanilla.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/generation/vanilla.py -------------------------------------------------------------------------------- /src/llada/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/llada/__init__.py -------------------------------------------------------------------------------- /src/llada/configuration_llada.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/llada/configuration_llada.py -------------------------------------------------------------------------------- /src/llada/modeling_llada.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/llada/modeling_llada.py -------------------------------------------------------------------------------- /src/third_party/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/third_party/__init__.py -------------------------------------------------------------------------------- /src/third_party/dream_corpus.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/third_party/dream_corpus.json -------------------------------------------------------------------------------- /src/third_party/llada_corpus.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/third_party/llada_corpus.json -------------------------------------------------------------------------------- /src/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/src/utils.py -------------------------------------------------------------------------------- /tasks/humaneval/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/humaneval/README.md -------------------------------------------------------------------------------- /tasks/humaneval/humaneval.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/humaneval/humaneval.yaml -------------------------------------------------------------------------------- /tasks/humaneval/humaneval_64.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/humaneval/humaneval_64.yaml -------------------------------------------------------------------------------- /tasks/humaneval/humaneval_64_instruct.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/humaneval/humaneval_64_instruct.yaml -------------------------------------------------------------------------------- /tasks/humaneval/humaneval_instruct.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/humaneval/humaneval_instruct.yaml -------------------------------------------------------------------------------- /tasks/humaneval/humaneval_plus.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/humaneval/humaneval_plus.yaml -------------------------------------------------------------------------------- /tasks/humaneval/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/humaneval/utils.py -------------------------------------------------------------------------------- /tasks/math-500/math-500.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/math-500/math-500.yaml -------------------------------------------------------------------------------- /tasks/math-500/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kamichanw/d2Cache/HEAD/tasks/math-500/utils.py --------------------------------------------------------------------------------