mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-12-16 02:08:55 +08:00
MusicGen (#1020)
* Add MusicGen model * add benchmarks * change to from_pretrained * symlinks * add readme and requirements * fix readme * readme
This commit is contained in:
40
t5/README.md
40
t5/README.md
@@ -7,31 +7,6 @@ tasks by prepending task-specific prefixes to the input, e.g.:
|
||||
|
||||
This example also supports the FLAN-T5 models variants.[^2]
|
||||
|
||||
## Setup
|
||||
|
||||
Download and convert the model:
|
||||
|
||||
```sh
|
||||
python convert.py --model <model>
|
||||
```
|
||||
|
||||
This will make the `<model>.npz` file which MLX can read.
|
||||
|
||||
The `<model>` can be any of the following:
|
||||
|
||||
| Model Name | Model Size |
|
||||
| ---------- | ----------
|
||||
| t5-small | 60 million |
|
||||
| t5-base | 220 million |
|
||||
| t5-large | 770 million |
|
||||
| t5-3b | 3 billion |
|
||||
| t5-11b | 11 billion |
|
||||
|
||||
The FLAN variants can be specified with `google/flan-t5-small`,
|
||||
`google/flan-t5-base`, etc. See the [Hugging Face
|
||||
page](https://huggingface.co/docs/transformers/model_doc/flan-t5) for a
|
||||
complete list of models.
|
||||
|
||||
## Generate
|
||||
|
||||
Generate text with:
|
||||
@@ -48,6 +23,21 @@ To see a list of options run:
|
||||
python t5.py --help
|
||||
```
|
||||
|
||||
The `<model>` can be any of the following:
|
||||
|
||||
| Model Name | Model Size |
|
||||
| ---------- | ----------
|
||||
| t5-small | 60 million |
|
||||
| t5-base | 220 million |
|
||||
| t5-large | 770 million |
|
||||
| t5-3b | 3 billion |
|
||||
| t5-11b | 11 billion |
|
||||
|
||||
The FLAN variants can be specified with `google/flan-t5-small`,
|
||||
`google/flan-t5-base`, etc. See the [Hugging Face
|
||||
page](https://huggingface.co/docs/transformers/model_doc/flan-t5) for a
|
||||
complete list of models.
|
||||
|
||||
[^1]: For more information on T5 see the [original paper](https://arxiv.org/abs/1910.10683)
|
||||
or the [Hugging Face page](https://huggingface.co/docs/transformers/model_doc/t5).
|
||||
[^2]: For more information on FLAN-T5 see the [original paper](https://arxiv.org/abs/2210.11416).
|
||||
|
||||
Reference in New Issue
Block a user