Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
distiller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
distiller
Commits
37aa68bf
Commit
37aa68bf
authored
6 years ago
by
Neta Zmora
Browse files
Options
Downloads
Patches
Plain Diff
Language model: add a schedule for a Large model with 73% sparsity
parent
a9b28923
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/agp-pruning/word_lang_model.LARGE_73.schedule_agp.yaml
+57
-0
57 additions, 0 deletions
...es/agp-pruning/word_lang_model.LARGE_73.schedule_agp.yaml
with
57 additions
and
0 deletions
examples/agp-pruning/word_lang_model.LARGE_73.schedule_agp.yaml
0 → 100755
+
57
−
0
View file @
37aa68bf
# Fine grained (element-wise) pruning using Automated Gradual Pruner scheduling for PyTorch's example Word Language model.
#
# The README of PyTorch's word language model example code, promises that this configuration will produce a Test perplexity
# of 72.30, while I was only able to get 84.23, so I use that as the baseline for comparison.
#
# time python3 main.py --cuda --emsize 1500 --nhid 1500 --dropout 0.65 --epochs 40 --tied
#
# =========================================================================================
# | End of training | test loss 4.43 | test ppl 84.23
# =========================================================================================
#
# To save you time, you can download a pretrained model from here:
# https://s3-us-west-1.amazonaws.com/nndistiller/agp-pruning/word_language_model/model.emsize1500.nhid1500.dropout065.tied.pt
#
# With the same configuration, and the pruning schedule below, we get comparable perplexity results:
#
# python3 main.py --cuda --emsize 1500 --nhid 1500 --dropout 0.65 --epochs 40 --tied --compress=../../examples/agp-pruning/word_lang_model.schedule_agp.yaml
#
version
:
1
pruners
:
l0_rnn_pruner
:
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.40
weights
:
[
rnn.weight_ih_l0
,
rnn.weight_hh_l0
]
l1_rnn_pruner
:
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.40
weights
:
[
rnn.weight_ih_l1
,
rnn.weight_hh_l1
]
embedding_pruner
:
class
:
AutomatedGradualPruner
initial_sparsity
:
0.05
final_sparsity
:
0.85
weights
:
[
encoder.weight
]
policies
:
-
pruner
:
instance_name
:
l0_rnn_pruner
starting_epoch
:
1
ending_epoch
:
25
frequency
:
3
-
pruner
:
instance_name
:
l1_rnn_pruner
starting_epoch
:
2
ending_epoch
:
25
frequency
:
3
-
pruner
:
instance_name
:
embedding_pruner
starting_epoch
:
3
ending_epoch
:
26
frequency
:
3
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment