- Add upload_to_s3 function to handler
- Save trained BERT models to S3 when credentials provided
- Save LoRA adapters to S3 when credentials provided
- Input params: s3_bucket, s3_prefix, aws_access_key_id, aws_secret_access_key, aws_region
- Use runpod/pytorch:1.0.3-cu1290-torch260-ubuntu2204 base image
- Torch 2.6.0 required by transformers for secure model loading
- CUDA 12.9 compatible
- Default model now meta-llama/Llama-3.1-8B-Instruct
- Added multi-model chat format support:
- Llama 3 format
- Mistral/Mixtral format
- Qwen format
- Gemma format
- Trained model can be imported to AWS Bedrock
- Downloaded 191K DDI pairs from TDC DrugBank
- Fetched 1,634 drug names from PubChem API (96% hit rate)
- Created complete training dataset with:
- Real drug names (not just IDs)
- 86 interaction type descriptions
- Severity labels (minor/moderate/major/contraindicated)
- Bundled 34MB data file in Docker image
- Handler loads real data instead of curated samples
- Added PEFT, bitsandbytes, TRL for LoRA training
- 4-bit QLoRA quantization for 48GB GPU fit
- Instruction-tuning format for Gemma chat template
- Auto-detect model type (BERT vs LLM)
- Updated GPU tier to ADA_24/AMPERE_48
- Switch to self-hosted runner on compute-01 for faster builds
- Replace PyTDC with curated DDI dataset (no heavy deps)
- 60+ real drug interaction patterns based on clinical guidelines
- Generates up to 10K training samples with text variations
- Maintains 5-level severity classification
- Added PyTDC dependency for DrugBank access
- Implemented DDI type -> severity label mapping (0-4)
- Added train/eval split with stratification
- Added accuracy and F1 metrics for evaluation
- Default: 50K samples from DrugBank DDI
- Supports both real data and custom inline data