-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
731350a
commit 818e975
Showing
23 changed files
with
836 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,264 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Set the provider configuration\n", | ||
"Import-Module ./ -Force\n", | ||
"Set-TuneProvider @splat" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Grab a tuning file\n", | ||
"Get-ChildItem -Recurse totbot-tee-tune.jsonl -OutVariable totbot" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Check the validity of the training file\n", | ||
"$totbot | Test-TuneFile -OutVariable testFile" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Upload the file\n", | ||
"$totbot | Send-TuneFile -OutVariable upload" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# check out the uploaded file\n", | ||
"Get-TuneFile -Id $upload.id -OutVariable file" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Start a tuning job\n", | ||
"Start-TuneJob -FileId $upload.id -OutVariable startjob" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Wait for it to complete\n", | ||
"Wait-TuneJob -Id $startjob.id -OutVariable job" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Get that job\n", | ||
"Get-TuneJob | Select-Object -First 1 -OutVariable job" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Retrieve events for a specific fine-tuning job\n", | ||
"$job | Get-TuneJobEvent -OutVariable tunevent" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Retrieve a custom model\n", | ||
"Get-TuneModel -Custom" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Delete a custom model\n", | ||
"Get-TuneModel -Custom | Select-Object -First 1 |\n", | ||
"Remove-TuneModel -Confirm:$false" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Retrieve your preferred default model\n", | ||
"Get-TuneModelDefault -OutVariable defaultModel" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Measure token count for a given text\n", | ||
"Measure-TuneToken -InputObject \"Have some finetuna\" -Model cl100k_base" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Get the current provider configuration\n", | ||
"Get-TuneProvider" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".NET (C#)", | ||
"language": "C#", | ||
"name": ".net-csharp" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelInfo": { | ||
"defaultKernelName": "csharp", | ||
"items": [ | ||
{ | ||
"aliases": [], | ||
"name": "csharp" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.