Update gemma.py

This commit is contained in:
Daniel Han-Chen 2024-02-24 14:27:39 +11:00
commit ef235c3508

View file

@ -260,10 +260,10 @@ class FastGemmaModel(FastLlamaModel):
# GemmaAttention .forward = LlamaAttention_fast_forward
# GemmaSdpaAttention .forward = LlamaAttention_fast_forward
# GemmaFlashAttention2.forward = LlamaAttention_fast_forward
GemmaDecoderLayer .forward = GemmaDecoderLayer_fast_forward
GemmaModel .forward = LlamaModel_fast_forward
GemmaForCausalLM .forward = GemmaForCausalLM_fast_forward
PeftModelForCausalLM.forward = PeftModelForCausalLM_fast_forward
# GemmaDecoderLayer .forward = GemmaDecoderLayer_fast_forward
# GemmaModel .forward = LlamaModel_fast_forward
# GemmaForCausalLM .forward = GemmaForCausalLM_fast_forward
# PeftModelForCausalLM.forward = PeftModelForCausalLM_fast_forward
# Solves https://github.com/unslothai/unsloth/issues/168
# Static KV Cache was introduced in 4.38.0, causing training to be much slower.