From 9ac2b476ada8c340a4882db337a48dd5aef6e38c Mon Sep 17 00:00:00 2001 From: Anna Pfohl Date: Thu, 4 Jan 2024 19:59:27 -0800 Subject: [PATCH 1/7] update yaml without running precommit hook --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4c8cc699c..d9c6505361 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.3.1 + rev: v1.5.4 hooks: - id: insert-license args: @@ -65,6 +65,7 @@ repos: - .ci/FILE_HEADER - --comment-style - '#' + - --use-current-year types: [python] - repo: https://github.com/PyCQA/docformatter rev: v1.5.0 From 6c83352c00440b171fee6624194aa9ae6e15f0f1 Mon Sep 17 00:00:00 2001 From: Anna Pfohl Date: Thu, 4 Jan 2024 20:11:53 -0800 Subject: [PATCH 2/7] fresh reinstall? --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d9c6505361..582b6e4145 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.4 + rev: v1.5.0 hooks: - id: insert-license args: From 012b1e2c1c36e813c52b0b42f95acc664fe0254a Mon Sep 17 00:00:00 2001 From: Anna Pfohl Date: Fri, 5 Jan 2024 11:45:47 -0800 Subject: [PATCH 3/7] allow past years --- .pre-commit-config.yaml | 3 ++- setup.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 582b6e4145..54038ef364 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.0 + rev: v1.5.4 hooks: - id: insert-license args: @@ -66,6 +66,7 @@ repos: - --comment-style - '#' - --use-current-year + - --allow-past-years types: [python] - repo: https://github.com/PyCQA/docformatter rev: v1.5.0 diff --git a/setup.py b/setup.py index 8122bbb14f..d4d2454f37 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,6 @@ +# Copyright 2024 MosaicML LLM Foundry authors +# SPDX-License-Identifier: Apache-2.0 + """MosaicML LLM Foundry package setup.""" import os @@ -73,7 +76,7 @@ extra_deps = {} extra_deps['dev'] = [ - 'pre-commit>=2.18.1,<3', + 'pre-commit>=3.2.0,<3', 'pytest>=7.2.1,<8', 'pytest_codeblocks>=0.16.1,<0.17', 'pytest-cov>=4,<5', From 061b6222d2a0a19c329c7648a526a792b08af22b Mon Sep 17 00:00:00 2001 From: Anna Pfohl Date: Fri, 5 Jan 2024 11:48:31 -0800 Subject: [PATCH 4/7] whoop --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d4d2454f37..67772eae5e 100644 --- a/setup.py +++ b/setup.py @@ -76,7 +76,7 @@ extra_deps = {} extra_deps['dev'] = [ - 'pre-commit>=3.2.0,<3', + 'pre-commit>=3.2.0,<4', 'pytest>=7.2.1,<8', 'pytest_codeblocks>=0.16.1,<0.17', 'pytest-cov>=4,<5', From 0f741b88daf4b6582d5f7254fccd237543f8f00a Mon Sep 17 00:00:00 2001 From: Anna Pfohl Date: Fri, 5 Jan 2024 17:37:02 -0800 Subject: [PATCH 5/7] just 2024 --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54038ef364..d9c6505361 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,6 @@ repos: - --comment-style - '#' - --use-current-year - - --allow-past-years types: [python] - repo: https://github.com/PyCQA/docformatter rev: v1.5.0 From 4c59c64aa00e2b19148928abd3b1510596855896 Mon Sep 17 00:00:00 2001 From: Anna Pfohl Date: Fri, 5 Jan 2024 17:53:27 -0800 Subject: [PATCH 6/7] 2024 --- .github/mcp/mcp_pytest.py | 2 +- .pre-commit-config.yaml | 2 +- llmfoundry/__init__.py | 2 +- llmfoundry/callbacks/__init__.py | 2 +- llmfoundry/callbacks/async_eval_callback.py | 2 +- llmfoundry/callbacks/eval_gauntlet_callback.py | 2 +- llmfoundry/callbacks/fdiff_callback.py | 2 +- llmfoundry/callbacks/generate_callback.py | 2 +- llmfoundry/callbacks/hf_checkpointer.py | 2 +- llmfoundry/callbacks/model_gauntlet_callback.py | 2 +- llmfoundry/callbacks/monolithic_ckpt_callback.py | 2 +- llmfoundry/callbacks/resumption_callbacks.py | 2 +- llmfoundry/callbacks/scheduled_gc_callback.py | 2 +- llmfoundry/data/__init__.py | 2 +- llmfoundry/data/data.py | 2 +- llmfoundry/data/dataloader.py | 2 +- llmfoundry/data/denoising.py | 2 +- llmfoundry/data/finetuning/__init__.py | 2 +- llmfoundry/data/finetuning/collator.py | 2 +- llmfoundry/data/finetuning/dataloader.py | 2 +- llmfoundry/data/finetuning/tasks.py | 2 +- llmfoundry/data/packing.py | 2 +- llmfoundry/data/text_data.py | 2 +- llmfoundry/models/__init__.py | 2 +- llmfoundry/models/hf/__init__.py | 2 +- llmfoundry/models/hf/hf_causal_lm.py | 2 +- llmfoundry/models/hf/hf_fsdp.py | 2 +- llmfoundry/models/hf/hf_prefix_lm.py | 2 +- llmfoundry/models/hf/hf_t5.py | 2 +- llmfoundry/models/hf/model_wrapper.py | 2 +- llmfoundry/models/inference_api_wrapper/__init__.py | 2 +- llmfoundry/models/inference_api_wrapper/interface.py | 2 +- llmfoundry/models/inference_api_wrapper/openai_causal_lm.py | 2 +- llmfoundry/models/layers/__init__.py | 2 +- llmfoundry/models/layers/attention.py | 2 +- llmfoundry/models/layers/blocks.py | 2 +- llmfoundry/models/layers/custom_embedding.py | 2 +- llmfoundry/models/layers/fc.py | 2 +- llmfoundry/models/layers/ffn.py | 2 +- llmfoundry/models/layers/llama_attention_monkeypatch.py | 2 +- llmfoundry/models/layers/norm.py | 2 +- llmfoundry/models/model_registry.py | 2 +- llmfoundry/models/mpt/__init__.py | 2 +- llmfoundry/models/mpt/configuration_mpt.py | 2 +- llmfoundry/models/mpt/modeling_mpt.py | 2 +- llmfoundry/models/utils/__init__.py | 2 +- llmfoundry/models/utils/adapt_tokenizer.py | 2 +- llmfoundry/models/utils/hf_prefixlm_converter.py | 2 +- llmfoundry/models/utils/meta_init_context.py | 2 +- llmfoundry/models/utils/param_init_fns.py | 2 +- llmfoundry/optim/__init__.py | 2 +- llmfoundry/optim/adaptive_lion.py | 2 +- llmfoundry/optim/lion.py | 2 +- llmfoundry/optim/lion8b.py | 2 +- llmfoundry/optim/outlier_detection.py | 2 +- llmfoundry/optim/scheduler.py | 2 +- llmfoundry/tokenizers/__init__.py | 2 +- llmfoundry/tokenizers/tiktoken.py | 2 +- llmfoundry/utils/__init__.py | 2 +- llmfoundry/utils/builders.py | 2 +- llmfoundry/utils/checkpoint_conversion_helpers.py | 2 +- llmfoundry/utils/config_utils.py | 2 +- llmfoundry/utils/data_prep_utils.py | 2 +- llmfoundry/utils/huggingface_hub_utils.py | 2 +- llmfoundry/utils/logging_utils.py | 2 +- llmfoundry/utils/model_download_utils.py | 2 +- llmfoundry/utils/prompt_files.py | 2 +- scripts/data_prep/convert_dataset_hf.py | 2 +- scripts/data_prep/convert_dataset_json.py | 2 +- scripts/data_prep/convert_finetuning_dataset.py | 2 +- scripts/data_prep/convert_text_to_mds.py | 2 +- scripts/eval/eval.py | 2 +- scripts/inference/__init__.py | 2 +- scripts/inference/benchmarking/benchmark.py | 2 +- scripts/inference/convert_composer_mpt_to_ft.py | 2 +- scripts/inference/convert_composer_to_hf.py | 2 +- scripts/inference/convert_hf_mpt_to_ft.py | 2 +- scripts/inference/convert_hf_to_onnx.py | 2 +- scripts/inference/endpoint_generate.py | 2 +- scripts/inference/hf_chat.py | 2 +- scripts/inference/hf_generate.py | 2 +- scripts/inference/run_mpt_with_ft.py | 2 +- scripts/misc/convert_examples_ckpt.py | 2 +- scripts/misc/download_hf_model.py | 2 +- scripts/misc/profile_packing.py | 2 +- scripts/misc/update_hub_code.py | 2 +- scripts/train/benchmarking/collect_results.py | 2 +- scripts/train/benchmarking/submit_benchmarks.py | 2 +- scripts/train/finetune_example/preprocessing.py | 2 +- scripts/train/train.py | 2 +- setup.py | 2 +- tests/__init__.py | 2 +- tests/a_scripts/__init__.py | 2 +- tests/a_scripts/data_prep/__init__.py | 2 +- tests/a_scripts/data_prep/test_convert_dataset_hf.py | 2 +- tests/a_scripts/data_prep/test_convert_dataset_json.py | 2 +- tests/a_scripts/data_prep/test_convert_text_to_mds.py | 2 +- tests/a_scripts/eval/__init__.py | 2 +- tests/a_scripts/eval/test_eval.py | 2 +- tests/a_scripts/eval/test_eval_inputs.py | 2 +- tests/a_scripts/inference/__init__.py | 2 +- tests/a_scripts/inference/test_convert_composer_to_hf.py | 2 +- tests/a_scripts/train/__init__.py | 2 +- tests/a_scripts/train/test_train.py | 2 +- tests/a_scripts/train/test_train_inputs.py | 2 +- tests/callbacks/__init__.py | 2 +- tests/callbacks/test_async_eval_callback.py | 2 +- tests/callbacks/test_eval_gauntlet_callback.py | 2 +- tests/conftest.py | 2 +- tests/data/__init__.py | 2 +- tests/data/test_dataloader.py | 2 +- tests/data/test_icl_datasets.py | 2 +- tests/data/test_packing.py | 2 +- tests/data_utils.py | 2 +- tests/fixtures/__init__.py | 2 +- tests/fixtures/autouse.py | 2 +- tests/fixtures/data.py | 2 +- tests/fixtures/models.py | 2 +- tests/horrible_strings.py | 2 +- tests/models/__init__.py | 2 +- tests/models/hf/__init__.py | 2 +- tests/models/hf/test_hf_config.py | 2 +- tests/models/hf/test_hf_mpt_gen.py | 2 +- tests/models/hf/test_hf_v_mpt.py | 2 +- tests/models/inference_api_wrapper/__init__.py | 2 +- .../inference_api_wrapper/test_inference_api_eval_wrapper.py | 2 +- tests/models/layers/__init__.py | 2 +- tests/models/layers/test_flash_attn.py | 2 +- tests/models/layers/test_flash_triton_torch.py | 2 +- tests/models/layers/test_huggingface_flash.py | 2 +- tests/models/test_fsdp_act_checkpoint.py | 2 +- tests/models/test_model.py | 2 +- tests/models/test_mpt_gen.py | 2 +- tests/models/test_onnx.py | 2 +- tests/models/test_rope_dail_vs_hf.py | 2 +- tests/models/utils/__init__.py | 2 +- tests/models/utils/test_param_init_fns.py | 2 +- tests/optim/__init__.py | 2 +- tests/optim/test_lion8b.py | 2 +- tests/optim/test_scheduler.py | 2 +- tests/test_smoketest.py | 2 +- tests/tokenizers/__init__.py | 2 +- tests/tokenizers/test_tiktoken.py | 2 +- tests/tokenizers/test_tokenizer.py | 2 +- tests/utils/__init__.py | 2 +- tests/utils/test_builders.py | 2 +- tests/utils/test_huggingface_hub_utils.py | 2 +- tests/utils/test_model_download_utils.py | 2 +- tests/utils/test_prompt_files.py | 2 +- 149 files changed, 149 insertions(+), 149 deletions(-) diff --git a/.github/mcp/mcp_pytest.py b/.github/mcp/mcp_pytest.py index e7d4270272..65d3a0c7bf 100644 --- a/.github/mcp/mcp_pytest.py +++ b/.github/mcp/mcp_pytest.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Run pytest using MCP.""" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d9c6505361..582b6e4145 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.4 + rev: v1.5.0 hooks: - id: insert-license args: diff --git a/llmfoundry/__init__.py b/llmfoundry/__init__.py index 87504d26b3..2d8a426244 100644 --- a/llmfoundry/__init__.py +++ b/llmfoundry/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import torch diff --git a/llmfoundry/callbacks/__init__.py b/llmfoundry/callbacks/__init__.py index 08e9337681..50f0827ae1 100644 --- a/llmfoundry/callbacks/__init__.py +++ b/llmfoundry/callbacks/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 try: diff --git a/llmfoundry/callbacks/async_eval_callback.py b/llmfoundry/callbacks/async_eval_callback.py index 8352a9e283..c9bd465eb8 100644 --- a/llmfoundry/callbacks/async_eval_callback.py +++ b/llmfoundry/callbacks/async_eval_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Run the eval loop asynchronously as part of a MosaicML platform run. diff --git a/llmfoundry/callbacks/eval_gauntlet_callback.py b/llmfoundry/callbacks/eval_gauntlet_callback.py index 4c2bcfe297..26033381e0 100644 --- a/llmfoundry/callbacks/eval_gauntlet_callback.py +++ b/llmfoundry/callbacks/eval_gauntlet_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Aggregate ICL evals into composite scores.""" diff --git a/llmfoundry/callbacks/fdiff_callback.py b/llmfoundry/callbacks/fdiff_callback.py index 1237f32e22..41049b46c0 100644 --- a/llmfoundry/callbacks/fdiff_callback.py +++ b/llmfoundry/callbacks/fdiff_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Monitor rate of change of loss.""" diff --git a/llmfoundry/callbacks/generate_callback.py b/llmfoundry/callbacks/generate_callback.py index 58ba7e685e..dace6904f9 100644 --- a/llmfoundry/callbacks/generate_callback.py +++ b/llmfoundry/callbacks/generate_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Deprecated Generate callback. diff --git a/llmfoundry/callbacks/hf_checkpointer.py b/llmfoundry/callbacks/hf_checkpointer.py index 491d510188..01162f362a 100644 --- a/llmfoundry/callbacks/hf_checkpointer.py +++ b/llmfoundry/callbacks/hf_checkpointer.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import contextlib diff --git a/llmfoundry/callbacks/model_gauntlet_callback.py b/llmfoundry/callbacks/model_gauntlet_callback.py index 4a8da7f6c4..eac5dfd841 100644 --- a/llmfoundry/callbacks/model_gauntlet_callback.py +++ b/llmfoundry/callbacks/model_gauntlet_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from composer.core import Callback diff --git a/llmfoundry/callbacks/monolithic_ckpt_callback.py b/llmfoundry/callbacks/monolithic_ckpt_callback.py index a71db9bd43..87a1e934ec 100644 --- a/llmfoundry/callbacks/monolithic_ckpt_callback.py +++ b/llmfoundry/callbacks/monolithic_ckpt_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import contextlib diff --git a/llmfoundry/callbacks/resumption_callbacks.py b/llmfoundry/callbacks/resumption_callbacks.py index 751accc922..350f3f92d9 100644 --- a/llmfoundry/callbacks/resumption_callbacks.py +++ b/llmfoundry/callbacks/resumption_callbacks.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/llmfoundry/callbacks/scheduled_gc_callback.py b/llmfoundry/callbacks/scheduled_gc_callback.py index 6bd085e68f..b0100fbe47 100644 --- a/llmfoundry/callbacks/scheduled_gc_callback.py +++ b/llmfoundry/callbacks/scheduled_gc_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import gc diff --git a/llmfoundry/data/__init__.py b/llmfoundry/data/__init__.py index 8da436b9b1..14243285d1 100644 --- a/llmfoundry/data/__init__.py +++ b/llmfoundry/data/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.data.data import ConcatTokensDataset, NoConcatDataset diff --git a/llmfoundry/data/data.py b/llmfoundry/data/data.py index 92e4538d73..351a469dc0 100644 --- a/llmfoundry/data/data.py +++ b/llmfoundry/data/data.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Datasets for converting to MDS Shards.""" diff --git a/llmfoundry/data/dataloader.py b/llmfoundry/data/dataloader.py index 63d47a65d5..5d7e31acd7 100644 --- a/llmfoundry/data/dataloader.py +++ b/llmfoundry/data/dataloader.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Dataloader builder utilities.""" diff --git a/llmfoundry/data/denoising.py b/llmfoundry/data/denoising.py index 9c14f21751..421f4b84d3 100644 --- a/llmfoundry/data/denoising.py +++ b/llmfoundry/data/denoising.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Streaming dataloader for (mixture of) denoising task(s).""" diff --git a/llmfoundry/data/finetuning/__init__.py b/llmfoundry/data/finetuning/__init__.py index 9d10a17cfa..18d7b74602 100644 --- a/llmfoundry/data/finetuning/__init__.py +++ b/llmfoundry/data/finetuning/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.data.finetuning.collator import Seq2SeqFinetuningCollator diff --git a/llmfoundry/data/finetuning/collator.py b/llmfoundry/data/finetuning/collator.py index 1e402c4647..fef609815d 100644 --- a/llmfoundry/data/finetuning/collator.py +++ b/llmfoundry/data/finetuning/collator.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/llmfoundry/data/finetuning/dataloader.py b/llmfoundry/data/finetuning/dataloader.py index 97725ce78c..fdd9bc8113 100644 --- a/llmfoundry/data/finetuning/dataloader.py +++ b/llmfoundry/data/finetuning/dataloader.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import logging import os diff --git a/llmfoundry/data/finetuning/tasks.py b/llmfoundry/data/finetuning/tasks.py index e61d138c41..337da47b36 100644 --- a/llmfoundry/data/finetuning/tasks.py +++ b/llmfoundry/data/finetuning/tasks.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Includes code for task-specific seq-to-seq data formatting. diff --git a/llmfoundry/data/packing.py b/llmfoundry/data/packing.py index d3084c72c8..cc84a8c3e6 100644 --- a/llmfoundry/data/packing.py +++ b/llmfoundry/data/packing.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/llmfoundry/data/text_data.py b/llmfoundry/data/text_data.py index 1c0894a451..6b531e793b 100644 --- a/llmfoundry/data/text_data.py +++ b/llmfoundry/data/text_data.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Build a StreamingTextDataset dataset and dataloader for training.""" diff --git a/llmfoundry/models/__init__.py b/llmfoundry/models/__init__.py index 392d7d3c3c..1bfa1f5a6c 100644 --- a/llmfoundry/models/__init__.py +++ b/llmfoundry/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.models.hf import (ComposerHFCausalLM, ComposerHFPrefixLM, diff --git a/llmfoundry/models/hf/__init__.py b/llmfoundry/models/hf/__init__.py index d0ab65dfaf..eef398fab4 100644 --- a/llmfoundry/models/hf/__init__.py +++ b/llmfoundry/models/hf/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.models.hf.hf_causal_lm import ComposerHFCausalLM diff --git a/llmfoundry/models/hf/hf_causal_lm.py b/llmfoundry/models/hf/hf_causal_lm.py index 87b6080de7..03bee3fe36 100644 --- a/llmfoundry/models/hf/hf_causal_lm.py +++ b/llmfoundry/models/hf/hf_causal_lm.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Implements a Hugging Causal LM wrapped inside a :class:`.ComposerModel`.""" diff --git a/llmfoundry/models/hf/hf_fsdp.py b/llmfoundry/models/hf/hf_fsdp.py index 919c33227d..fc6f97e288 100644 --- a/llmfoundry/models/hf/hf_fsdp.py +++ b/llmfoundry/models/hf/hf_fsdp.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 # helper functions from https://github.com/CarperAI/trlx/blob/main/trlx/utils/modeling.py diff --git a/llmfoundry/models/hf/hf_prefix_lm.py b/llmfoundry/models/hf/hf_prefix_lm.py index 7152dfae70..cf5db1656d 100644 --- a/llmfoundry/models/hf/hf_prefix_lm.py +++ b/llmfoundry/models/hf/hf_prefix_lm.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Implements a Hugging Prefix LM wrapped inside a :class:`.ComposerModel`.""" diff --git a/llmfoundry/models/hf/hf_t5.py b/llmfoundry/models/hf/hf_t5.py index 690a0de447..71ec3dba38 100644 --- a/llmfoundry/models/hf/hf_t5.py +++ b/llmfoundry/models/hf/hf_t5.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Implements a Hugging Face T5 wrapped inside a :class:`.ComposerModel`.""" diff --git a/llmfoundry/models/hf/model_wrapper.py b/llmfoundry/models/hf/model_wrapper.py index f387562b2f..dc3b66f5f6 100644 --- a/llmfoundry/models/hf/model_wrapper.py +++ b/llmfoundry/models/hf/model_wrapper.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Re-usable :class:`.ComposerModel` for LLM HF Models.""" diff --git a/llmfoundry/models/inference_api_wrapper/__init__.py b/llmfoundry/models/inference_api_wrapper/__init__.py index 496abf2aa6..2fe847fa79 100644 --- a/llmfoundry/models/inference_api_wrapper/__init__.py +++ b/llmfoundry/models/inference_api_wrapper/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.models.inference_api_wrapper.interface import \ diff --git a/llmfoundry/models/inference_api_wrapper/interface.py b/llmfoundry/models/inference_api_wrapper/interface.py index 9d0ce7deb3..4db29157a2 100644 --- a/llmfoundry/models/inference_api_wrapper/interface.py +++ b/llmfoundry/models/inference_api_wrapper/interface.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import Any, Dict, Optional diff --git a/llmfoundry/models/inference_api_wrapper/openai_causal_lm.py b/llmfoundry/models/inference_api_wrapper/openai_causal_lm.py index 39de2ba59c..bf096dbe1f 100644 --- a/llmfoundry/models/inference_api_wrapper/openai_causal_lm.py +++ b/llmfoundry/models/inference_api_wrapper/openai_causal_lm.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Implements a OpenAI chat and causal LM inference API wrappers.""" diff --git a/llmfoundry/models/layers/__init__.py b/llmfoundry/models/layers/__init__.py index 68aa0fe7fe..449535f028 100644 --- a/llmfoundry/models/layers/__init__.py +++ b/llmfoundry/models/layers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.models.layers.attention import ( diff --git a/llmfoundry/models/layers/attention.py b/llmfoundry/models/layers/attention.py index 2a90bf2f80..dd7213868d 100644 --- a/llmfoundry/models/layers/attention.py +++ b/llmfoundry/models/layers/attention.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Attention layers.""" diff --git a/llmfoundry/models/layers/blocks.py b/llmfoundry/models/layers/blocks.py index c077ccb535..8e6071454a 100644 --- a/llmfoundry/models/layers/blocks.py +++ b/llmfoundry/models/layers/blocks.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """GPT Blocks used for the GPT Model.""" diff --git a/llmfoundry/models/layers/custom_embedding.py b/llmfoundry/models/layers/custom_embedding.py index 20a2be3a55..60cf8c707a 100644 --- a/llmfoundry/models/layers/custom_embedding.py +++ b/llmfoundry/models/layers/custom_embedding.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import torch.nn as nn diff --git a/llmfoundry/models/layers/fc.py b/llmfoundry/models/layers/fc.py index b85bc133bd..2c205cb635 100644 --- a/llmfoundry/models/layers/fc.py +++ b/llmfoundry/models/layers/fc.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from torch import nn diff --git a/llmfoundry/models/layers/ffn.py b/llmfoundry/models/layers/ffn.py index fa3e109bf8..ec1d47dbe3 100644 --- a/llmfoundry/models/layers/ffn.py +++ b/llmfoundry/models/layers/ffn.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """MPT Blocks used for the MPT Model.""" diff --git a/llmfoundry/models/layers/llama_attention_monkeypatch.py b/llmfoundry/models/layers/llama_attention_monkeypatch.py index 9ceeb0747e..9bd9e51031 100644 --- a/llmfoundry/models/layers/llama_attention_monkeypatch.py +++ b/llmfoundry/models/layers/llama_attention_monkeypatch.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 # This file is copied and modified from diff --git a/llmfoundry/models/layers/norm.py b/llmfoundry/models/layers/norm.py index 2ff4eaed0c..4674e57744 100644 --- a/llmfoundry/models/layers/norm.py +++ b/llmfoundry/models/layers/norm.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import Dict, List, Optional, Type, Union diff --git a/llmfoundry/models/model_registry.py b/llmfoundry/models/model_registry.py index be09a69835..6c5402d299 100644 --- a/llmfoundry/models/model_registry.py +++ b/llmfoundry/models/model_registry.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.models.hf import (ComposerHFCausalLM, ComposerHFPrefixLM, diff --git a/llmfoundry/models/mpt/__init__.py b/llmfoundry/models/mpt/__init__.py index 04bed25fab..bd327f5085 100644 --- a/llmfoundry/models/mpt/__init__.py +++ b/llmfoundry/models/mpt/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.models.mpt.configuration_mpt import MPTConfig diff --git a/llmfoundry/models/mpt/configuration_mpt.py b/llmfoundry/models/mpt/configuration_mpt.py index ae4754108c..5b0aeb774d 100644 --- a/llmfoundry/models/mpt/configuration_mpt.py +++ b/llmfoundry/models/mpt/configuration_mpt.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """A HuggingFace-style model configuration.""" diff --git a/llmfoundry/models/mpt/modeling_mpt.py b/llmfoundry/models/mpt/modeling_mpt.py index 4c80b10ed9..666f23b08e 100644 --- a/llmfoundry/models/mpt/modeling_mpt.py +++ b/llmfoundry/models/mpt/modeling_mpt.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """A simple, flexible implementation of a GPT model. diff --git a/llmfoundry/models/utils/__init__.py b/llmfoundry/models/utils/__init__.py index 35a15e530a..b5ab568845 100644 --- a/llmfoundry/models/utils/__init__.py +++ b/llmfoundry/models/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.models.utils.adapt_tokenizer import ( diff --git a/llmfoundry/models/utils/adapt_tokenizer.py b/llmfoundry/models/utils/adapt_tokenizer.py index 8cb0c33697..d759436380 100644 --- a/llmfoundry/models/utils/adapt_tokenizer.py +++ b/llmfoundry/models/utils/adapt_tokenizer.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import Any diff --git a/llmfoundry/models/utils/hf_prefixlm_converter.py b/llmfoundry/models/utils/hf_prefixlm_converter.py index 692fab94c2..b6db11090f 100644 --- a/llmfoundry/models/utils/hf_prefixlm_converter.py +++ b/llmfoundry/models/utils/hf_prefixlm_converter.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Converts Huggingface Causal LM to Prefix LM. diff --git a/llmfoundry/models/utils/meta_init_context.py b/llmfoundry/models/utils/meta_init_context.py index c22c226c28..67f102b126 100644 --- a/llmfoundry/models/utils/meta_init_context.py +++ b/llmfoundry/models/utils/meta_init_context.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 # Copyright 2022 The HuggingFace Team. All rights reserved. diff --git a/llmfoundry/models/utils/param_init_fns.py b/llmfoundry/models/utils/param_init_fns.py index 2e72ccfa47..7a2fea2345 100644 --- a/llmfoundry/models/utils/param_init_fns.py +++ b/llmfoundry/models/utils/param_init_fns.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import math diff --git a/llmfoundry/optim/__init__.py b/llmfoundry/optim/__init__.py index 1d0e5caced..b1c96ea4c6 100644 --- a/llmfoundry/optim/__init__.py +++ b/llmfoundry/optim/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.optim.adaptive_lion import DecoupledAdaLRLion, DecoupledClipLion diff --git a/llmfoundry/optim/adaptive_lion.py b/llmfoundry/optim/adaptive_lion.py index 0ce76e905e..3633bca3da 100644 --- a/llmfoundry/optim/adaptive_lion.py +++ b/llmfoundry/optim/adaptive_lion.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/llmfoundry/optim/lion.py b/llmfoundry/optim/lion.py index 0caa7d2877..b57f45a036 100644 --- a/llmfoundry/optim/lion.py +++ b/llmfoundry/optim/lion.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/llmfoundry/optim/lion8b.py b/llmfoundry/optim/lion8b.py index f76d29b1c7..1530660b2b 100644 --- a/llmfoundry/optim/lion8b.py +++ b/llmfoundry/optim/lion8b.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import Any, Callable, Dict, Iterable, Optional, Tuple, Union diff --git a/llmfoundry/optim/outlier_detection.py b/llmfoundry/optim/outlier_detection.py index 9df4381ba4..c7a185caeb 100644 --- a/llmfoundry/optim/outlier_detection.py +++ b/llmfoundry/optim/outlier_detection.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import collections diff --git a/llmfoundry/optim/scheduler.py b/llmfoundry/optim/scheduler.py index 4a6d21c873..7312728081 100644 --- a/llmfoundry/optim/scheduler.py +++ b/llmfoundry/optim/scheduler.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Experimental learning rate schedulers used for training LLMs.""" diff --git a/llmfoundry/tokenizers/__init__.py b/llmfoundry/tokenizers/__init__.py index 1703ed8862..bc5b66ff2c 100644 --- a/llmfoundry/tokenizers/__init__.py +++ b/llmfoundry/tokenizers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry.tokenizers.tiktoken import TiktokenTokenizerWrapper diff --git a/llmfoundry/tokenizers/tiktoken.py b/llmfoundry/tokenizers/tiktoken.py index 342b5c2ecf..c9dd3ad4ee 100644 --- a/llmfoundry/tokenizers/tiktoken.py +++ b/llmfoundry/tokenizers/tiktoken.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from functools import lru_cache from typing import Any, Dict, List, Optional, Tuple diff --git a/llmfoundry/utils/__init__.py b/llmfoundry/utils/__init__.py index 7abe4dcf75..48302edded 100644 --- a/llmfoundry/utils/__init__.py +++ b/llmfoundry/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 try: diff --git a/llmfoundry/utils/builders.py b/llmfoundry/utils/builders.py index 404ad604ab..c939dfb27e 100644 --- a/llmfoundry/utils/builders.py +++ b/llmfoundry/utils/builders.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import functools diff --git a/llmfoundry/utils/checkpoint_conversion_helpers.py b/llmfoundry/utils/checkpoint_conversion_helpers.py index dafeec94e1..4b1242af11 100644 --- a/llmfoundry/utils/checkpoint_conversion_helpers.py +++ b/llmfoundry/utils/checkpoint_conversion_helpers.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Helper methods for the checkpoint conversion scripts. diff --git a/llmfoundry/utils/config_utils.py b/llmfoundry/utils/config_utils.py index 55576eaba0..e90451ace6 100644 --- a/llmfoundry/utils/config_utils.py +++ b/llmfoundry/utils/config_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import contextlib diff --git a/llmfoundry/utils/data_prep_utils.py b/llmfoundry/utils/data_prep_utils.py index a88e65ee94..4d4459c954 100644 --- a/llmfoundry/utils/data_prep_utils.py +++ b/llmfoundry/utils/data_prep_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import json diff --git a/llmfoundry/utils/huggingface_hub_utils.py b/llmfoundry/utils/huggingface_hub_utils.py index a74ab1cc35..b2908c05bb 100644 --- a/llmfoundry/utils/huggingface_hub_utils.py +++ b/llmfoundry/utils/huggingface_hub_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import ast diff --git a/llmfoundry/utils/logging_utils.py b/llmfoundry/utils/logging_utils.py index 081a06fefb..5a269284a5 100644 --- a/llmfoundry/utils/logging_utils.py +++ b/llmfoundry/utils/logging_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/llmfoundry/utils/model_download_utils.py b/llmfoundry/utils/model_download_utils.py index 2104455e0f..14daed8531 100644 --- a/llmfoundry/utils/model_download_utils.py +++ b/llmfoundry/utils/model_download_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Utility functions for downloading models.""" diff --git a/llmfoundry/utils/prompt_files.py b/llmfoundry/utils/prompt_files.py index 40de19907a..a756c14fd0 100644 --- a/llmfoundry/utils/prompt_files.py +++ b/llmfoundry/utils/prompt_files.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/scripts/data_prep/convert_dataset_hf.py b/scripts/data_prep/convert_dataset_hf.py index f33f24e478..7279de6894 100644 --- a/scripts/data_prep/convert_dataset_hf.py +++ b/scripts/data_prep/convert_dataset_hf.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Streaming dataset conversion scripts for C4 and The Pile.""" diff --git a/scripts/data_prep/convert_dataset_json.py b/scripts/data_prep/convert_dataset_json.py index 54c0bfa814..d44bd8b382 100644 --- a/scripts/data_prep/convert_dataset_json.py +++ b/scripts/data_prep/convert_dataset_json.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Streaming dataset conversion scripts for json files.""" diff --git a/scripts/data_prep/convert_finetuning_dataset.py b/scripts/data_prep/convert_finetuning_dataset.py index e24b6ec904..767d99cd4f 100644 --- a/scripts/data_prep/convert_finetuning_dataset.py +++ b/scripts/data_prep/convert_finetuning_dataset.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/scripts/data_prep/convert_text_to_mds.py b/scripts/data_prep/convert_text_to_mds.py index dc7c514d75..5e329592c4 100644 --- a/scripts/data_prep/convert_text_to_mds.py +++ b/scripts/data_prep/convert_text_to_mds.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import logging diff --git a/scripts/eval/eval.py b/scripts/eval/eval.py index 8dbe91e6d2..0cea4eb1a8 100644 --- a/scripts/eval/eval.py +++ b/scripts/eval/eval.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import copy diff --git a/scripts/inference/__init__.py b/scripts/inference/__init__.py index ce8faa53d7..1ea9c5ed7c 100644 --- a/scripts/inference/__init__.py +++ b/scripts/inference/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 __all__ = [] diff --git a/scripts/inference/benchmarking/benchmark.py b/scripts/inference/benchmarking/benchmark.py index d2e51bb7a5..99c67de3f3 100644 --- a/scripts/inference/benchmarking/benchmark.py +++ b/scripts/inference/benchmarking/benchmark.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import sys diff --git a/scripts/inference/convert_composer_mpt_to_ft.py b/scripts/inference/convert_composer_mpt_to_ft.py index f59eb6005a..4c5f2e3975 100644 --- a/scripts/inference/convert_composer_mpt_to_ft.py +++ b/scripts/inference/convert_composer_mpt_to_ft.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 # Note: This script is specifically for converting MPT Composer checkpoints to FasterTransformer format. diff --git a/scripts/inference/convert_composer_to_hf.py b/scripts/inference/convert_composer_to_hf.py index 51afb105c8..e410448375 100644 --- a/scripts/inference/convert_composer_to_hf.py +++ b/scripts/inference/convert_composer_to_hf.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/scripts/inference/convert_hf_mpt_to_ft.py b/scripts/inference/convert_hf_mpt_to_ft.py index 104d0d6b15..25873d9dce 100644 --- a/scripts/inference/convert_hf_mpt_to_ft.py +++ b/scripts/inference/convert_hf_mpt_to_ft.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved. diff --git a/scripts/inference/convert_hf_to_onnx.py b/scripts/inference/convert_hf_to_onnx.py index 1ba1123c86..30e5cde501 100644 --- a/scripts/inference/convert_hf_to_onnx.py +++ b/scripts/inference/convert_hf_to_onnx.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Basic HuggingFace -> ONNX export script. diff --git a/scripts/inference/endpoint_generate.py b/scripts/inference/endpoint_generate.py index e78fecf59b..0fcd141419 100644 --- a/scripts/inference/endpoint_generate.py +++ b/scripts/inference/endpoint_generate.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Batch generate text completion results from an endpoint. diff --git a/scripts/inference/hf_chat.py b/scripts/inference/hf_chat.py index 4f938f999e..8594109f5d 100644 --- a/scripts/inference/hf_chat.py +++ b/scripts/inference/hf_chat.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import time diff --git a/scripts/inference/hf_generate.py b/scripts/inference/hf_generate.py index 6ac645e5b7..3799f3a5bd 100644 --- a/scripts/inference/hf_generate.py +++ b/scripts/inference/hf_generate.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import itertools import random diff --git a/scripts/inference/run_mpt_with_ft.py b/scripts/inference/run_mpt_with_ft.py index 10ccf6b78b..41ac4779c8 100644 --- a/scripts/inference/run_mpt_with_ft.py +++ b/scripts/inference/run_mpt_with_ft.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved. diff --git a/scripts/misc/convert_examples_ckpt.py b/scripts/misc/convert_examples_ckpt.py index a533aec72d..26d707bcae 100644 --- a/scripts/misc/convert_examples_ckpt.py +++ b/scripts/misc/convert_examples_ckpt.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/scripts/misc/download_hf_model.py b/scripts/misc/download_hf_model.py index 58c3445e7d..d2aba7bd72 100644 --- a/scripts/misc/download_hf_model.py +++ b/scripts/misc/download_hf_model.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Script to download model weights from Hugging Face Hub or a cache server.""" diff --git a/scripts/misc/profile_packing.py b/scripts/misc/profile_packing.py index fff10d158b..ce466224ae 100644 --- a/scripts/misc/profile_packing.py +++ b/scripts/misc/profile_packing.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 """Script to profile example packing.""" diff --git a/scripts/misc/update_hub_code.py b/scripts/misc/update_hub_code.py index ee5f6935a3..f81134253e 100644 --- a/scripts/misc/update_hub_code.py +++ b/scripts/misc/update_hub_code.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import argparse diff --git a/scripts/train/benchmarking/collect_results.py b/scripts/train/benchmarking/collect_results.py index d3691e951c..a15926ce9d 100644 --- a/scripts/train/benchmarking/collect_results.py +++ b/scripts/train/benchmarking/collect_results.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import argparse diff --git a/scripts/train/benchmarking/submit_benchmarks.py b/scripts/train/benchmarking/submit_benchmarks.py index bfff10165a..3698aeb27a 100644 --- a/scripts/train/benchmarking/submit_benchmarks.py +++ b/scripts/train/benchmarking/submit_benchmarks.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import argparse import math diff --git a/scripts/train/finetune_example/preprocessing.py b/scripts/train/finetune_example/preprocessing.py index adfa3c5cce..380f0c5f11 100644 --- a/scripts/train/finetune_example/preprocessing.py +++ b/scripts/train/finetune_example/preprocessing.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 r"""Example custom preprocessing function. diff --git a/scripts/train/train.py b/scripts/train/train.py index ef7a3b91db..cad4d3b657 100644 --- a/scripts/train/train.py +++ b/scripts/train/train.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import copy import gc diff --git a/setup.py b/setup.py index 67772eae5e..c6d5587f9c 100644 --- a/setup.py +++ b/setup.py @@ -76,7 +76,7 @@ extra_deps = {} extra_deps['dev'] = [ - 'pre-commit>=3.2.0,<4', + 'pre-commit>=2.18.1,<3', 'pytest>=7.2.1,<8', 'pytest_codeblocks>=0.16.1,<0.17', 'pytest-cov>=4,<5', diff --git a/tests/__init__.py b/tests/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/a_scripts/__init__.py b/tests/a_scripts/__init__.py index eb5c1d149e..8f23a967eb 100644 --- a/tests/a_scripts/__init__.py +++ b/tests/a_scripts/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 # TODO: This test directory is called "a_scripts" to enforce that these tests are run diff --git a/tests/a_scripts/data_prep/__init__.py b/tests/a_scripts/data_prep/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/a_scripts/data_prep/__init__.py +++ b/tests/a_scripts/data_prep/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/a_scripts/data_prep/test_convert_dataset_hf.py b/tests/a_scripts/data_prep/test_convert_dataset_hf.py index f226b0a4be..e91377d4d2 100644 --- a/tests/a_scripts/data_prep/test_convert_dataset_hf.py +++ b/tests/a_scripts/data_prep/test_convert_dataset_hf.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/a_scripts/data_prep/test_convert_dataset_json.py b/tests/a_scripts/data_prep/test_convert_dataset_json.py index 179b8a701b..b19e0735ea 100644 --- a/tests/a_scripts/data_prep/test_convert_dataset_json.py +++ b/tests/a_scripts/data_prep/test_convert_dataset_json.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/a_scripts/data_prep/test_convert_text_to_mds.py b/tests/a_scripts/data_prep/test_convert_text_to_mds.py index cc293a2cdd..2a4c99a4a3 100644 --- a/tests/a_scripts/data_prep/test_convert_text_to_mds.py +++ b/tests/a_scripts/data_prep/test_convert_text_to_mds.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/a_scripts/eval/__init__.py b/tests/a_scripts/eval/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/a_scripts/eval/__init__.py +++ b/tests/a_scripts/eval/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/a_scripts/eval/test_eval.py b/tests/a_scripts/eval/test_eval.py index e8d86903dc..27236676d7 100644 --- a/tests/a_scripts/eval/test_eval.py +++ b/tests/a_scripts/eval/test_eval.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import copy diff --git a/tests/a_scripts/eval/test_eval_inputs.py b/tests/a_scripts/eval/test_eval_inputs.py index 8694546c4f..091fe68f3c 100644 --- a/tests/a_scripts/eval/test_eval_inputs.py +++ b/tests/a_scripts/eval/test_eval_inputs.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import copy import os diff --git a/tests/a_scripts/inference/__init__.py b/tests/a_scripts/inference/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/a_scripts/inference/__init__.py +++ b/tests/a_scripts/inference/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/a_scripts/inference/test_convert_composer_to_hf.py b/tests/a_scripts/inference/test_convert_composer_to_hf.py index 28fb9219f8..5243b5686d 100644 --- a/tests/a_scripts/inference/test_convert_composer_to_hf.py +++ b/tests/a_scripts/inference/test_convert_composer_to_hf.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import math diff --git a/tests/a_scripts/train/__init__.py b/tests/a_scripts/train/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/a_scripts/train/__init__.py +++ b/tests/a_scripts/train/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/a_scripts/train/test_train.py b/tests/a_scripts/train/test_train.py index a26b0c1879..773f386e27 100644 --- a/tests/a_scripts/train/test_train.py +++ b/tests/a_scripts/train/test_train.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import copy import pathlib diff --git a/tests/a_scripts/train/test_train_inputs.py b/tests/a_scripts/train/test_train_inputs.py index 17eca26587..458c6ce6d3 100644 --- a/tests/a_scripts/train/test_train_inputs.py +++ b/tests/a_scripts/train/test_train_inputs.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import copy import json diff --git a/tests/callbacks/__init__.py b/tests/callbacks/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/callbacks/__init__.py +++ b/tests/callbacks/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/callbacks/test_async_eval_callback.py b/tests/callbacks/test_async_eval_callback.py index b3a1e98f79..ce470e4e5a 100644 --- a/tests/callbacks/test_async_eval_callback.py +++ b/tests/callbacks/test_async_eval_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import datetime diff --git a/tests/callbacks/test_eval_gauntlet_callback.py b/tests/callbacks/test_eval_gauntlet_callback.py index 3a1e371ab8..fe41841a5c 100644 --- a/tests/callbacks/test_eval_gauntlet_callback.py +++ b/tests/callbacks/test_eval_gauntlet_callback.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/conftest.py b/tests/conftest.py index 545dc7e38f..b3ec3b64c3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/data/__init__.py b/tests/data/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/data/__init__.py +++ b/tests/data/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/data/test_dataloader.py b/tests/data/test_dataloader.py index 7f99eeda25..4ed88f69e4 100644 --- a/tests/data/test_dataloader.py +++ b/tests/data/test_dataloader.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import contextlib import os diff --git a/tests/data/test_icl_datasets.py b/tests/data/test_icl_datasets.py index 3a730fdf19..d337a3be82 100644 --- a/tests/data/test_icl_datasets.py +++ b/tests/data/test_icl_datasets.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import pathlib diff --git a/tests/data/test_packing.py b/tests/data/test_packing.py index 963f8e56b6..d71d380919 100644 --- a/tests/data/test_packing.py +++ b/tests/data/test_packing.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from pathlib import Path diff --git a/tests/data_utils.py b/tests/data_utils.py index 0afe3fa1a1..e528bfcbf9 100644 --- a/tests/data_utils.py +++ b/tests/data_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import json diff --git a/tests/fixtures/__init__.py b/tests/fixtures/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/fixtures/__init__.py +++ b/tests/fixtures/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/fixtures/autouse.py b/tests/fixtures/autouse.py index 75caa6c941..8e182f6507 100644 --- a/tests/fixtures/autouse.py +++ b/tests/fixtures/autouse.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import gc diff --git a/tests/fixtures/data.py b/tests/fixtures/data.py index 9ba053ffe8..037c6c6445 100644 --- a/tests/fixtures/data.py +++ b/tests/fixtures/data.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from pathlib import Path diff --git a/tests/fixtures/models.py b/tests/fixtures/models.py index 1b1ef86302..edd3da6af4 100644 --- a/tests/fixtures/models.py +++ b/tests/fixtures/models.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import Any, Callable diff --git a/tests/horrible_strings.py b/tests/horrible_strings.py index 31cd55cb9b..a383238265 100644 --- a/tests/horrible_strings.py +++ b/tests/horrible_strings.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 # taken from https://github.com/explosion/spaCy/blob/8f0d6b0a8c42e4852bf6e24cdf629043f2f39361/spacy/tests/tokenizer/test_naughty_strings.py#L7 diff --git a/tests/models/__init__.py b/tests/models/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/models/__init__.py +++ b/tests/models/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/models/hf/__init__.py b/tests/models/hf/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/models/hf/__init__.py +++ b/tests/models/hf/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/models/hf/test_hf_config.py b/tests/models/hf/test_hf_config.py index b47f267c55..f0dd1a7802 100644 --- a/tests/models/hf/test_hf_config.py +++ b/tests/models/hf/test_hf_config.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/models/hf/test_hf_mpt_gen.py b/tests/models/hf/test_hf_mpt_gen.py index 1df553f126..f0bb72f66e 100644 --- a/tests/models/hf/test_hf_mpt_gen.py +++ b/tests/models/hf/test_hf_mpt_gen.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import Callable diff --git a/tests/models/hf/test_hf_v_mpt.py b/tests/models/hf/test_hf_v_mpt.py index 1319934506..0e075b0d59 100644 --- a/tests/models/hf/test_hf_v_mpt.py +++ b/tests/models/hf/test_hf_v_mpt.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import warnings from typing import Optional diff --git a/tests/models/inference_api_wrapper/__init__.py b/tests/models/inference_api_wrapper/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/models/inference_api_wrapper/__init__.py +++ b/tests/models/inference_api_wrapper/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/models/inference_api_wrapper/test_inference_api_eval_wrapper.py b/tests/models/inference_api_wrapper/test_inference_api_eval_wrapper.py index a125203e19..6d09c7c488 100644 --- a/tests/models/inference_api_wrapper/test_inference_api_eval_wrapper.py +++ b/tests/models/inference_api_wrapper/test_inference_api_eval_wrapper.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/models/layers/__init__.py b/tests/models/layers/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/models/layers/__init__.py +++ b/tests/models/layers/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/models/layers/test_flash_attn.py b/tests/models/layers/test_flash_attn.py index acefd2c42d..566dcb6418 100644 --- a/tests/models/layers/test_flash_attn.py +++ b/tests/models/layers/test_flash_attn.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import math diff --git a/tests/models/layers/test_flash_triton_torch.py b/tests/models/layers/test_flash_triton_torch.py index 454fda311d..8827c13ac4 100644 --- a/tests/models/layers/test_flash_triton_torch.py +++ b/tests/models/layers/test_flash_triton_torch.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/tests/models/layers/test_huggingface_flash.py b/tests/models/layers/test_huggingface_flash.py index 411aab77a2..abd01cc704 100644 --- a/tests/models/layers/test_huggingface_flash.py +++ b/tests/models/layers/test_huggingface_flash.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import contextlib diff --git a/tests/models/test_fsdp_act_checkpoint.py b/tests/models/test_fsdp_act_checkpoint.py index 987ea5f2a7..a12779d0b2 100644 --- a/tests/models/test_fsdp_act_checkpoint.py +++ b/tests/models/test_fsdp_act_checkpoint.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import Union diff --git a/tests/models/test_model.py b/tests/models/test_model.py index 7bccad089d..378a4726a5 100644 --- a/tests/models/test_model.py +++ b/tests/models/test_model.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import contextlib import copy diff --git a/tests/models/test_mpt_gen.py b/tests/models/test_mpt_gen.py index 9f022ef487..1a8a68ea36 100644 --- a/tests/models/test_mpt_gen.py +++ b/tests/models/test_mpt_gen.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import Callable, List, Optional, Tuple diff --git a/tests/models/test_onnx.py b/tests/models/test_onnx.py index becd3c773f..27ced0b669 100644 --- a/tests/models/test_onnx.py +++ b/tests/models/test_onnx.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import pathlib diff --git a/tests/models/test_rope_dail_vs_hf.py b/tests/models/test_rope_dail_vs_hf.py index 70a00470f9..16ca171734 100644 --- a/tests/models/test_rope_dail_vs_hf.py +++ b/tests/models/test_rope_dail_vs_hf.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/tests/models/utils/__init__.py b/tests/models/utils/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/models/utils/__init__.py +++ b/tests/models/utils/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/models/utils/test_param_init_fns.py b/tests/models/utils/test_param_init_fns.py index 6be2c5ca42..fdb640b572 100644 --- a/tests/models/utils/test_param_init_fns.py +++ b/tests/models/utils/test_param_init_fns.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import math from collections import OrderedDict diff --git a/tests/optim/__init__.py b/tests/optim/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/optim/__init__.py +++ b/tests/optim/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/optim/test_lion8b.py b/tests/optim/test_lion8b.py index b421c6d250..3856efc416 100644 --- a/tests/optim/test_lion8b.py +++ b/tests/optim/test_lion8b.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/optim/test_scheduler.py b/tests/optim/test_scheduler.py index 5b9d45a141..c2fb29d1ca 100644 --- a/tests/optim/test_scheduler.py +++ b/tests/optim/test_scheduler.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from typing import List diff --git a/tests/test_smoketest.py b/tests/test_smoketest.py index a43925e506..1593d818c4 100644 --- a/tests/test_smoketest.py +++ b/tests/test_smoketest.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from llmfoundry import callbacks, data, models, optim, tokenizers, utils diff --git a/tests/tokenizers/__init__.py b/tests/tokenizers/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/tokenizers/__init__.py +++ b/tests/tokenizers/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/tokenizers/test_tiktoken.py b/tests/tokenizers/test_tiktoken.py index 1ade2ea156..fb369f59f9 100644 --- a/tests/tokenizers/test_tiktoken.py +++ b/tests/tokenizers/test_tiktoken.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import pathlib diff --git a/tests/tokenizers/test_tokenizer.py b/tests/tokenizers/test_tokenizer.py index 5f1e826177..38e44396d5 100644 --- a/tests/tokenizers/test_tokenizer.py +++ b/tests/tokenizers/test_tokenizer.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from omegaconf import OmegaConf as om diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py index f6c1f9f3ab..d069dcdf8a 100644 --- a/tests/utils/__init__.py +++ b/tests/utils/__init__.py @@ -1,2 +1,2 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/utils/test_builders.py b/tests/utils/test_builders.py index 9be6630075..fc6213f1f0 100644 --- a/tests/utils/test_builders.py +++ b/tests/utils/test_builders.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import re diff --git a/tests/utils/test_huggingface_hub_utils.py b/tests/utils/test_huggingface_hub_utils.py index 5effb3a771..de90de0cd5 100644 --- a/tests/utils/test_huggingface_hub_utils.py +++ b/tests/utils/test_huggingface_hub_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import ast diff --git a/tests/utils/test_model_download_utils.py b/tests/utils/test_model_download_utils.py index 27b9805cda..a5fe83a74c 100644 --- a/tests/utils/test_model_download_utils.py +++ b/tests/utils/test_model_download_utils.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os diff --git a/tests/utils/test_prompt_files.py b/tests/utils/test_prompt_files.py index 12a5d02999..d952e2fdf0 100644 --- a/tests/utils/test_prompt_files.py +++ b/tests/utils/test_prompt_files.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 from pathlib import Path From 76f5eeb637c17153812d6fbe2ee3e78962a35371 Mon Sep 17 00:00:00 2001 From: Anna Pfohl Date: Mon, 8 Jan 2024 08:33:56 -0800 Subject: [PATCH 7/7] formatting --- scripts/train/benchmarking/sweep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/train/benchmarking/sweep.py b/scripts/train/benchmarking/sweep.py index 441c9825f8..d0a7ac2bfd 100644 --- a/scripts/train/benchmarking/sweep.py +++ b/scripts/train/benchmarking/sweep.py @@ -1,4 +1,4 @@ -# Copyright 2022 MosaicML LLM Foundry authors +# Copyright 2022-2024 MosaicML LLM Foundry authors # SPDX-License-Identifier: Apache-2.0 import os