File size: 4,322 Bytes
958473e
 
2bdb6ed
958473e
 
 
 
 
2bdb6ed
958473e
2bdb6ed
958473e
 
 
 
 
 
 
 
 
 
 
 
 
 
2bdb6ed
958473e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2bdb6ed
 
 
958473e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2bdb6ed
958473e
2bdb6ed
958473e
2bdb6ed
 
 
958473e
2bdb6ed
958473e
2bdb6ed
 
 
958473e
2bdb6ed
958473e
2bdb6ed
 
 
958473e
2bdb6ed
958473e
2bdb6ed
 
 
958473e
2bdb6ed
 
 
958473e
2bdb6ed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# SUPERB Submission Template

This repository can be used to generate a template so you can submit your pretrained model for evaluation on [the leaderboard](https://huggingface.co/spaces/superb/superb-leaderboard) in the [SUPERB Challenge](https://superbbenchmark.org/challenge).

## Quickstart

### 1. Create an account and organisation on the Hugging Face Hub

First create an account on the Hugging Face Hub and you can sign up [here](https://huggingface.co/join) if you haven't already! Next, create a new organization and invite the SUPERB Hidden Set Committee to join. You will upload your model to a repository under this organization so that members inside it can access the model.

* [superb-hidden-set](https://huggingface.co/superb-hidden-set)

### 2. Create a template repository on your machine

The next step is to create a template repository on your local machine that contains various files and a CLI to help you validate and submit your pretrained models. The Hugging Face Hub uses [Git Large File Storage (LFS)](https://git-lfs.github.com) to manage large files, so first install it if you don't have it already. For example, on macOS you can run:

```bash
brew install git-lfs
git lfs install
```

Next, run the following commands to create the repository. We recommend creating a Python virtual environment for the project, e.g. with Anaconda:

```bash
# Create and activate a virtual environment
conda create -n superb-submit python=3.8 && conda activate superb-submit
# Install the following libraries
pip install cookiecutter huggingface-hub==0.0.16
# Create the template repository
cookiecutter git+https://huggingface.co/superb/superb-submission
```

This will ask you to specify your Hugging Face Hub username, password, organisation, and the name of the repository:

```
hf_hub_username [<huggingface>]:
hf_hub_password [<password>]:
hf_hub_organisation [superb-submissions]:
repo_name [<my-superb-submissions>]:
```

This will trigger the following steps:

1. Create a private dataset repository on the Hugging Face Hub under `{hf_hub_organisation}/{repo_name}`
2. Clone the repository to your local machine
3. Add various template files, commit them locally to the repository, and push them to the Hub

The resulting repository should have the following structure:

```
my-superb-submission
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md               <- The README with submission instructions
β”œβ”€β”€ cli.py                  <- The CLI for validating predictions etc
└── requirements.txt        <- The requirements packages for the submissions
β”œβ”€β”€ expert.py               <- Your model definition
└── model.pt                <- Your model weights
```

### 3. Install the dependencies

The final step is to install the project's dependencies:

```bash
# Navigate to the template repository
cd my-superb-submission
# Install dependencies
python -m pip install -r requirements.txt
```

That's it! You're now all set to start pretraining your speech models - see the instructions below on how to submit them to the Hub.


## Submitting to the leaderboard

To make a submission to the [leaderboard](https://superbbenchmark.org/leaderboard), there are 4 main steps:

1. Modify `expert.py` and `model.py` so we can initialize an upstream model following the [policy](https://superbbenchmark.org/challenge) by:

    ```python
    upstream = UpstreamExpert(ckpt="./model.pt")
    ```

2. Validate the upstream model meets the requirements in the [policy](https://superbbenchmark.org/challenge). If everything is correct, you should see the following message: "All submission files validated! Now you can make a submission."

    ```
    python cli.py validate
    ```

3. Push the predictions to the Hub! If there are no errors, you should see the following message: "Upload successful!"

    ```
    python cli.py upload "commit message: my best model"
    ```

4. [Make a submission at SUPERB website](https://superbbenchmark.org/submit) by uniquely indentifying this submission/model with the following information, which will be shown by:

    ```
    python cli.py info
    ```

    - Organization Name
    - Repository Name
    - Commit Hash (full 40 characters)

After you finish the above 4 steps. Please stay tuned and wait for us to get the finetuned results on the hidden set!