training-deploy-llava16-on-sagemaker
sft llava-1.6
https://github.com/jackie930/training-deploy-llava16-on-sagemaker
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.2%) to scientific vocabulary
Repository
sft llava-1.6
Basic Info
- Host: GitHub
- Owner: jackie930
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 1.01 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Train and deploy lava-v1.6-mistral-7b-hf on AWS
Overview
本项目提供了在 AWS 上微调和部署 LLaVA-v1.6-Mistral-7B 多模态大语言模型的完整流程。主要特性包括: * 基于自定义数据集进行监督式微调(SFT) * 使用 Amazon SageMaker 进行大规模模型训练 * 支持 VLLM 加速推理的模型部署 * 完整的数据预处理和评估流程
Environments
- Python 3.8+
- PyTorch 2.0+
- 推荐使用 CUDA 11.7+
- 至少 24GB 显存的 GPU (推荐 A10G/H100/A100)
Installation
bash
pip install trl
prepare data
here we need to do three steps: * prepare the data into specific format
```bash 将原始数据转换为指定格式:
python preprocess.py --datapath {INPUTCSV} --outputfolder {OUTPUTDATAFOLDER} ``` 参数说明: * datapath: 输入CSV文件路径 * output_folder: 输出文件夹路径
创建 HuggingFace Dataset
将处理后的数据保存为 HuggingFace dataset 格式:
bash
python prepare.py
Command Line Interface (CLI)
You can use the TRL Command Line Interface (CLI) to quickly get started with Supervised Fine-tuning (SFT) and Direct Preference Optimization (DPO), or vibe check your model with the chat CLI:
SFT:
bash
sh train_customer.sh
test the trained model locally (optional)
bash
python local_test.py
deploy the trained model as sagemaker endpoint which support VLLM (optional)
follow deply/llavav16mistral7bdeploysagemakerg5xl.ipynb
Owner
- Name: Jackie Liu
- Login: jackie930
- Kind: user
- Company: Amazon Web Services
- Repositories: 6
- Profile: https://github.com/jackie930
Applied Scientist
Citation (CITATION.cff)
cff-version: 1.2.0
title: 'TRL: Transformer Reinforcement Learning'
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Leandro
family-names: von Werra
- given-names: Younes
family-names: Belkada
- given-names: Lewis
family-names: Tunstall
- given-names: Edward
family-names: Beeching
- given-names: Tristan
family-names: Thrush
- given-names: Nathan
family-names: Lambert
- given-names: Shengyi
family-names: Huang
- given-names: Kashif
family-names: Rasul
- given-names: Quentin
family-names: Gallouédec
repository-code: 'https://github.com/huggingface/trl'
abstract: "With trl you can train transformer language models with Proximal Policy Optimization (PPO). The library is built on top of the transformers library by \U0001F917 Hugging Face. Therefore, pre-trained language models can be directly loaded via transformers. At this point, most decoder and encoder-decoder architectures are supported."
keywords:
- rlhf
- deep-learning
- pytorch
- transformers
license: Apache-2.0
version: 0.12
GitHub Events
Total
- Watch event: 1
- Push event: 1
Last Year
- Watch event: 1
- Push event: 1
Dependencies
- continuumio/miniconda3 latest build
- nvidia/cuda 12.2.2-devel-ubuntu22.04 build
- continuumio/miniconda3 latest build
- nvidia/cuda 12.2.2-devel-ubuntu22.04 build
- accelerate *
- bitsandbytes *
- datasets *
- peft *
- transformers *
- trl *
- wandb *
- accelerate *
- datasets *
- rich *
- transformers >=4.46.0