aws / aws/amazon-sagemaker-examples

[Bug Report] Pretrained Llama 2 Model URI leads to a .tar.gz with dummy.txt file

Open
#4,433 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

**Link to the notebook**
Add the link to the notebook.

N/A

**Describe the bug**
A clear and concise description of what the bug is.

I get the error: `not a gzip file` when I run the following code:

```
model_id, model_version = (
"meta-textgeneration-llama-2-7b-f",
"1.2.0",
)
scope = "inference"

model_uri = model_uris.retrieve(
model_id=model_id,
model_version=model_version,
model_scope=scope,
)

print(f"model_url: {model_uri}\n")

script_uri = script_uris.retrieve(
model_id=model_id,
model_version=model_version,
script_scope=scope,
)

print(f"script_uri: {script_uri}\n")

instance_type = instance_types.retrieve_default(
model_id=model_id, model_version=model_version, scope=scope
)

print(f"instance_type: {instance_type}\n")

image_uri = image_uris.retrieve(
region=None,
framework=None,
image_scope=scope,
model_id=model_id,
model_version=model_version,
instance_type=instance_type,
)

print(f"image_uri: {image_uri}\n")

model = Model(
image_uri=image_uri,
model_data=model_uri,
source_dir=script_uri,
entry_point="inference.py",
role=role,
name="some-model-name",
predictor_cls=Predictor,
)

health_check_timeout = 300

predictor = model.deploy(
initial_instance_count=1,
instance_type=instance_type,
endpoint_name="some-endpoint-name",
)
```

After inspecting the model uri on s3 https://s3.console.aws.amazon.com/s3/object/jumpstart-cache-prod-us-east-1?region=us-east-1&prefix=meta-infer%2Finfer-meta-textgeneration-llama-2-7b-f.tar.gz I noticed that it only contains a dummy.txt file.

**To reproduce**
A clear, step-by-step set of instructions to reproduce the bug.

**Logs**
If applicable, add logs to help explain your problem.
You may also attach an `.ipynb` file to this issue if it includes relevant logs or output.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the notebook code using model_uris.retrieve for meta-textgeneration-llama-2-7b version 1.2.0, then inspect the returned S3 archive and the Model deployment path. Done means the URI contains the intended pretrained model rather than only dummy.txt, and deployment no longer fails with “not a gzip file”.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook, python
Domain
cloud, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.