Skip to content

Commit c4ec631

Browse files
author
Sara Adkins
authored
fix uncompressed path (#2339)
1 parent 52245b3 commit c4ec631

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/llama7b_sparse_quantized/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ run the following in the same Python instance as the previous steps.
7373

7474
```python
7575
import torch
76+
import os
7677
from sparseml.transformers import SparseAutoModelForCausalLM
7778

7879
compressed_output_dir = "output_llama7b_2:4_w4a16_channel_compressed"
79-
model = SparseAutoModelForCausalLM.from_pretrained(output_dir, torch_dtype=torch.bfloat16)
80+
uncompressed_path = os.path.join(output_dir, "stage_quantization")
81+
model = SparseAutoModelForCausalLM.from_pretrained(uncompressed_path, torch_dtype=torch.bfloat16)
8082
model.save_pretrained(compressed_output_dir, save_compressed=True)
8183
```
8284

0 commit comments

Comments
 (0)