sharpenb commited on
Commit
cadc11b
1 Parent(s): 95b3067

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -2
README.md CHANGED
@@ -27,7 +27,13 @@ metrics:
27
 
28
  ## Setup
29
 
30
- You can run the smashed model by **(1)** installing and importing the `pruna-engine` (version 0.2.5) package with the [Pypi instructions](https://pypi.org/project/pruna-engine/),**(2)** downloading the model files at `model_path`. This can be done using huggingface with this repository name or with manual downloading, and **(3)** loading the model, **(4)** running the model. You can achieve this by running the following code:
 
 
 
 
 
 
31
 
32
  ```python
33
  from transformers.utils.hub import cached_file
@@ -36,7 +42,7 @@ from pruna_engine.PrunaModel import PrunaModel # Step (1): install and import `
36
  ...
37
  model_path = cached_file("PrunaAI/REPO", "model") # Step (2): download the model files at `model_path`.
38
  smashed_model = PrunaModel.load_model(model_path) # Step (3): load the model.
39
- y = smashed_model(x) # Step (4): run the model.
40
  ```
41
 
42
  ## Configurations
 
27
 
28
  ## Setup
29
 
30
+ You can run the smashed model on a A100 GPU by:
31
+ 1. Installing and importing the `pruna-engine` (version 0.2.6) package. Use `pip install pruna --extra-index-url https://pypi.nvidia.com --extra-index-url https://pypi.ngc.nvidia.com` for installation. See [Pypi](https://pypi.org/project/pruna-engine/) for detailed on the package.
32
+ 2. Downloading the model files at `model_path`. This can be done using huggingface with this repository name or with manual downloading.
33
+ 3. Loading the model
34
+ 4. Running the model.
35
+
36
+ You can achieve this by running the following code:
37
 
38
  ```python
39
  from transformers.utils.hub import cached_file
 
42
  ...
43
  model_path = cached_file("PrunaAI/REPO", "model") # Step (2): download the model files at `model_path`.
44
  smashed_model = PrunaModel.load_model(model_path) # Step (3): load the model.
45
+ y = smashed_model(prompt="a photo of an astronaut riding a horse on mars", image_height=1024, image_width=1024)[0] # Step (4): run the model.
46
  ```
47
 
48
  ## Configurations