Skip to content

Commit 08a210c

Browse files
authored
Refactor:updated old stubs (#158)
1 parent bfc8f8c commit 08a210c

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

examples/huggingface-transformers/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Question-Answering task. The current version of the pipeline supports only
3838
from pipelines import pipeline
3939

4040
# SparseZoo model stub or path to ONNX file
41-
onnx_filepath="zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-moderate"
41+
onnx_filepath="zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_98"
4242

4343
num_cores=None # uses all available CPU cores by default
4444

@@ -70,7 +70,7 @@ benchmark.py -h`.
7070
To run a benchmark using the DeepSparse Engine with a pruned BERT model that uses all available CPU cores and batch size 1, run:
7171
```bash
7272
python benchmark.py \
73-
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-moderate \
73+
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_98 \
7474
--batch-size 1
7575
```
7676

@@ -94,7 +94,7 @@ also supported.
9494
Example command:
9595
```bash
9696
python server.py \
97-
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-moderate
97+
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_98
9898
```
9999

100100
You can leave that running as a detached process or in a spare terminal.
@@ -142,10 +142,8 @@ Learn more at
142142

143143
| Model Name | Stub | Description |
144144
|----------|-------------|-------------|
145-
| bert-pruned-moderate | zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-moderate |This model is the result of pruning BERT base uncased on the SQuAD dataset. The sparsity level is 90% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs.|
146-
| bert-6layers-aggressive-pruned| zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned_6layers-aggressive_96 |This model is the result of pruning a modified BERT base uncased with 6 layers on the SQuAD dataset. The sparsity level is 95% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs.|
145+
| bert-6layers-aggressive-pruned-96| zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned_6layers-aggressive_96 |This model is the result of pruning a modified BERT base uncased with 6 layers on the SQuAD dataset. The sparsity level is 95% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs.|
147146
| bert-pruned-conservative| zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-conservative |This model is the result of pruning BERT base uncased on the SQuAD dataset. The sparsity level is 80% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs.|
148-
| pruned_6layers-moderate | zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned_6layers-moderate |This model is the result of pruning a modified BERT base uncased with 6 layers on the SQuAD dataset. The sparsity level is 90% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs. The integration with Hugging Face's Transformers can be found [here](https://github.com/neuralmagic/sparseml/tree/main/integrations/huggingface-transformers).|
149-
| pruned-aggressive_94 | zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_94|This model is the result of pruning BERT base uncased on the SQuAD dataset. The sparsity level is 95% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs.|
150-
| pruned_6layers-conservative| zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned_6layers-conservative|This model is the result of pruning a modified BERT base uncased with 6 layers on the SQuAD dataset. The sparsity level is 80% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs.|
151-
| bert-base|zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/base-none |This model is the result of a BERT base uncased model fine-tuned on the SQuAD dataset for two epochs.|
147+
| pruned-aggressive_94 | zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_94|This model is the result of pruning a modified BERT base uncased with 6 layers on the SQuAD dataset. The sparsity level is 90% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs.|
148+
| bert-3layers-pruned-aggressive-89| zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned_3layers-aggressive_89|This model is the result of pruning a modified BERT base uncased with 6 layers on the SQuAD dataset. The sparsity level is 89% uniformly applied to all encoder layers. Distillation was used with the teacher being the BERT model fine-tuned on the dataset for two epochs.|
149+
| bert-base|zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/base-none |This model is the result of a BERT base uncased model fine-tuned on the SQuAD dataset for two epochs.|

examples/huggingface-transformers/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
##########
6767
Example for benchmarking on a pruned BERT model from sparsezoo with deepsparse:
6868
python benchmark.py \
69-
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-moderate \
69+
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_98 \
7070
7171
##########
7272
Example for benchmarking on a local ONNX model with deepsparse:

examples/huggingface-transformers/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
##########
3939
Example command for running using a model from sparsezoo:
4040
python server.py \
41-
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-moderate
41+
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_98
4242
"""
4343
import argparse
4444
import json

examples/huggingface-transformers/squad_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
##########
4949
Example command for evaluating a sparse BERT QA model from sparsezoo:
5050
python squad_eval.py \
51-
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-moderate
51+
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_98
5252
"""
5353

5454

examples/huggingface-transformers/squad_inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
##########
6161
Example command for running 1000 samples using a model from sparsezoo:
6262
python squad_inference.py \
63-
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-moderate \
63+
zoo:nlp/question_answering/bert-base/pytorch/huggingface/squad/pruned-aggressive_98 \
6464
--num-samples 1000
6565
"""
6666

0 commit comments

Comments
 (0)