Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up validate_llama_ref_model example and requirements for examples #6

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ gguf==0.6.0
numpy==1.26.3
onnx==1.15.0

# Model deps.
huggingface-hub==0.22.2
transformers==4.40.0
Comment on lines +7 to +8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into this also.

Do we want these added at the top level here, or included optionally?

sentencepiece==0.2.0

# It is expected that you have installed a PyTorch version/variant specific
# to your needs, so we only include a minimum version spec.
# TODO: Use a versioned release once 2.3.0 drops.
Expand Down
10 changes: 9 additions & 1 deletion sharktank/sharktank/examples/validate_llama_ref_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@


def main(args: list[str]):
from ..utils import cli

torch.no_grad().__enter__()
config = Dataset.load(args[0])

parser = cli.create_parser()
cli.add_gguf_dataset_options(parser)
args = cli.parse(parser)

data_files = cli.get_gguf_data_files(args)
config = Dataset.load(data_files["gguf"])
hp = configs.LlamaHParams.from_gguf_props(config.properties)
model = DirectCacheLlamaModelV1(config.root_theta, hp)

Expand Down
1 change: 1 addition & 0 deletions sharktank/sharktank/models/llama/llama_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import torch.nn.functional as F

from ...layers import *
from ...types import Theta
Comment on lines 15 to +16
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also just ran into this too... can we get some of these PRs merged?


__all__ = [
"DirectCacheLlamaModelV1",
Expand Down
Loading