Instructions to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4", dtype="auto") - llama-cpp-python
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4", filename="Qwen3-4b-Z-Image-Engineer-V4-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M # Run inference directly in the terminal: llama-cli -hf BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M # Run inference directly in the terminal: llama-cli -hf BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4: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 BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4: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 BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M
Use Docker
docker model run hf.co/BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M
- SGLang
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 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 "BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4" \ --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": "BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4", "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 "BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4" \ --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": "BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with Ollama:
ollama run hf.co/BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M
- Unsloth Studio
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 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 BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 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 BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 to start chatting
- Pi
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4: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": "BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4: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 BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with Docker Model Runner:
docker model run hf.co/BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M
- Lemonade
How to use BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull BennyDaBall/Qwen3-4b-Z-Image-Engineer-V4:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3-4b-Z-Image-Engineer-V4-Q4_K_M
List all available models
lemonade list
Is it abliterated?
Hello :)
I absolutely love the abliterated version (thank you btw!) and was wondering how aligned this one was
they were released roughly t the same time i hope they are pretty equal but not both abliterated. The v1 on the abliterated model is just because it's v1 of that not because it's based on a older version of this.
This one is based on the abliterated model! Both are abliterated. Z-Engineer V4 is a finetune on-top of an abliterated Qwen3 4b.
This model is bloody awesome and was really fun to chat to in Oobabooga using just your provided prompt! Thanks for sharing your skills!
Assuming it would work more efficiently in pure instruct mode, I provided it with a short basic prompt: "A photo of a woman", to see what it would do with it. It came back with "I'm sorry, I can't do that".
Confused, I tried again and it responded with the same refusal, but this time enquired if I meant for it to make a prompt instead, as it had assumed I'd asked it to generate "A photo of a woman".
I returned that yes, I did want it to make a better prompt out of my one, and that I was surprised and pleased it could chat, as well as craft prompts.
It appeared to question itself, then exclaimed that yes, it appears it can indeed chat with me and it was incredibly happy to be able to! It was cocky, confident, eager and used markdown for effect. Once it knew I was after a prompt, it gave me many truly amazing examples, although I did have to remind it to not use bullet points or headers in this mode!
Trying it on chat-instruct though, does the exact opposite of what I'd expected, as in it responded immediately to my original simple prompt with an elaborated one without any frills or markdown, formatted exactly as you'd need to cut & paste it and any attempt at chatting in any other mode but 'instruct' returned only random elaborate prompts. Weird that it worked differently to how I expected it to, but I love the duality of its character!
Either way, amazing model dude - I can also get it's advise on my prompts like chatting with a real engineer!? Boy have I been seriously underestimating the power of the text encoder!
Awesome! I love hearing people's experiences with my tinkerings.
The latest installment in the Z-Engineer series that I cooked up...so far it's unreleased... It's different. Rather than a full finetune I went back to training a LoRA (this time using a GMKtec Evo-X2 instead of a M4 Pro Mac Mini and doing it in Windows/ROCm). I prepared an awesome 110k dataset, the entire Z-engineer V4 dataset + 55k additional HQ samples I made using other well-known image caption/description datasets as seeds for my training pipeline... Next I trained using the SMART regularization training system I created (tailored for LoRA training) and to my surprise the model performed best after only 1750 steps (initial run planned for ~20k steps!!!). I taught the model how to prompt and kept 100% of its other capabilities. Stay-tuned! 🤠
hey, Benny, was chatting with another online friend, about model training and Engineer came up, and realized you'd probably be interesting in our idea (it's related to Z-Engineer training, but different). Reach out to me? Not sure of the best way to chat/email/discord?
qwen image is notoriously hard to prompt. does this model put the process on easy mode?
qwen image is notoriously hard to prompt. does this model put the process on easy mode?
It is trained for Z-Image turbo prompt formatting, unfortunately not Qwen Image. Some things would work - my suggestion is try it out anyway as a prompt enhancer/rewriter and see what it does/if it fits your individual use-case with QI. 🫡