← Back to Pull requests

Add HPU SFT example #10

Open
splotnikv opened this pull request with 129 lines diff across 1 files
View on GitHub
splotnikv splotnikv commented on Sep 23, 2025 15:56 UTC
Author

This PR adds new sample that is based on https://github.com/Red-Hat-AI-Innovation-Team/training_hub/blob/main/examples/scripts/sft_llama_example.py and demonstrates how to run SFT on HPU. This sample allows to configure more parameters through command line, e.g. batch size and also adds some HPU specific parameters, e.g. number of chunks to split dataset into during training. This PR should be used together with https://github.com/instructlab/training/pull/660.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

New Features
Added example scripts demonstrating supervised fine-tuning (SFT) and orthogonal subspace fine-tuning (OSFT) on HPU devices in a single-node, multi-GPU setup, with CLI options, run summaries, checkpointing, and runtime diagnostics.

Bug Fixes
Improved HPU environment compatibility by deferring certain model-configuration imports to avoid initialization conflicts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 129 lines (+96 / -33) across 1 files Reviewer: None requested Review duration: 625358m
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.56) × (1 − Review Confidence (0.42)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.56 · 129 lines diff across 1 files
0.56
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
42%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.291
No Reviewer Assigned no_reviewer_assigned
0.120
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #10"
general weight: 0.35
Reviewers
None requested
Assignees
splotnikv splotnikv
Labels
risk: low confidence: 42.2% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 56.1% (MEDIUM) · Higher = larger blast radius
56.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 42.2% · Lower = rushed or shallow review
42.2%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 32.4% · Safe to merge
32.4%