SOPAInstructionTuning¶
SOPA Stage 2 instruction fine-tuning step for BLIP2-based model (Q-Former + Phi-3 LLM) with tabular-to-text instruction following
SageMaker step type |
|
Node type |
internal (consumes upstream, produces downstream) |
Container entry point |
|
Interface file |
|
Compute¶
Compute kind |
|
SDK class |
|
Functionality¶
SOPA Stage 2 instruction fine-tuning script for AFN Return MDR model that fine-tunes a BLIP2-based model (Q-Former + Phi-3 LLM) for tabular-to-text instruction following. Loads a pre-trained Phi-3 LLM (frozen), a Stage 0 tabular autoencoder (frozen encoder), and a Stage 1 Q-Former (trainable), then trains a projection layer (llm_proj) and the Q-Former to align tabular embeddings with the LLM input space. Supports three tasks (return_risk, customer_risk, refund_decision) and saves best-only and final model checkpoints (stage2_{task}best.pth, stage2{task}_final.pth). All configuration is provided via argparse arguments; no environment variables are required.
Inputs (dependencies)¶
Input |
Type |
Required |
Compatible producers |
|---|---|---|---|
|
|
no |
TabularPreprocessing, ProcessingStep, DataLoad |
|
|
no |
ProcessingStep, DataLoad |
|
|
no |
ProcessingStep, DataLoad |
|
|
no |
ProcessingStep, DataLoad |
Outputs¶
Output |
Type |
|---|---|
|
|
|
|
Consumers (downstream steps)¶
No cataloged step lists this step as a compatible source (it may be a terminal/sink step, or consumed via a generic source name).
Framework requirements¶
Package |
Version |
|---|---|
|
|
|
|
|
|
|
|