open-model
Skill795 starsChanged 6 months agoApache-2.0View on GitHub
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. --> This…
- Installs packages
In this repository8 other files it gives its agents.
- liveapi-serviceSkill
- genai-sdkSkill
- quality-flywheelSkill
- vertex-aiSkill
- vertex-deploySkill
- vertex-inferenceSkill
- geminiSkill
- vertex-tuningSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 74
Ensure the foundational environment is ready before proceeding.
- Very specific: line 78
Check if gcloud CLI is installed.
- Very specific: line 80
Verify gcloud auth list. If not authenticated, run gcloud auth login.
- Very specific: line 81
Ensure project and location are known.
- Distinctive: line 98
No other values are supported for this section, ensure that the location is listed above.
- Very specific: line 103
Ensure aiplatform.googleapis.com and storage.googleapis.com are enabled.
- Distinctive: line 110
Verify the following identities have the required roles.
- Very specific: line 120
Create and use a virtual environment named tuning_agent_venv in the home directory.
- Distinctive: line 136
Ask the User First: Ask the user if they already have a dataset they want to use.
- Distinctive: line 138
Auto-Discovery: If the user does not have a dataset, search the authenticated project's GCS buckets to find if any existing file has a …
- Distinctive: line 141
CRITICAL: Ask for Confirmation: Do not proceed with dataset preparation or upload until you present the found or provided dataset to the …
- Very specific: line 147
Conversion: If data is in CSV or JSON, use scripts/prepare_dataset.py to convert.
- Very specific: line 149
Validation Split Confirmation: If the user only provides a training dataset, you must prompt the user to seek permission to split the …
- Very specific: line 154
Validation: If data is already in JSONL, validate it before uploading: bash python3 scripts/prepare_dataset.py \ --input my_data.jsonl \ …
- Distinctive: line 176
If the user does not specify a specific model in their prompt, calculate recommendations based on the Models Catalog.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
Copyright 2026 Google LLC
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.
-->name: vertex-tuning-open-model description: > Vertex AI Open Model Tuning. Use when you need to fine-tune open models using Vertex AI's infrastructure.
Vertex AI Open Model Tuning
Overview
This skill provides procedural knowledge for fine-tuning Open Large Language Models (LLMs) using Vertex AI's tuning service. It covers the entire lifecycle from environment setup and data preparation to job configuration, monitoring, and deployment.
Workflow Decision Tree
Environment Check: Has the environment (Auth, APIs, IAM, Venv) been initialized?
- No → Go to Phase 0: Environment & IAM Setup.
- Yes → Proceed.
Dataset Status: Is the dataset ready in JSONL format and uploaded to GCS?
- No → Go to Phase 1: Dataset Preparation & Upload.
- Yes → Proceed.
Configuration: Have the target open model and hyperparameters been decided?
- No → Go to Phase 2: Model Configuration & Recommendation.
- Yes → Proceed.
Job Status: Has the tuning job been submitted?
- No → Go to Phase 3: Tuning Job Execution.
- Yes → Proceed.
Job Completion: Is the tuning job complete?
- No → Go to Phase 4: Monitoring.
- Yes → Proceed.
Deployment: Has the tuned model been deployed (if required)?
- No → Go to Phase 5: Model Deployment.
- Yes → Task Complete.
Phase 0: Environment & IAM Setup {#phase-0}
Ensure the foundational environment is ready before proceeding.
0.1 Authentication & Project Context
- Check if
gcloudCLI is installed. If it is not installed, prompt the user for permission to install it before proceeding. - Verify
gcloud auth list. If not authenticated, rungcloud auth login. - Ensure
projectandlocationare known. Usegcloud config get projectto retrieve the current project (andgcloud config get compute/regionfor region). - CRITICAL: Ask for Confirmation. You must prompt the user to confirm the retrieved project and region before proceeding, in case they want to switch to a different one.
0.2 Possible Locations
The following locations are available for tuning:
- us-central1
- europe-west4
- us-west1
- us-east5
- asia-southeast1
No other values are supported for this section, ensure that the location is listed above.
0.3 Enable APIs
Ensure aiplatform.googleapis.com and storage.googleapis.com are enabled.
gcloud services enable aiplatform.googleapis.com storage.googleapis.com --project=YOUR_PROJECT0.4 IAM Permissions
Verify the following identities have the required roles.
- Vertex AI Service Agent:
service-PROJECT_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.com - Managed OSS Fine Tuning Service Agent:
service-PROJECT_NUMBER@gcp-sa-vertex-moss-ft.iam.gserviceaccount.com - User Identity: The account running the commands.
0.5 Virtual Environment
Create and use a virtual environment named tuning_agent_venv in the home
directory. Install dependencies from references/requirements.txt.
python3 -m venv ~/tuning_agent_venv
source ~/tuning_agent_venv/bin/activate
pip install -r references/requirements.txtPhase 1: Dataset Preparation & Upload {#phase-1}
Vertex AI requires valid JSONL format in GCS.
1.0 Dataset Discovery & Confirmation
- Ask the User First: Ask the user if they already have a dataset they want to use.
- Auto-Discovery: If the user does not have a dataset, search the authenticated project's GCS buckets to find if any existing file has a reasonable dataset that can do the job the user prompted initially.
- CRITICAL: Ask for Confirmation. Do not proceed with dataset preparation or upload until you present the found or provided dataset to the user and they confirm the dataset to use.
1.1 Formatting & Validation
- Conversion: If data is in CSV or JSON, use
scripts/prepare_dataset.pyto convert. - Validation Split Confirmation: If the user only provides a training
dataset, you must prompt the user to seek permission to split the
training dataset 80/20 to form a validation dataset (using
--validation_split 0.2). If they agree, proceed with the split. If they decline, just use the training dataset without a validation dataset. - Validation: If data is already in JSONL, validate it before uploading:
bash python3 scripts/prepare_dataset.py \ --input my_data.jsonl \ --format messages \ --validate_only - Refer to Data Preparation Guide for required schemas.
1.2 Upload
Upload formatted .jsonl files to GCS using a unique directory (e.g., with a
datetime timestamp) to avoid overwriting outputs from different runs.
gcloud storage cp dataset.jsonl gs://YOUR_BUCKET/tuning_agent_job_<datetime>/dataset.jsonlPhase 2: Model Configuration & Recommendation {#phase-2}
Help the user choose the best open model and parameters. Always seek user confirmation before submitting the job.
- If the user does not specify a specific model in their prompt, calculate recommendations based on the Models Catalog.
- Prompt for Confirmation: Present the recommended model to the user and ask for their confirmation before configuring hyperparameters.
2.1 Configuration
- Recommend
tuning_mode,epochs,learning_rate, andadapter_sizebased on the Tuning Guide and model-specific baselines in the Models Catalog.
2.2 Calculating Cost
- We can calculate a rough estimate of cost of tuning based on the dataset and
the selected model in the Models Catalog:
python3 \ open-model/scripts/calculate_cost.py \ --input my_data.jsonl \ --model MODEL_NAME \ --tuning_mode TUNING_MODE \ --epochs EPOCHS - Prompt for Confirmation: Present the recommended hyperparameter configuration and estimated cost to the user and ask for their approval before proceeding to job submission. Make sure to note that the estimated cost is just an estimate and can vary from actual billing costs.
Phase 3: Tuning Job Execution {#phase-3-tuning-job-execution}
Submit the open model tuning job using scripts/tune_open_model.py. Identify
the model id using available models documentation at
documentation.
python3 scripts/tune_open_model.py \
--project YOUR_PROJECT \
--location YOUR_LOCATION \
--bucket YOUR_STAGING_BUCKET \
--base_model BASE_MODEL_ID \
--train_dataset gs://YOUR_BUCKET/tuning_agent_job_<datetime>/dataset.jsonl \
--output_uri gs://YOUR_BUCKET/tuning_agent_job_<datetime>/output \
--epochs EPOCHS \
--learning_rate LR \
--tuning_mode MODEPhase 4: Monitoring {#phase-4-monitoring}
Monitor the job via the Cloud Console link provided in the script output or by polling the job status.
Phase 5: Model Deployment {#phase-5-model-deployment}
Once the open model tuning job is SUCCEEDED, deploy the model using
scripts/deploy_open_model.py.
python3 scripts/deploy_open_model.py \
--project YOUR_PROJECT \
--location YOUR_LOCATION \
--artifacts_uri gs://YOUR_BUCKET/tuning_agent_job_<datetime>/output/postprocess/node-0/checkpoints/final \
--machine_type MACHINE_TYPE \
--accelerator_type ACCELERATOR_TYPE \
--accelerator_count COUNTRefer to Models Catalog for hardware recommendations for specific open models.
Resources
- Data Preparation Guide
- Models Catalog
- Tuning Guide
scripts/prepare_dataset.py: Data conversion & validation.scripts/tune_open_model.py: Open model tuning job submission.scripts/deploy_open_model.py: Open model deployment.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

