Skip to content

Commit 6d9368f

Browse files
authored
HuggingFace --> Hugging Face (#618)
1 parent 08f8235 commit 6d9368f

File tree

14 files changed

+29
-29
lines changed

14 files changed

+29
-29
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The library provides:
2626
- Support for checkpoints in various formats, including checkpoints in HF format
2727
- Training recipes for popular fine-tuning techniques with reference benchmarks and comprehensive correctness checks
2828
- Evaluation of trained models with EleutherAI Eval Harness
29-
- Integration with HuggingFace Datasets for training
29+
- Integration with Hugging Face Datasets for training
3030
- Support for distributed training using FSDP from PyTorch Distributed
3131
- YAML configs for easily configuring training runs
3232
- [Upcoming] Support for lower precision dtypes and quantization techniques from [TorchAO](https://github.com/pytorch-labs/ao)
@@ -182,7 +182,7 @@ TorchTune embodies PyTorch’s design philosophy [[details](https://pytorch.org/
182182

183183
#### Native PyTorch
184184

185-
TorchTune is a native-PyTorch library. While we provide integrations with the surrounding ecosystem (eg: HuggingFace Datasets, EluetherAI Eval Harness), all of the core functionality is written in PyTorch.
185+
TorchTune is a native-PyTorch library. While we provide integrations with the surrounding ecosystem (eg: Hugging Face Datasets, EluetherAI Eval Harness), all of the core functionality is written in PyTorch.
186186

187187
#### Simplicity and Extensibility
188188

docs/source/examples/first_finetune_tutorial.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ job using TorchTune.
2525
Downloading a model
2626
-------------------
2727
First, you need to download a model. TorchTune's supports an integration
28-
with the `HuggingFace Hub <https://huggingface.co/docs/hub/en/index>`_ - a collection of the latest and greatest model weights.
28+
with the `Hugging Face Hub <https://huggingface.co/docs/hub/en/index>`_ - a collection of the latest and greatest model weights.
2929

3030
For this tutorial, you're going to use the `Llama2 model from Meta <https://llama.meta.com/>`_. Llama2 is a "gated model",
3131
meaning that you need to be granted access in order to download the weights. Follow `these instructions <https://huggingface.co/meta-llama>`_ on the official Meta page
32-
hosted on HuggingFace to complete this process. (This should take less than 5 minutes.)
32+
hosted on Hugging Face to complete this process. (This should take less than 5 minutes.)
3333

34-
Once you have authorization, you will need to authenticate with HuggingFace Hub. The easiest way to do so is to provide an
34+
Once you have authorization, you will need to authenticate with Hugging Face Hub. The easiest way to do so is to provide an
3535
access token to the download script. You can find your token `here <https://huggingface.co/settings/tokens>`_.
3636

3737
Then, it's as simple as:

docs/source/overview.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ TorchTune provides:
2222
- Modular native-PyTorch implementations of popular LLMs
2323
- Interoperability with popular model zoos through checkpoint-conversion utilities
2424
- Training recipes for a variety of fine-tuning techniques
25-
- Integration with `HuggingFace Datasets <https://huggingface.co/docs/datasets/en/index>`_ for training and `EleutherAI's Eval <https://github.com/EleutherAI/lm-evaluation-harness>`_ Harness for evaluation
25+
- Integration with `Hugging Face Datasets <https://huggingface.co/docs/datasets/en/index>`_ for training and `EleutherAI's Eval <https://github.com/EleutherAI/lm-evaluation-harness>`_ Harness for evaluation
2626
- Support for distributed training using `FSDP <https://pytorch.org/docs/stable/fsdp.html>`_
2727
- Yaml configs for easily configuring training runs
2828

@@ -55,7 +55,7 @@ TorchTune embodies `PyTorch’s design philosophy <https://pytorch.org/docs/stab
5555

5656
**Native PyTorch**
5757

58-
TorchTune is a native-PyTorch library. While we provide integrations with the surrounding ecosystem (eg: HuggingFace Datasets, EluetherAI Eval Harness), all of the core functionality is written in PyTorch.
58+
TorchTune is a native-PyTorch library. While we provide integrations with the surrounding ecosystem (eg: Hugging Face Datasets, EluetherAI Eval Harness), all of the core functionality is written in PyTorch.
5959

6060

6161
**Simplicity and Extensibility**

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# HuggingFace Integration Reqs
1+
# Hugging Face Integration Reqs
22
datasets
33
huggingface_hub
44

tests/torchtune/_cli/test_download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_download_calls_snapshot(self, capsys, monkeypatch, snapshot_download):
4545
with pytest.raises(SystemExit, match="2"):
4646
runpy.run_path(TUNE_PATH, run_name="__main__")
4747
err = capsys.readouterr().err
48-
assert "not found on the HuggingFace Hub" in err
48+
assert "not found on the Hugging Face Hub" in err
4949

5050
# Call the third time and get the expected output
5151
runpy.run_path(TUNE_PATH, run_name="__main__")

tests/torchtune/data/test_templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
SummarizeTemplate,
1515
)
1616

17-
# Taken from Open-Orca/SlimOrca-Dedup on HuggingFace:
17+
# Taken from Open-Orca/SlimOrca-Dedup on Hugging Face:
1818
# https://huggingface.co/datasets/Open-Orca/SlimOrca-Dedup
1919
CHAT_SAMPLE = {
2020
"system": "You are an AI assistant. User will you give you a task. Your goal is to complete the task as faithfully as you can. While performing the task think step-by-step and justify your steps.", # noqa: B950

torchtune/_cli/download.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@ def __init__(self, subparsers: argparse._SubParsersAction):
2424
"download",
2525
prog="tune download",
2626
usage="tune download <repo-id> [OPTIONS]",
27-
help="Download a model from the HuggingFace Hub.",
28-
description="Download a model from the HuggingFace Hub.",
27+
help="Download a model from the Hugging Face Hub.",
28+
description="Download a model from the Hugging Face Hub.",
2929
epilog=textwrap.dedent(
3030
"""\
3131
examples:
32-
# Download a model from the HuggingFace Hub with a Hugging Face API token
32+
# Download a model from the Hugging Face Hub with a Hugging Face API token
3333
$ tune download meta-llama/Llama-2-7b-hf --hf-token <TOKEN> --output-dir /tmp/model
3434
Successfully downloaded model repo and wrote to the following locations:
3535
./model/config.json
3636
./model/README.md
3737
./model/consolidated.00.pth
3838
...
3939
40-
# Download an ungated model from the HuggingFace Hub
40+
# Download an ungated model from the Hugging Face Hub
4141
$ tune download mistralai/Mistral-7B-Instruct-v0.2
4242
Successfully downloaded model repo and wrote to the following locations:
4343
./model/config.json
4444
./model/README.md
4545
./model/model-00001-of-00002.bin
4646
...
4747
48-
For a list of all models, visit the HuggingFace Hub https://huggingface.co/models.
48+
For a list of all models, visit the Hugging Face Hub https://huggingface.co/models.
4949
"""
5050
),
5151
formatter_class=argparse.RawTextHelpFormatter,
@@ -58,7 +58,7 @@ def _add_arguments(self) -> None:
5858
self._parser.add_argument(
5959
"repo_id",
6060
type=str,
61-
help="Name of the repository on HuggingFace Hub.",
61+
help="Name of the repository on Hugging Face Hub.",
6262
)
6363
self._parser.add_argument(
6464
"--output-dir",
@@ -72,7 +72,7 @@ def _add_arguments(self) -> None:
7272
type=str,
7373
required=False,
7474
default=os.getenv("HF_TOKEN", None),
75-
help="HuggingFace API token. Needed for gated models like Llama2.",
75+
help="Hugging Face API token. Needed for gated models like Llama2.",
7676
)
7777
self._parser.add_argument(
7878
"--ignore-patterns",
@@ -84,7 +84,7 @@ def _add_arguments(self) -> None:
8484
)
8585

8686
def _download_cmd(self, args: argparse.Namespace) -> None:
87-
"""Downloads a model from the HuggingFace Hub."""
87+
"""Downloads a model from the Hugging Face Hub."""
8888
# Download the tokenizer and PyTorch model files
8989
try:
9090
true_output_dir = snapshot_download(
@@ -96,13 +96,13 @@ def _download_cmd(self, args: argparse.Namespace) -> None:
9696
except GatedRepoError:
9797
self._parser.error(
9898
"It looks like you are trying to access a gated repository. Please ensure you "
99-
"have access to the repository and have provided the proper HuggingFace API token "
99+
"have access to the repository and have provided the proper Hugging Face API token "
100100
"using the option `--hf-token` or by running `huggingface-cli login`."
101101
"You can find your token by visiting https://huggingface.co/settings/tokens"
102102
)
103103
except RepositoryNotFoundError:
104104
self._parser.error(
105-
f"Repository '{args.repo_id}' not found on the HuggingFace Hub."
105+
f"Repository '{args.repo_id}' not found on the Hugging Face Hub."
106106
)
107107
except Exception as e:
108108
self._parser.error(e)

torchtune/data/_templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class ChatMLTemplate(PromptTemplate):
240240
"""
241241
OpenAI's Chat Markup Language used by their chat models:
242242
https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/ai-services/openai/includes/chat-markup-language.md
243-
It is the default template used by HuggingFace models.
243+
It is the default template used by Hugging Face models.
244244
245245
Example:
246246
<|im_start|>system

torchtune/datasets/_alpaca.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def alpaca_dataset(
1515
use_clean: bool = False,
1616
) -> InstructDataset:
1717
"""
18-
Support for the Alpaca dataset and its variants from HuggingFace Datasets.
18+
Support for the Alpaca dataset and its variants from Hugging Face Datasets.
1919
https://huggingface.co/datasets/tatsu-lab/alpaca
2020
2121
Data input format: https://huggingface.co/datasets/tatsu-lab/alpaca#data-instances

torchtune/datasets/_chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ChatDataset(Dataset):
4545
4646
Args:
4747
tokenizer (Tokenizer): Tokenizer used to encode data. Tokenize must implement an `encode` and `decode` method.
48-
source (str): path string of dataset, anything supported by HuggingFace's `load_dataset`
48+
source (str): path string of dataset, anything supported by Hugging Face's `load_dataset`
4949
(https://huggingface.co/docs/datasets/en/package_reference/loading_methods#datasets.load_dataset.path)
5050
convert_to_dialogue (Callable[[Mapping[str, Any]], Dialogue]): function that keys into the desired field in the sample
5151
and converts to a list of `Messages` that follows the llama format with the expected keys
@@ -151,7 +151,7 @@ def chat_dataset(
151151
152152
Args:
153153
tokenizer (Tokenizer): Tokenizer used to encode data. Tokenize must implement an `encode` and `decode` method.
154-
source (str): path string of dataset, anything supported by HuggingFace's `load_dataset`
154+
source (str): path string of dataset, anything supported by Hugging Face's `load_dataset`
155155
(https://huggingface.co/docs/datasets/en/package_reference/loading_methods#datasets.load_dataset.path)
156156
conversation_format (str): string specifying expected format of conversations in the dataset
157157
for automatic conversion to the llama format. Supported formats are: "sharegpt"

0 commit comments

Comments
 (0)