Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions 18_sagemaker_training_recipes/nova/nova-lite-dpo-peft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,7 @@
" if custom_model_arn is not None\n",
" else \"<CUSTOM_MODEL_DEPLOYMENT_ARN>\"\n",
" ),\n",
" \"us.amazon.nova-micro-v1:0\",\n",
" \"us.amazon.nova-lite-v1:0\",\n",
"]\n",
"\n",
"# Change model ID to run LLM as a judge evaluation on the fine-tuned model or base model\n",
Expand Down Expand Up @@ -1985,7 +1985,7 @@
"source": [
"recipe_content = f\"\"\"\n",
"run:\n",
" name: nova-micro-llm-judge-eval-job\n",
" name: nova-lite-llm-judge-eval-job\n",
" model_type: amazon.nova-micro-v1:0:128k\n",
" model_name_or_path: \"nova-micro/prod\"\n",
" replicas: 1 # unmodifiable\n",
Expand Down Expand Up @@ -2127,6 +2127,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d3fbf582",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "2e9af4f5",
Expand Down
17 changes: 15 additions & 2 deletions 18_sagemaker_training_recipes/nova/nova-lite-dpo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,7 @@
" if custom_model_arn is not None\n",
" else \"<CUSTOM_MODEL_DEPLOYMENT_ARN>\"\n",
" ),\n",
" \"us.amazon.nova-micro-v1:0\",\n",
" \"us.amazon.nova-lite-v1:0\",\n",
"]\n",
"\n",
"# Change model ID to run LLM as a judge evaluation on the fine-tuned model or base model\n",
Expand Down Expand Up @@ -1985,7 +1985,7 @@
"source": [
"recipe_content = f\"\"\"\n",
"run:\n",
" name: nova-micro-llm-judge-eval-job\n",
" name: nova-lite-llm-judge-eval-job\n",
" model_type: amazon.nova-micro-v1:0:128k\n",
" model_name_or_path: \"nova-micro/prod\"\n",
" replicas: 1 # unmodifiable\n",
Expand Down Expand Up @@ -2127,6 +2127,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3d1d12be",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "3d41dcf4",
Expand Down
23 changes: 17 additions & 6 deletions 18_sagemaker_training_recipes/nova/nova-lite-sft-peft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0dedce87",
"id": "f04231c2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1866,7 +1866,7 @@
" if custom_model_arn is not None\n",
" else \"<CUSTOM_MODEL_DEPLOYMENT_ARN>\"\n",
" ),\n",
" \"us.amazon.nova-micro-v1:0\",\n",
" \"us.amazon.nova-lite-v1:0\",\n",
"]\n",
"\n",
"# Change model ID to run LLM as a judge evaluation on the fine-tuned model or base model\n",
Expand All @@ -1890,9 +1890,7 @@
" )\n",
"\n",
" question = (\n",
" el[\"system\"] + \"\\n\\n\" + el[\"query\"]\n",
" if el[\"system\"] != \"\"\n",
" else el[\"query\"]\n",
" el[\"system\"] + \"\\n\\n\" + el[\"query\"] if el[\"system\"] != \"\" else el[\"query\"]\n",
" )\n",
"\n",
" llm_val_dataset.append(\n",
Expand Down Expand Up @@ -2026,7 +2024,7 @@
"source": [
"recipe_content = f\"\"\"\n",
"run:\n",
" name: nova-micro-llm-judge-eval-job\n",
" name: nova-lite-llm-judge-eval-job\n",
" model_type: amazon.nova-micro-v1:0:128k\n",
" model_name_or_path: \"nova-micro/prod\"\n",
" replicas: 1 # unmodifiable\n",
Expand Down Expand Up @@ -2168,6 +2166,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1144eb14",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "95d358b3",
Expand Down
17 changes: 15 additions & 2 deletions 18_sagemaker_training_recipes/nova/nova-lite-sft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,7 @@
" if custom_model_arn is not None\n",
" else \"<CUSTOM_MODEL_DEPLOYMENT_ARN>\"\n",
" ),\n",
" \"us.amazon.nova-micro-v1:0\",\n",
" \"us.amazon.nova-lite-v1:0\",\n",
"]\n",
"\n",
"# Change model ID to run LLM as a judge evaluation on the fine-tuned model or base model\n",
Expand Down Expand Up @@ -2026,7 +2026,7 @@
"source": [
"recipe_content = f\"\"\"\n",
"run:\n",
" name: nova-micro-llm-judge-eval-job\n",
" name: nova-lite-llm-judge-eval-job\n",
" model_type: amazon.nova-micro-v1:0:128k\n",
" model_name_or_path: \"nova-micro/prod\"\n",
" replicas: 1 # unmodifiable\n",
Expand Down Expand Up @@ -2168,6 +2168,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1ac460dd",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "01c8e7ad",
Expand Down
13 changes: 13 additions & 0 deletions 18_sagemaker_training_recipes/nova/nova-micro-dpo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e37c4a5d",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "c53f4555",
Expand Down
13 changes: 13 additions & 0 deletions 18_sagemaker_training_recipes/nova/nova-micro-sft-peft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f5b7cc15",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "1951cdc2",
Expand Down
13 changes: 13 additions & 0 deletions 18_sagemaker_training_recipes/nova/nova-micro-sft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2171,6 +2171,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e5b0e722",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "d7f6f0bb",
Expand Down
17 changes: 15 additions & 2 deletions 18_sagemaker_training_recipes/nova/nova-pro-dpo-peft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@
" if custom_model_arn is not None\n",
" else \"<CUSTOM_MODEL_DEPLOYMENT_ARN>\"\n",
" ),\n",
" \"us.amazon.nova-micro-v1:0\",\n",
" \"us.amazon.nova-pro-v1:0\",\n",
"]\n",
"\n",
"# Change model ID to run LLM as a judge evaluation on the fine-tuned model or base model\n",
Expand Down Expand Up @@ -1987,7 +1987,7 @@
"source": [
"recipe_content = f\"\"\"\n",
"run:\n",
" name: nova-micro-llm-judge-eval-job\n",
" name: nova-pro-llm-judge-eval-job\n",
" model_type: amazon.nova-micro-v1:0:128k\n",
" model_name_or_path: \"nova-micro/prod\"\n",
" replicas: 1 # unmodifiable\n",
Expand Down Expand Up @@ -2129,6 +2129,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "836c0e19",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "2bb15296",
Expand Down
17 changes: 15 additions & 2 deletions 18_sagemaker_training_recipes/nova/nova-pro-sft-peft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@
" if custom_model_arn is not None\n",
" else \"<CUSTOM_MODEL_DEPLOYMENT_ARN>\"\n",
" ),\n",
" \"us.amazon.nova-micro-v1:0\",\n",
" \"us.amazon.nova-pro-v1:0\",\n",
"]\n",
"\n",
"# Change model ID to run LLM as a judge evaluation on the fine-tuned model or base model\n",
Expand Down Expand Up @@ -2007,7 +2007,7 @@
"source": [
"recipe_content = f\"\"\"\n",
"run:\n",
" name: nova-micro-llm-judge-eval-job\n",
" name: nova-pro-llm-judge-eval-job\n",
" model_type: amazon.nova-micro-v1:0:128k\n",
" model_name_or_path: \"nova-micro/prod\"\n",
" replicas: 1 # unmodifiable\n",
Expand Down Expand Up @@ -2149,6 +2149,19 @@
"estimator.fit(inputs={\"train\": eval_input}, wait=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "833af432",
"metadata": {},
"outputs": [],
"source": [
"model_s3_uri = estimator.model_data\n",
"print(model_s3_uri)\n",
"\n",
"output_s3_uri = \"/\".join(model_s3_uri.split(\"/\")[:-1]) + \"/output.tar.gz\""
]
},
{
"cell_type": "markdown",
"id": "12501609",
Expand Down