diff --git a/examples/llm/pretrain/custom_recipe.py b/examples/llm/pretrain/custom_recipe.py index a522a1a8e1f5..3ce688e1bc44 100644 --- a/examples/llm/pretrain/custom_recipe.py +++ b/examples/llm/pretrain/custom_recipe.py @@ -1,3 +1,17 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import nemo_run as run from nemo.collections import llm diff --git a/examples/llm/pretrain/default_executor.py b/examples/llm/pretrain/default_executor.py index 2668d312f2b8..2f5fc08d9d63 100644 --- a/examples/llm/pretrain/default_executor.py +++ b/examples/llm/pretrain/default_executor.py @@ -1,5 +1,21 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from typing import Optional + import nemo_run as run + from nemo.collections import llm diff --git a/examples/llm/pretrain/pretrain.ipynb b/examples/llm/pretrain/pretrain.ipynb index 194741a9da9f..76429d8cfcca 100644 --- a/examples/llm/pretrain/pretrain.ipynb +++ b/examples/llm/pretrain/pretrain.ipynb @@ -26,6 +26,20 @@ } ], "source": [ + "# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.\n", + "#\n", + "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", + "# you may not use this file except in compliance with the License.\n", + "# You may obtain a copy of the License at\n", + "#\n", + "# http://www.apache.org/licenses/LICENSE-2.0\n", + "#\n", + "# Unless required by applicable law or agreed to in writing, software\n", + "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", + "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", + "# See the License for the specific language governing permissions and\n", + "# limitations under the License.\n", + "\n", "import nemo_run as run\n", "from nemo.collections import llm\n", "from nemo.collections.llm.recipes import llama3_8b\n" diff --git a/scripts/llm/llama3_pretraining.py b/scripts/llm/llama3_pretraining.py index 6cc001029a3b..2e49402a923a 100644 --- a/scripts/llm/llama3_pretraining.py +++ b/scripts/llm/llama3_pretraining.py @@ -1,3 +1,18 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This script is only an example of using NeMo with NeMo-Run's APIs and is subject to change without notice. # This script is used for pretraining a Llama3 model, specifically for the 8b or 70b model variants, on local and slurm executors. # It uses NeMo 2.0 recipes (https://github.com/NVIDIA/NeMo/blob/main/nemo/collections/llm/recipes/llama3_8b.py#L74) and NeMo-Run (https://github.com/NVIDIA/NeMo-Run) to configure and execute the runs.