dacorvo HF Staff commited on
Commit
a86df37
·
verified ·
1 Parent(s): 86c0efd

Keep each Neuron target's results in its own folder, with a target column

Browse files
README.md CHANGED
@@ -9,7 +9,7 @@ configs:
9
  - config_name: default
10
  data_files:
11
  - split: train
12
- path: data/*/*.parquet
13
  ---
14
 
15
  # torch-neuronx model support
@@ -52,7 +52,7 @@ forward pass on `cats_image.jpeg`, the COCO photo of two cats. A model that
52
  matches images with texts, such as CLIP, scores `"a photo of a cat"` and
53
  `"a photo of a dog"`.
54
 
55
- For now, only models that fit on 4 Trainium2 devices are tested, 16
56
  NeuronCores at most.
57
 
58
  | `result` | Meaning |
@@ -103,21 +103,23 @@ left out. A model that leaves the list keeps the results it already has.
103
 
104
  ## Layout
105
 
106
- There is one file per tested `(neuronx-cc, library version)` pair:
 
107
 
108
  ```
109
- data/neuronxcc-<version>/<library>-<version>.parquet
110
  ```
111
 
112
  Each sweep tests the current Neuron SDK with the library version of the day,
113
- so most pairs are never tested. A model missing from a pair was not tested
114
- there, which does not mean it fails. A model the sweep left out has an
115
  `EXCLUDED` row instead, with no `neuron_cores` or `runner`.
116
 
117
  | Column | Content |
118
  |---|---|
119
  | `model_id`, `library`, `neuron_cores`, `runner` | The model, the library that loads it, the number of NeuronCores it was sharded over (its tensor- or expert-parallel degree), and the load class (`run_dense`: `AutoModelForCausalLM`, `run_multimodal`: `AutoModelForImageTextToText`, `run_seq2seq`: `AutoModelForSeq2SeqLM`, `run_seq2seq_audio`: `AutoModelForSpeechSeq2Seq`, `run_dense_ep`: expert-parallel, `run_encoder`, `run_encoder_audio` and `run_encoder_image`: the head class the checkpoint declares, `AutoModelForZeroShotImageClassification` for an image model that matches images with texts, or `AutoModel`). |
120
- | `selection_rank` | The model's rank, from 1, in the selection of the latest sweep of the pair, empty if that selection does not hold it. |
 
121
  | `result`, `notes` | The outcome, and the start of the generated text, of an encoder's prediction or of the error, or why the model was excluded. |
122
  | `exclusion` | The category of the rule that excluded an `EXCLUDED` model, such as `quantized` or `trust-remote-code`. |
123
  | `error` | The full exception message of a `FAIL(load)`, `FAIL(gen)` or `FAIL(forward)` run. |
@@ -134,26 +136,26 @@ there, which does not mean it fails. A model the sweep left out has an
134
  import pandas as pd
135
 
136
  df = pd.read_parquet("hf://datasets/aws-neuron/torch-neuronx-model-support/data")
137
- df[df.model_id == "Qwen/Qwen3-0.6B"][["neuronx_cc", "library", "library_version", "neuron_cores", "result"]]
138
  ```
139
 
140
  ## Reproducing a run
141
 
142
  Each `run_py` is a standalone script. Its header lists the Neuron stack it ran
143
- on and a `pip install` line for the packages it adds on top. On a Trainium2
144
- instance with that stack, for example the AWS Neuron Deep Learning Container,
145
- install those packages, then:
146
 
147
  ```bash
148
  python3 run.py
149
  ```
150
 
151
- On a `trn2` instance, the run can skip compilation by first copying the
152
- compiled graphs of its compiler, from the public
153
  [NEFF cache](https://huggingface.co/buckets/aws-neuron/torch-neuronx-neff-cache):
154
 
155
  ```bash
156
- hf buckets sync hf://buckets/aws-neuron/torch-neuronx-neff-cache/neuronxcc-<neuronx_cc> /tmp/neff_cache
157
  ```
158
 
159
  On more than one NeuronCore, the script launches its own `torch.distributed`
 
9
  - config_name: default
10
  data_files:
11
  - split: train
12
+ path: data/*/*/*.parquet
13
  ---
14
 
15
  # torch-neuronx model support
 
52
  matches images with texts, such as CLIP, scores `"a photo of a cat"` and
53
  `"a photo of a dog"`.
54
 
55
+ For now, only models that fit on 4 devices of the target are tested, 16
56
  NeuronCores at most.
57
 
58
  | `result` | Meaning |
 
103
 
104
  ## Layout
105
 
106
+ There is one file per Neuron target (`trn2`, `trn3`) and tested
107
+ `(neuronx-cc, library version)` pair:
108
 
109
  ```
110
+ data/<target>/neuronxcc-<version>/<library>-<version>.parquet
111
  ```
112
 
113
  Each sweep tests the current Neuron SDK with the library version of the day,
114
+ so most pairs are never tested. A model missing from a target's pair was not
115
+ tested there, which does not mean it fails. A model the sweep left out has an
116
  `EXCLUDED` row instead, with no `neuron_cores` or `runner`.
117
 
118
  | Column | Content |
119
  |---|---|
120
  | `model_id`, `library`, `neuron_cores`, `runner` | The model, the library that loads it, the number of NeuronCores it was sharded over (its tensor- or expert-parallel degree), and the load class (`run_dense`: `AutoModelForCausalLM`, `run_multimodal`: `AutoModelForImageTextToText`, `run_seq2seq`: `AutoModelForSeq2SeqLM`, `run_seq2seq_audio`: `AutoModelForSpeechSeq2Seq`, `run_dense_ep`: expert-parallel, `run_encoder`, `run_encoder_audio` and `run_encoder_image`: the head class the checkpoint declares, `AutoModelForZeroShotImageClassification` for an image model that matches images with texts, or `AutoModel`). |
121
+ | `target` | The Neuron target the run compiled for and ran on: `trn2` (Trainium2) or `trn3` (Trainium3). The sweep picks each model's `neuron_cores` from the memory of the target's NeuronCores, so a model can run on fewer cores of one target than of the other. |
122
+ | `selection_rank` | The model's rank, from 1, in the selection of the latest sweep of the target's pair, empty if that selection does not hold it. |
123
  | `result`, `notes` | The outcome, and the start of the generated text, of an encoder's prediction or of the error, or why the model was excluded. |
124
  | `exclusion` | The category of the rule that excluded an `EXCLUDED` model, such as `quantized` or `trust-remote-code`. |
125
  | `error` | The full exception message of a `FAIL(load)`, `FAIL(gen)` or `FAIL(forward)` run. |
 
136
  import pandas as pd
137
 
138
  df = pd.read_parquet("hf://datasets/aws-neuron/torch-neuronx-model-support/data")
139
+ df[df.model_id == "Qwen/Qwen3-0.6B"][["target", "neuronx_cc", "library", "library_version", "neuron_cores", "result"]]
140
  ```
141
 
142
  ## Reproducing a run
143
 
144
  Each `run_py` is a standalone script. Its header lists the Neuron stack it ran
145
+ on and a `pip install` line for the packages it adds on top. On an instance of
146
+ its `target` with that stack, for example the AWS Neuron Deep Learning
147
+ Container, install those packages, then:
148
 
149
  ```bash
150
  python3 run.py
151
  ```
152
 
153
+ The run can skip compilation by first copying the compiled graphs of its
154
+ target and compiler, from the public
155
  [NEFF cache](https://huggingface.co/buckets/aws-neuron/torch-neuronx-neff-cache):
156
 
157
  ```bash
158
+ hf buckets sync hf://buckets/aws-neuron/torch-neuronx-neff-cache/<target>/neuronxcc-<neuronx_cc> /tmp/neff_cache
159
  ```
160
 
161
  On more than one NeuronCore, the script launches its own `torch.distributed`
data/{neuronxcc-2.28.7631.0+8f7b0cf5 → trn2/neuronxcc-2.28.7631.0+8f7b0cf5}/transformers-5.20.1.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2bf6537888379516d5a7ecfaa0399a07aa38af654ef5c4e04284107b063a351c
3
- size 14644
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8045b9af882eb32098f8955f99169cc162f7ccb01f2ada44ee8086d6764bf2f6
3
+ size 14873
data/{neuronxcc-2.28.7631.0+8f7b0cf5 → trn2/neuronxcc-2.28.7631.0+8f7b0cf5}/transformers-5.20.2.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:94381b8b9ed32001b7a271167e02e877d0a2c008578e15d712b6e4513c15960a
3
- size 1403779
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d74be77dffa9d34fa1be99e8a2993cc44793affb4d60fd14032aa16b58e3ef7
3
+ size 1404071
data/{neuronxcc-2.28.7631.0+8f7b0cf5 → trn2/neuronxcc-2.28.7631.0+8f7b0cf5}/transformers-5.21.0.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7f4efb844663de6718692a9141a830aa38edcd6ac546651f32b0dd031438e2f6
3
- size 2976467
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b2bf5180259e31d180d6d7310add06b6b53e8dcc6409496ba8181afc99edcad
3
+ size 2976759
data/{neuronxcc-2.28.7631.0+8f7b0cf5 → trn2/neuronxcc-2.28.7631.0+8f7b0cf5}/transformers-5.22.1.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:df2ec85a0a65782cfcb38c4acc1b4f67471dc21a24567ebaa91088df34f9183b
3
- size 491156
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99535180c097c19701d20a95fe92a5f6ff9fa98a49fbf935532cdc547148afea
3
+ size 491448