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
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 50, | |
| "global_step": 300, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.16666666666666666, | |
| "grad_norm": 0.20069865882396698, | |
| "learning_rate": 8.964285714285715e-05, | |
| "loss": 1.145, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.3333333333333333, | |
| "grad_norm": 0.14001493155956268, | |
| "learning_rate": 7.17857142857143e-05, | |
| "loss": 0.0148, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.5, | |
| "grad_norm": 0.2509317398071289, | |
| "learning_rate": 5.392857142857143e-05, | |
| "loss": 0.01, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.6666666666666666, | |
| "grad_norm": 0.13196372985839844, | |
| "learning_rate": 3.607142857142857e-05, | |
| "loss": 0.0085, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.8333333333333334, | |
| "grad_norm": 0.12908567488193512, | |
| "learning_rate": 1.8214285714285715e-05, | |
| "loss": 0.008, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 0.13130921125411987, | |
| "learning_rate": 3.5714285714285716e-07, | |
| "loss": 0.0067, | |
| "step": 300 | |
| } | |
| ], | |
| "logging_steps": 50, | |
| "max_steps": 300, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 50, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.792986828452987e+17, | |
| "train_batch_size": 16, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |