Skip to content

Commit

Permalink
feat: enable flash attention
Browse files Browse the repository at this point in the history
  • Loading branch information
asawczyn committed Mar 13, 2024
1 parent 29da4e0 commit eb7ef70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/fine_tune_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_model_and_tokenizer() -> tuple[PreTrainedModel, PreTrainedTokenizer]:
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
# attn_implementation="flash_attention_2",
attn_implementation="flash_attention_2",
torch_dtype=torch.bfloat16,
quantization_config=bnb_config,
)
Expand Down

0 comments on commit eb7ef70

Please sign in to comment.