regisss HF staff jwieczorekhabana commited on
Commit
8728903
1 Parent(s): bb9159d

Remove hmp from gaudi_config.json and README (#2)

Browse files

- Remove hmp from gaudi_config.json and README (462725609d3c566f68a185ae2245cce091bb143b)
- Update README.md (219eee5dad794a9886a801e7436fb77bf378b924)
- Update README.md (4542ff38f3fe54e8e74eaef71bc3b1984682d19b)
- Update gaudi_config.json (ad3a4fe2503083cd46c46a79a8ada5bed5e717bb)
- Update README.md (c84c4c7ae5b9e7ca7de78a763bba8f6025802c33)
- Update gaudi_config.json (0bbc64c2c9eda543881a26e0692151e23e9500c3)
- Update README.md (e609a606ffaa6ddfe980aaa8c302d906197443bf)
- Update README.md (799cb2042fbbc6fb5fd7f9fc5bb342a2ebbd6d06)
- Update README.md (8f8886690453d6f95881647739e69459be738d01)


Co-authored-by: Jan Wieczorek <jwieczorekhabana@users.noreply.huggingface.co>

Files changed (2) hide show
  1. README.md +5 -7
  2. gaudi_config.json +1 -19
README.md CHANGED
@@ -13,18 +13,15 @@ This model only contains the `GaudiConfig` file for running the [Wav2Vec2](https
13
  **This model contains no model weights, only a GaudiConfig.**
14
 
15
  This enables to specify:
16
- - `use_habana_mixed_precision`: whether to use Habana Mixed Precision (HMP)
17
- - `hmp_opt_level`: optimization level for HMP, see [here](https://docs.habana.ai/en/latest/PyTorch/PyTorch_Mixed_Precision/PT_Mixed_Precision.html#configuration-options) for a detailed explanation
18
- - `hmp_bf16_ops`: list of operators that should run in bf16
19
- - `hmp_fp32_ops`: list of operators that should run in fp32
20
- - `hmp_is_verbose`: verbosity
21
  - `use_fused_adam`: whether to use Habana's custom AdamW implementation
22
  - `use_fused_clip_norm`: whether to use Habana's fused gradient norm clipping operator
 
23
 
24
  ## Usage
25
 
26
  The model is instantiated the same way as in the Transformers library.
27
- The only difference is that there are a few new training arguments specific to HPUs.
 
28
 
29
  [Here](https://github.com/huggingface/optimum-habana/blob/main/examples/audio-classification/run_audio_classification.py) is an audio classification example script to fine-tune a model. You can run it with Wav2Vec2 with the following command:
30
  ```bash
@@ -49,7 +46,8 @@ python run_audio_classification.py \
49
  --use_habana \
50
  --use_lazy_mode \
51
  --gaudi_config_name Habana/wav2vec2 \
52
- --throughput_warmup_steps 2
 
53
  ```
54
 
55
  Check the [documentation](https://huggingface.co/docs/optimum/habana/index) out for more advanced usage and examples.
 
13
  **This model contains no model weights, only a GaudiConfig.**
14
 
15
  This enables to specify:
 
 
 
 
 
16
  - `use_fused_adam`: whether to use Habana's custom AdamW implementation
17
  - `use_fused_clip_norm`: whether to use Habana's fused gradient norm clipping operator
18
+ - `use_torch_autocast`: whether to use Torch Autocast for managing mixed precision
19
 
20
  ## Usage
21
 
22
  The model is instantiated the same way as in the Transformers library.
23
+ The only difference is that there are a few new training arguments specific to HPUs.\
24
+ It is strongly recommended to train this model doing bf16 mixed-precision training for optimal performance and accuracy.
25
 
26
  [Here](https://github.com/huggingface/optimum-habana/blob/main/examples/audio-classification/run_audio_classification.py) is an audio classification example script to fine-tune a model. You can run it with Wav2Vec2 with the following command:
27
  ```bash
 
46
  --use_habana \
47
  --use_lazy_mode \
48
  --gaudi_config_name Habana/wav2vec2 \
49
+ --throughput_warmup_steps 2 \
50
+ --bf16
51
  ```
52
 
53
  Check the [documentation](https://huggingface.co/docs/optimum/habana/index) out for more advanced usage and examples.
gaudi_config.json CHANGED
@@ -1,23 +1,5 @@
1
  {
2
- "use_habana_mixed_precision": true,
3
- "hmp_is_verbose": false,
4
  "use_fused_adam": true,
5
  "use_fused_clip_norm": true,
6
- "hmp_bf16_ops": [
7
- "addmm",
8
- "iadd",
9
- "linear",
10
- "matmul",
11
- "mm",
12
- "mv",
13
- "conv1d",
14
- "conv2d",
15
- "instance_norm"
16
- ],
17
- "hmp_fp32_ops": [
18
- "embedding",
19
- "nll_loss",
20
- "log_softmax",
21
- "cross_entropy"
22
- ]
23
  }
 
1
  {
 
 
2
  "use_fused_adam": true,
3
  "use_fused_clip_norm": true,
4
+ "use_torch_autocast": true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  }