Skip to content

Commit

Permalink
Add all cli examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchez-alex committed Nov 13, 2024
1 parent d4b6adb commit 6802d81
Show file tree
Hide file tree
Showing 16 changed files with 2,206 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

### Run the Distillation CLI command pointing to the .YAML file in this folder plus the Azure ML IDs needed:

az ml job create --file ./distillation_conversation.yaml --workspace-name [YOUR_AZURE_WORKSPACE] --resource-group [YOUR_AZURE_RESOURCE_GROUP] --subscription [YOUR_AZURE_SUBSCRIPTION]
az ml job create --file distillation_conversation.yaml --workspace-name [YOUR_AZURE_WORKSPACE] --resource-group [YOUR_AZURE_RESOURCE_GROUP] --subscription [YOUR_AZURE_SUBSCRIPTION]
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ data_generation_type: label_generation
data_generation_task_type: conversation

# Input data
training_data: azureml:train_conversation:1
validation_data: azureml:validation_conversation:1
training_data:
type: uri_file
path: ./train_conversation.jsonl
validation_data:
type: uri_file
path: ./validation_conversation.jsonl

# Teacher model serverless endpoint information
# REPLACE WITH YOUR ENDPOINT INFORMATION
teacher_model_endpoint_connection:
type: serverless
name: Meta-Llama-3-1-405B-Instruct-vum
endpoint: https://Meta-Llama-3-1-405B-Instruct-vum.westus3.models.ai.azure.com/chat/completions
name: Meta-Llama-3-1-405B-Instruct-vkn
endpoint: https://Meta-Llama-3-1-405B-Instruct-vkn.westus3.models.ai.azure.com/chat/completions
api_key: EXAMPLE_API_KEY

# Model ID
Expand All @@ -36,13 +41,9 @@ teacher_model_settings:
max_tokens: 100
top_p: 0.95
endpoint_request_settings:
request_batch_size: 5
request_batch_size: 10
min_endpoint_success_ratio: 0.7

# System prompt settings (OPTIONAL)
prompt_settings:
enable_chain_of_thought: true

# For finetuning (OPTIONAL)
hyperparameters:
learning_rate_multiplier: "0.2"
Expand All @@ -51,5 +52,4 @@ hyperparameters:

# Resource for Data Generation Step (OPTIONAL)
resources:
instance_types:
- Standard_D2_v2
instance_type: Standard_D2_v2

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cli/foundation-models/system/distillation/math/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

### Run the Distillation CLI command pointing to the .YAML file in this folder plus the Azure ML IDs needed:

az ml job create --file ./distillation_math.yaml --workspace-name [YOUR_AZURE_WORKSPACE] --resource-group [YOUR_AZURE_RESOURCE_GROUP] --subscription [YOUR_AZURE_SUBSCRIPTION]
az ml job create --file distillation_math.yaml --workspace-name [YOUR_AZURE_WORKSPACE] --resource-group [YOUR_AZURE_RESOURCE_GROUP] --subscription [YOUR_AZURE_SUBSCRIPTION]
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ data_generation_type: label_generation
data_generation_task_type: math

# Input data
training_data: azureml:train_math:1
validation_data: azureml:validation_math:1
training_data:
type: uri_file
path: ./train_math.jsonl
validation_data:
type: uri_file
path: ./validation_math.jsonl

# Teacher model serverless endpoint information
# REPLACE WITH YOUR ENDPOINT INFORMATION
teacher_model_endpoint_connection:
type: serverless
name: Meta-Llama-3-1-405B-Instruct-vum
endpoint: https://Meta-Llama-3-1-405B-Instruct-vum.westus3.models.ai.azure.com/chat/completions
name: Meta-Llama-3-1-405B-Instruct-vkn
endpoint: https://Meta-Llama-3-1-405B-Instruct-vkn.westus3.models.ai.azure.com/chat/completions
api_key: EXAMPLE_API_KEY

# Model ID
Expand All @@ -33,10 +38,10 @@ outputs:
teacher_model_settings:
inference_parameters:
temperature: 0.1
max_tokens: 100
max_tokens: 1024
top_p: 0.95
endpoint_request_settings:
request_batch_size: 5
request_batch_size: 10
min_endpoint_success_ratio: 0.7

# System prompt settings (OPTIONAL)
Expand All @@ -51,5 +56,4 @@ hyperparameters:

# Resource for Data Generation Step (OPTIONAL)
resources:
instance_types:
- Standard_D2_v2
instance_type: Standard_D2_v2
378 changes: 378 additions & 0 deletions cli/foundation-models/system/distillation/math/train_math.jsonl

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cli/foundation-models/system/distillation/nli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

### Run the Distillation CLI command pointing to the .YAML file in this folder plus the Azure ML IDs needed:

az ml job create --file ./distillation_nli.yaml --workspace-name [YOUR_AZURE_WORKSPACE] --resource-group [YOUR_AZURE_RESOURCE_GROUP] --subscription [YOUR_AZURE_SUBSCRIPTION]
az ml job create --file distillation_nli.yaml --workspace-name [YOUR_AZURE_WORKSPACE] --resource-group [YOUR_AZURE_RESOURCE_GROUP] --subscription [YOUR_AZURE_SUBSCRIPTION]
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ data_generation_type: label_generation
data_generation_task_type: nli

# Input data
training_data: azureml:train_nli:1
validation_data: azureml:validation_nli:1
training_data:
type: uri_file
path: ./train_nli.jsonl
validation_data:
type: uri_file
path: ./validation_nli.jsonl

# Teacher model serverless endpoint information
# REPLACE WITH YOUR ENDPOINT INFORMATION
teacher_model_endpoint_connection:
type: serverless
name: Meta-Llama-3-1-405B-Instruct-vum
endpoint: https://Meta-Llama-3-1-405B-Instruct-vum.westus3.models.ai.azure.com/chat/completions
name: Meta-Llama-3-1-405B-Instruct-vkn
endpoint: https://Meta-Llama-3-1-405B-Instruct-vkn.westus3.models.ai.azure.com/chat/completions
api_key: EXAMPLE_API_KEY

# Model ID
Expand All @@ -33,10 +38,10 @@ outputs:
teacher_model_settings:
inference_parameters:
temperature: 0.1
max_tokens: 100
max_tokens: 1024
top_p: 0.95
endpoint_request_settings:
request_batch_size: 5
request_batch_size: 10
min_endpoint_success_ratio: 0.7

# System prompt settings (OPTIONAL)
Expand All @@ -51,5 +56,4 @@ hyperparameters:

# Resource for Data Generation Step (OPTIONAL)
resources:
instance_types:
- Standard_D2_v2
instance_type: Standard_D2_v2
Loading

0 comments on commit 6802d81

Please sign in to comment.