Instructions to use jun47/llava-7b-skin with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jun47/llava-7b-skin with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("llava-hf/llava-1.5-7b-hf") model = PeftModel.from_pretrained(base_model, "jun47/llava-7b-skin") - Transformers
How to use jun47/llava-7b-skin with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jun47/llava-7b-skin") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jun47/llava-7b-skin", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jun47/llava-7b-skin with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jun47/llava-7b-skin" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jun47/llava-7b-skin", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jun47/llava-7b-skin
- SGLang
How to use jun47/llava-7b-skin with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jun47/llava-7b-skin" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jun47/llava-7b-skin", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jun47/llava-7b-skin" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jun47/llava-7b-skin", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jun47/llava-7b-skin with Docker Model Runner:
docker model run hf.co/jun47/llava-7b-skin
LLaVA-1.5-7B Skin Disease Fine-tuned Model (LoRA)
Model Description
์ด ๋ชจ๋ธ์ llava-hf/llava-1.5-7b-hf ๋ฒ ์ด์ค ๋ชจ๋ธ์ ๊ธฐ๋ฐ์ผ๋ก ํ์ธํ๋๋ LoRA ์ด๋ํฐ์
๋๋ค. ์๋ฉด ํผ๋ถ ์งํ์ ์ง๋จํ๊ณ , ๊ด๋ จ ์ผ์ด ๊ฐ์ด๋๋ฅผ ์ ๊ณตํ๋ ๋ฐ ํนํ๋์ด ์์ต๋๋ค. ๊ธฐ์กด ๋ฒ์ฉ ๋ชจ๋ธ์ด ๋์์ธ(ํ๊ตญ์ธ) ํผ๋ถ ์์ ๋ฐ์ดํฐ ํ์ต์ด ๋ถ์กฑํด ๋ฐ์ํ๋ ์ค์ง์จ๊ณผ ํ ๋ฃจ์๋ค์ด์
(์์ ์ฒ๋ฐฉ)์ ํด๊ฒฐํ๊ณ ์ ๊ฐ๋ฐ๋์์ต๋๋ค.
- Base Model:
llava-hf/llava-1.5-7b-hf - Finetuning Method: 8-bit QLoRA & RAFT (Retrieval-Augmented Fine-Tuning)
- Primary Use Case: ์๋ฉด ํผ๋ถ ์งํ ์ถ๋ก ๋ฐ ๋ค์ค ํด(Multi-turn) ์ง์์๋ต (์๊ฐ ์ง๋จ ์ฑ๋ด)
Training Details
- Training Data: AI Hub์ '์๋ฉด๋ถ ํผ๋ถ์งํ ์ด๋ฏธ์ง ํฉ์ฑ ๋ฐ์ดํฐ' 9,600์ฅ์ ๊ธฐ๋ฐ์ผ๋ก, ์ด๋ฏธ์ง ๋น 4๊ฐ์ ๋จ์ผ ํด ์ง์์๋ต์ ํ๋์ ๋ํ ์ธ์ ์ผ๋ก ๋ฌถ๋ ๋ฉํฐํด ์ธ์ ์ฒด์ด๋(Multi-turn Session Chaining) ๊ธฐ๋ฒ์ ์ ์ฉํ์ฌ 38,400 Turn ๋ํ์ (QA์)์ผ๋ก ๊ฐ๊ณตํ์ต๋๋ค.
- Results: ํผ๋ถ ์งํ ์ง๋จ Accuracy ์ฝ 60% ํฅ์ (0.093 โ 0.148), Macro F1-Score ์ฝ 65% ํฅ์ (0.126 โ 0.208). ๋ฐ๋ณต ์์ฑ ๋ฃจํ(Repetition Loop) ๋ฒ๊ทธ๋ฅผ ๋ฐ์ดํฐ ์ ์ฒ๋ฆฌ ๋ ๋ฒจ์์ ์์ฒ ํด๊ฒฐํ์ต๋๋ค.
How to Get Started with the Model
์ด ๋ชจ๋ธ์ ์ ์ฒด ๋ชจ๋ธ์ด ์๋ LoRA ์ด๋ํฐ(๊ฐ์ค์น) ์
๋๋ค. ์ฌ์ฉํ์๋ ค๋ฉด peft ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ํตํด ๋ฒ ์ด์ค ๋ชจ๋ธ์ ์ด๋ํฐ๋ฅผ ๋ก๋ํด์ผ ํฉ๋๋ค.
from transformers import AutoProcessor, LlavaForConditionalGeneration
from peft import PeftModel
import torch
# 1. Load Base Model & Processor
base_model_id = "llava-hf/llava-1.5-7b-hf"
processor = AutoProcessor.from_pretrained(base_model_id)
base_model = LlavaForConditionalGeneration.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto"
)
# 2. Load LoRA Adapter
adapter_id = "jun47/llava-7b-skin"
model = PeftModel.from_pretrained(base_model, adapter_id)
- Downloads last month
- 60
Model tree for jun47/llava-7b-skin
Base model
llava-hf/llava-1.5-7b-hf