Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ByronHsu committed Aug 19, 2024
1 parent ae71657 commit ce7735d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions examples/huggingface/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

@dataclass
class CustomArguments:
model_name: str = (
"meta-llama/Meta-Llama-3-8B"
)
model_name: str = "meta-llama/Meta-Llama-3-8B"
dataset: str = "tatsu-lab/alpaca"
max_seq_length: int = 512
use_liger: bool = False
Expand Down
3 changes: 2 additions & 1 deletion examples/lightning/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
import lightning.pytorch as pl
import torch
import transformers
from liger_kernel.transformers import apply_liger_kernel_to_llama
from lightning.pytorch.strategies import DeepSpeedStrategy, FSDPStrategy
from torch.distributed.fsdp import BackwardPrefetch, MixedPrecision
from torch.utils.data import DataLoader
from transformers.models.llama.modeling_llama import LlamaDecoderLayer
from trl import DataCollatorForCompletionOnlyLM

from liger_kernel.transformers import apply_liger_kernel_to_llama

apply_liger_kernel_to_llama(fused_linear_cross_entropy=True, cross_entropy=False)


Expand Down

0 comments on commit ce7735d

Please sign in to comment.