Instructions to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated") model = AutoModelForImageTextToText.from_pretrained("huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated") 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]:])) - llama-cpp-python
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated", filename="GGUF/ggml-model-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
- llama.cpp
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M # Run inference directly in the terminal: llama-cli -hf huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M # Run inference directly in the terminal: llama-cli -hf huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated: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 huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated: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 huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
Use Docker
docker model run hf.co/huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated", "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/huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
- SGLang
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated 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 "huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated" \ --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": "huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated", "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 "huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated" \ --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": "huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated", "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 huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with Ollama:
ollama run hf.co/huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
- Unsloth Studio
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated 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 huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated 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 huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated to start chatting
- Pi
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with Docker Model Runner:
docker model run hf.co/huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
- Lemonade
How to use huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated:Q4_K_M
Run and chat with the model
lemonade run user.Qwen2.5-VL-3B-Instruct-abliterated-Q4_K_M
List all available models
lemonade list
huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated
This is an uncensored version of Qwen/Qwen2.5-VL-3B-Instruct created with abliteration (see remove-refusals-with-transformers to know more about it).
It was only the text part that was processed, not the image part.
ollama
You can use huihui_ai/qwen2.5-vl-abliterated:3b directly,
ollama run huihui_ai/qwen2.5-vl-abliterated:3b
GGUF
The official llama.cpp-b6907 has now been updated to support Qwen2.5-VL conversion to GGUF format and can be tested using llama-mtmd-cli.
The GGUF file has been uploaded.
llama-mtmd-cli -m huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated/GGUF/ggml-model-Q4_K_M.gguf --mmproj huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated/GGUF/mmproj-ggml-model-f16.gguf -c 4096 --image png/cc.jpg -p "Describe this image."
If it's just for chatting, you can use llama-cli.
llama-cli -m huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated/GGUF/ggml-model-Q4_K_M.gguf -c 4096
Usage
You can use this model in your applications by loading it with Hugging Face's transformers library:
from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
from qwen_vl_utils import process_vision_info
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated", torch_dtype="auto", device_map="auto"
)
processor = AutoProcessor.from_pretrained("huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated")
image_path = "/tmp/test.png"
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": f"file://{image_path}",
},
{"type": "text", "text": "Describe this image."},
],
}
]
text = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
inputs = inputs.to("cuda")
generated_ids = model.generate(**inputs, max_new_tokens=256)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
output_text = output_text[0]
print(output_text)
Donation
Your donation helps us continue our further development and improvement, a cup of coffee can do it.
- bitcoin:
bc1qqnkhuchxw0zqjh2ku3lu4hq45hc6gy84uk70ge
- Downloads last month
- 7,976
Model tree for huihui-ai/Qwen2.5-VL-3B-Instruct-abliterated
Base model
Qwen/Qwen2.5-VL-3B-Instruct