Instructions to use 99eren99/Turkish-BakLLaVa1.5-Mistral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 99eren99/Turkish-BakLLaVa1.5-Mistral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="99eren99/Turkish-BakLLaVa1.5-Mistral") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("99eren99/Turkish-BakLLaVa1.5-Mistral", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use 99eren99/Turkish-BakLLaVa1.5-Mistral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "99eren99/Turkish-BakLLaVa1.5-Mistral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "99eren99/Turkish-BakLLaVa1.5-Mistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/99eren99/Turkish-BakLLaVa1.5-Mistral
- SGLang
How to use 99eren99/Turkish-BakLLaVa1.5-Mistral 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 "99eren99/Turkish-BakLLaVa1.5-Mistral" \ --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": "99eren99/Turkish-BakLLaVa1.5-Mistral", "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 "99eren99/Turkish-BakLLaVa1.5-Mistral" \ --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": "99eren99/Turkish-BakLLaVa1.5-Mistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 99eren99/Turkish-BakLLaVa1.5-Mistral with Docker Model Runner:
docker model run hf.co/99eren99/Turkish-BakLLaVa1.5-Mistral
LLaVa 1.5 eğitim çerçevesi ve Trendyol Mistral v1.0 Chat modeli kullanılarak eğitilmiş bir büyük görüntü dil modelidir. VQA, image captioning, OCR, visual grounding ve visual reasoning görevleri için eğitilmiştir.
Not:OCR ve object detection görevlerinde başarı yüksek değil.
Kurulum:
git clone https://github.com/SkunkworksAI/BakLLaVA.git
cd BakLLaVA
conda create -n llava python=3.10 -y
conda activate llava
pip install --upgrade pip # enable PEP 660 support
pip install -e .
pip install numpy==1.26.4
pip install transformers==4.34.1
conda install chardet
Kullanım:
python -m llava.serve.cli \
--model-path 99eren99/Turkish-BakLLaVa1.5-Mistral \
--image-file "resim için relative path veya url" \
--conv-mode llava_llama_2
Gradio ile Kullanım:
Aşağıdaki komutları ayrı ayrı çalıştırdıktan sonra "http://0.0.0.0:7860" üzerinden Gradio arayüzüne erişebilirsiniz.
python -m llava.serve.controller --host 0.0.0.0 --port 10000
python -m llava.serve.gradio_web_server --port 7860 --controller http://localhost:10000 --model-list-mode reload
python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path 99eren99/Turkish-BakLLaVa1.5-Mistral
Prompt Şablonları
1)Lütfen bu bölge için kısa bir açıklama yapınız: [x1, y1, x2, y2].
-Lütfen bu bölge için kısa bir açıklama yapınız: [0. 62, 0. 65, 0. 66, 0. 8].
-BBox koordinatları 0-1 aralığında x1,y1,x2,y2 koordinatlarını temsil ediyor. Resmin sol üst köşesi (0,0).
2)Lütfen bu cümlenin tanımladığı bölgenin sınırlayıcı kutu koordinatını sağlayın: {cümle}.
-Lütfen bu cümlenin tanımladığı bölgenin sınırlayıcı kutu koordinatını sağlayın: plajda duran kişi.
3)Verilen resmin öğeleri hakkında ayrıntılı bilgi verebilir misiniz?
4)Verilen görsel için tek cümlelik bir başlık girin.
5)Resmin görsel içeriğini çok ayrıntılı olarak açıklayın.
6){soru}?\nA. {seçenek}\nB. {seçenek}\nC. {seçenek}\nD. {seçenek}\nVerilen seçeneklerden doğru olanıyla cevap verin.
-Lambanın üzerinde ne tür bir abajur var?\nA. temiz cam\nB. saçak\nC. kumaş\nD. tiffany tarzı\nVerilen seçeneklerden doğru olanıyla cevap verin.
- Downloads last month
- 10