opensite-ai/opensite-skills / aws-ai-ml
aws-ai-ml
VerifiedSelects, deploys, and customizes AI models on Amazon SageMaker. Training or Processing jobs, fine-tuning (SFT/DPO/RLVR/RLAIF), model selection, dataset preparation, evaluation, SageMaker or Bedrock deployment, inference optimization and endpoint diagnostics. Covers the full lifecycle from planning through production. Use when fine-tuning models on SageMaker, choosing which base model to customize, fine-tune, or deploy from SageMaker JumpStart or Hub, SageMakerPublicHub, or the SageMaker public model catalog, transforming or validating training data, evaluating model quality, deploying or optimizing endpoints, configuring IAM/S3 for training, or managing SageMaker Managed MLflow. Use for endpoint health, failures, latency, logs, metrics, errors. Covers Serverless Model Customization, Nova and OSS deployment paths, and PySDK v3. NOT for Ground Truth labeling, Feature Store, or general-purpose AWS infrastructure.
references/dataset-evaluation/references/strategy_data_requirements.md
View on GitHub# Finetuning Strategy Data Requirements
**File format: JSONL only.** Non-JSONL files (parquet, csv, etc.) require transformation regardless of schema match.
**Critical** Nova models have a different set of formats than open weights models. Make sure you refer to the right section based on the user's base model.
## Open Weights Models Data Format by Strategy (Llama, Qwen, GPT-OSS, etc.)
### SFT (Supervised Fine-Tuning)
**Required format:**
```jsonl
{
"prompt": "",
"completion": ""
}
```
**What it needs:**
- Input-output pairs
- Single "correct" response per input
- Consistent quality across examples
### DPO (Direct Preference Optimization)
**Required format:**
```jsonl
{
"prompt": "",
"chosen": "",
"rejected": ""
}
```
**What it needs:**
- Input with two responses: preferred (chosen) and dispreferred (rejected)
- Clear preference signal between responses
- Both responses should be plausible but one is better
- Avoiding unintentional length bias
### RLVR (Reinforcement Learning from Verifiable Rewards)
**Required format:**
```jsonl
{
"data_source": "",
"prompt": [
{
"content": "",
"role": ""
}
],
"ability": "",
"reward_model": {
"ground_truth": "",
"style": ""
}
}
```
**What it needs:**
- user prompt
- Ground truth responses in `reward_model.ground_truth` field (leave empty if user data does not have responses)
**How it works:**
1. Model generates response for input
2. Lambda receives full user prompt + reward model fields
3. Lambda computes reward (uses ground_truth if included in verification logic)
4. Model learns to maximize rewards
### RLAIF (Reinforcement Learning from AI Feedback)
RLAIF uses the same base schema as RLVR. The `ability` and `reward_model.style` fields determine which evaluator is used.
**Base schema:**
```jsonl
{
"data_source": "",
"prompt": [
{
"role": "",
"content": ""
}
],
"ability": "",
"reward_model": {
"style": "",
"ground_truth": ""
}
}
```
#### Built-in Evaluators
| `ability` | `reward_model.style` | Use case |
|---|---|---|
| `pairwise-judging` | `llmj` | Compare two model responses and pick the better one |
| `chain-of-thought` | `llmj-cot` | Evaluate quality of step-by-step reasoning |
| `faithfulness` | `llmj-faithfulness` | Check if response stays grounded in provided context |
| `summarization` | `llmj-summarization` | Evaluate quality of a generated summary |
**`pairwise-judging` — prompt must include both responses to compare; `ground_truth` is the preferred response index + reasoning.**
**`chain-of-thought` / `faithfulness` / `summarization` — prompt contains the task; `ground_truth` is the reference answer or source text.**
#### Custom Evaluator
Set `reward_model.style` to `llmj-custom` and supply a Jinja2 prompt template. The template receives `{{ prompt }}`, `{{ response }}`, and optional `{{ ground_truth }}` as variables. The LLM judge must return a JSON object with a `score` field (0.0–1.0).
```jsonl
{
"data_source": "",
"prompt": [
{
"role": "user",
"content": ""
}
],
"ability": "chain-of-thought",
"reward_model": {
"style": "llmj-custom",
"ground_truth": ""
}
}
```
The custom Jinja prompt is provided separately at training time (not embedded in the dataset). It must instruct the judge to return exactly: `{"score": <0.0-1.0>, ...}`.
---
## Nova Models Data Format by Strategy
### SFT (Supervised Fine-Tuning)
```jsonl
{
"schemaVersion": "bedrock-conversation-2024",
"system": [
{
"text": ""
}
],
"messages": [
{
"role": "user",
"content": [
{
"text": ""
}
]
},
{
"role": "assistant",
"content": [
{
"text": ""
}
]
}
]
}
```
### DPO (Direct Preference Optimization)
The format is the same as SFT for the first N-1 turns. The final assistant turn uses `candidates` with `preferenceLabel` instead of regular `content`.
```jsonl
{
"schemaVersion": "bedrock-conversation-2024",
"system": [
{
"text": ""
}
],
"messages": [
{
"role": "user",
"content": [
{
"text": ""
}
]
},
{
"role": "assistant",
"candidates": [
{
"content": [
{
"text": ""
}
],
"preferenceLabel": "preferred"
},
{
"content": [
{
"text": ""
}
],
"preferenceLabel": "non-preferred"
}
]
}
]
}
```
### RLVR
```jsonl
{
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
],
"reference_answer": {
"answer": "49"
}
}
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |