Instructions to use kiel2/KielLens-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kiel2/KielLens-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="kiel2/KielLens-chat") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("kiel2/KielLens-chat") model = AutoModelForMultimodalLM.from_pretrained("kiel2/KielLens-chat", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use kiel2/KielLens-chat with PEFT:
Task type is invalid.
- llama-cpp-python
How to use kiel2/KielLens-chat with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="kiel2/KielLens-chat", filename="KielLens-chat-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use kiel2/KielLens-chat with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf kiel2/KielLens-chat:Q4_K_M # Run inference directly in the terminal: llama cli -hf kiel2/KielLens-chat:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kiel2/KielLens-chat:Q4_K_M # Run inference directly in the terminal: llama cli -hf kiel2/KielLens-chat:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf kiel2/KielLens-chat:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf kiel2/KielLens-chat:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf kiel2/KielLens-chat:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf kiel2/KielLens-chat:Q4_K_M
Use Docker
docker model run hf.co/kiel2/KielLens-chat:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use kiel2/KielLens-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kiel2/KielLens-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kiel2/KielLens-chat", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/kiel2/KielLens-chat:Q4_K_M
- SGLang
How to use kiel2/KielLens-chat 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 "kiel2/KielLens-chat" \ --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": "kiel2/KielLens-chat", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "kiel2/KielLens-chat" \ --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": "kiel2/KielLens-chat", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use kiel2/KielLens-chat with Ollama:
ollama run hf.co/kiel2/KielLens-chat:Q4_K_M
- Unsloth Studio
How to use kiel2/KielLens-chat with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kiel2/KielLens-chat to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kiel2/KielLens-chat to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kiel2/KielLens-chat to start chatting
- Atomic Chat new
- Docker Model Runner
How to use kiel2/KielLens-chat with Docker Model Runner:
docker model run hf.co/kiel2/KielLens-chat:Q4_K_M
- Lemonade
How to use kiel2/KielLens-chat with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kiel2/KielLens-chat:Q4_K_M
Run and chat with the model
lemonade run user.KielLens-chat-Q4_K_M
List all available models
lemonade list
Developed by: KielTech
Model Type: Vision-Language Model (Multimodal Chat & Analysis)
Base Model: llava-hf/llava-1.5-7b-hf
License: Apache 2.0
Fine-tuning Method: Parameter-Efficient Fine-Tuning (PEFT) / LoRA
Frameworks: Transformers, TRL, PEFT
Model Description KielLens-chat is a high-performance, fine-tuned vision-language model designed for conversational image-grounded reasoning. By building upon the LLaVA architecture, KielLens-chat is optimized for fluid, human-like interaction with visual data, enabling users to upload images and ask complex, context-aware questions.
Intended Uses Multimodal Chat: Natural, image-based conversational assistants.
Visual Question Answering (VQA): Extracting insights and descriptive details from photographs.
Contextual Reasoning: Understanding relationships between objects, people, and environments within an image.
How to Get Started You can load the adapters directly on top of the base model using the transformers library:
Python from peft import PeftModel from transformers import AutoModelForCausalLM
Load the base model
base_model = AutoModelForCausalLM.from_pretrained("llava-hf/llava-1.5-7b-hf")
Load the KielLens-chat adapters
model = PeftModel.from_pretrained(base_model, "kiel2/KielLens-chat") Training Procedure The model was fine-tuned using the TRL (Transformer Reinforcement Learning) library with the following configurations:
Quantization: 4-bit (via NF4) to maintain efficiency without compromising inference speed.
Target Modules: Vision-attention layers (q_proj, v_proj).
Optimization: Paged AdamW 32-bit.
Precision: Mixed precision (bf16/fp16).
Limitations and Ethical Considerations Input Sensitivity: Performance may vary based on image resolution and lighting quality.
Bias: As an extension of the LLaVA architecture, the model may reflect biases present in its pre-training data.
Generalization: While optimized for chat, the model should be used with human oversight for mission-critical visual analysis tasks.
💡 Pro-Tip for your HF Page: Make sure to add the YAML metadata block at the very top of your README.md file (the system uses this to categorize your model):
- Downloads last month
- 527
Model tree for kiel2/KielLens-chat
Base model
llava-hf/llava-1.5-7b-hf