Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
gordicaleksa committed Aug 2, 2024
1 parent 838cd13 commit c414d02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions llmc_py/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Taken from:
# 1) https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/api/model.py
# 2) https://github.com/meta-llama/llama3/blob/11817d47e1ba7a4959b025eb1ca308572e0e3963/llama/generation.py

import torch
from torch import nn

Expand Down
3 changes: 2 additions & 1 deletion train_gpt2.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from contextlib import nullcontext
from dataclasses import dataclass
from pathlib import Path

from typing import (
List,
Optional,
Expand Down Expand Up @@ -988,6 +987,8 @@ def print0(*args, **kwargs):
print(f"{result['generation']}")
print("\n==================================\n")

exit(0) # only inference supported for now

# -------------------------------------------------------------------------
# PyTorch -> C bridge: save some weights and state for C to load later as reference

Expand Down

0 comments on commit c414d02

Please sign in to comment.