mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-23 22:38:58 +06:00
[doc] Document the new --organization flag of CLI
This commit is contained in:
parent
270dfa1c8e
commit
0e56dc3078
19
README.md
19
README.md
@ -471,7 +471,7 @@ python ./examples/run_generation.py \
|
|||||||
|
|
||||||
Starting with `v2.2.2`, you can now upload and share your fine-tuned models with the community, using the <abbr title="Command-line interface">CLI</abbr> that's built-in to the library.
|
Starting with `v2.2.2`, you can now upload and share your fine-tuned models with the community, using the <abbr title="Command-line interface">CLI</abbr> that's built-in to the library.
|
||||||
|
|
||||||
**First, create an account on [https://huggingface.co/join](https://huggingface.co/join)**. Then:
|
**First, create an account on [https://huggingface.co/join](https://huggingface.co/join)**. Optionally, join an existing organization or create a new one. Then:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
transformers-cli login
|
transformers-cli login
|
||||||
@ -490,19 +490,24 @@ transformers-cli upload ./config.json [--filename folder/foobar.json]
|
|||||||
# (you can optionally override its filename, which can be nested inside a folder)
|
# (you can optionally override its filename, which can be nested inside a folder)
|
||||||
```
|
```
|
||||||
|
|
||||||
Your model will then be accessible through its identifier, a concatenation of your username and the folder name above:
|
If you want your model to be namespaced by your organization name rather than your username, add the following flag to any command:
|
||||||
```python
|
```shell
|
||||||
"username/pretrained_model"
|
--organization organization_name
|
||||||
```
|
```
|
||||||
|
|
||||||
**Please add a README.md model card** to the repo under `model_cards/` with: model description, training params (dataset, preprocessing, hyperparameters), evaluation results, intended uses & limitations, etc.
|
Your model will then be accessible through its identifier, a concatenation of your username (or organization name) and the folder name above:
|
||||||
|
```python
|
||||||
|
"namespace/pretrained_model"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Please add a README.md model card** to the repo under `model_cards/` with: model description, training params (dataset, preprocessing, hardware used, hyperparameters), evaluation results, intended uses & limitations, etc.
|
||||||
|
|
||||||
Your model now has a page on huggingface.co/models 🔥
|
Your model now has a page on huggingface.co/models 🔥
|
||||||
|
|
||||||
Anyone can load it from code:
|
Anyone can load it from code:
|
||||||
```python
|
```python
|
||||||
tokenizer = AutoTokenizer.from_pretrained("username/pretrained_model")
|
tokenizer = AutoTokenizer.from_pretrained("namespace/pretrained_model")
|
||||||
model = AutoModel.from_pretrained("username/pretrained_model")
|
model = AutoModel.from_pretrained("namespace/pretrained_model")
|
||||||
```
|
```
|
||||||
|
|
||||||
List all your files on S3:
|
List all your files on S3:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Starting with `v2.2.2`, you can now upload and share your fine-tuned models with the community, using the <abbr title="Command-line interface">CLI</abbr> that's built-in to the library.
|
Starting with `v2.2.2`, you can now upload and share your fine-tuned models with the community, using the <abbr title="Command-line interface">CLI</abbr> that's built-in to the library.
|
||||||
|
|
||||||
**First, create an account on [https://huggingface.co/join](https://huggingface.co/join)**. Then:
|
**First, create an account on [https://huggingface.co/join](https://huggingface.co/join)**. Optionally, join an existing organization or create a new one. Then:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
transformers-cli login
|
transformers-cli login
|
||||||
@ -21,19 +21,24 @@ transformers-cli upload ./config.json [--filename folder/foobar.json]
|
|||||||
# (you can optionally override its filename, which can be nested inside a folder)
|
# (you can optionally override its filename, which can be nested inside a folder)
|
||||||
```
|
```
|
||||||
|
|
||||||
Your model will then be accessible through its identifier, a concatenation of your username and the folder name above:
|
If you want your model to be namespaced by your organization name rather than your username, add the following flag to any command:
|
||||||
```python
|
```shell
|
||||||
"username/pretrained_model"
|
--organization organization_name
|
||||||
```
|
```
|
||||||
|
|
||||||
**Please add a README.md model card** to the repo under `model_cards/` with: model description, training params (dataset, preprocessing, hyperparameters), evaluation results, intended uses & limitations, etc.
|
Your model will then be accessible through its identifier, a concatenation of your username (or organization name) and the folder name above:
|
||||||
|
```python
|
||||||
|
"namespace/pretrained_model"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Please add a README.md model card** to the repo under `model_cards/` with: model description, training params (dataset, preprocessing, hardware used, hyperparameters), evaluation results, intended uses & limitations, etc.
|
||||||
|
|
||||||
Your model now has a page on huggingface.co/models 🔥
|
Your model now has a page on huggingface.co/models 🔥
|
||||||
|
|
||||||
Anyone can load it from code:
|
Anyone can load it from code:
|
||||||
```python
|
```python
|
||||||
tokenizer = AutoTokenizer.from_pretrained("username/pretrained_model")
|
tokenizer = AutoTokenizer.from_pretrained("namespace/pretrained_model")
|
||||||
model = AutoModel.from_pretrained("username/pretrained_model")
|
model = AutoModel.from_pretrained("namespace/pretrained_model")
|
||||||
```
|
```
|
||||||
|
|
||||||
List all your files on S3:
|
List all your files on S3:
|
||||||
@ -45,4 +50,4 @@ You can also delete unneeded files:
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
transformers-cli s3 rm …
|
transformers-cli s3 rm …
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user