Text Generation
Safetensors
GGUF
English
qwen3
function-calling
tool-calling
codex
local-llm
4gb-vram
llama-cpp
code-assistant
api-tools
openai-alternative
qwen
instruct
conversational
custom_code
8-bit precision
Instructions to use Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex", filename="Qwen3-4B-Function-Calling-Pro.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 Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex 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 Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex # Run inference directly in the terminal: llama cli -hf Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex # Run inference directly in the terminal: llama cli -hf Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
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 Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex # Run inference directly in the terminal: ./llama-cli -hf Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
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 Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex # Run inference directly in the terminal: ./build/bin/llama-cli -hf Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
Use Docker
docker model run hf.co/Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
- LM Studio
- Jan
- vLLM
How to use Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
- Ollama
How to use Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex with Ollama:
ollama run hf.co/Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
- Unsloth Studio
How to use Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex 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 Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex 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 Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex with Docker Model Runner:
docker model run hf.co/Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
- Lemonade
How to use Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Manojb/Qwen3-4b-toolcall-gguf-llamacpp-codex
Run and chat with the model
lemonade run user.Qwen3-4b-toolcall-gguf-llamacpp-codex-{{QUANT_TAG}}List all available models
lemonade list
| # Qwen3-4B Tool Calling with llama-cpp-python | |
| # This script sets up and runs the model for local inference | |
| # | |
| # Usage: | |
| # ./run_model.sh (requires chmod +x) | |
| # source ./run_model.sh (no chmod needed) | |
| echo "π Qwen3-4B Tool Calling Setup" | |
| echo "================================" | |
| # Check if model file exists | |
| if [ ! -f "Qwen3-4B-Function-Calling-Pro.gguf" ]; then | |
| echo "β Model file not found: Qwen3-4B-Function-Calling-Pro.gguf" | |
| echo "π₯ Please download the model file first." | |
| echo " You can download it from: https://huggingface.co/Manojb/qwen3-4b-toolcall-gguf-llamacpp-codex" | |
| exit 1 | |
| fi | |
| # Check if Python is available | |
| if ! command -v python3 &> /dev/null; then | |
| echo "β Python3 not found. Please install Python 3.8+ first." | |
| exit 1 | |
| fi | |
| # Check if llama-cpp-python is installed | |
| if ! python3 -c "import llama_cpp" 2>/dev/null; then | |
| echo "π¦ Installing llama-cpp-python..." | |
| pip3 install llama-cpp-python | |
| if [ $? -ne 0 ]; then | |
| echo "β Failed to install llama-cpp-python" | |
| exit 1 | |
| fi | |
| echo "β llama-cpp-python installed successfully" | |
| fi | |
| # Function to run the model | |
| run_model() { | |
| echo "π Starting Qwen3-4B Tool Calling model..." | |
| echo " Model: Qwen3-4B-Function-Calling-Pro.gguf" | |
| echo " Context: 2048 tokens" | |
| echo " Threads: 8" | |
| echo "" | |
| echo "π‘ Usage examples:" | |
| echo " - 'What's the weather in London?'" | |
| echo " - 'Find me a hotel in Paris'" | |
| echo " - 'Calculate 25 + 17'" | |
| echo " - 'Book a flight from New York to Tokyo'" | |
| echo "" | |
| echo "Press Ctrl+C to exit" | |
| echo "================================" | |
| python3 quick_start.py | |
| } | |
| # Function to run the server | |
| run_server() { | |
| echo "π Starting Codex-compatible server..." | |
| echo " Server: http://localhost:8000" | |
| echo " Model: Qwen3-4B-Function-Calling-Pro" | |
| echo "" | |
| echo "π‘ Configure Codex with:" | |
| echo " - Server URL: http://localhost:8000" | |
| echo " - Model: Qwen3-4B-Function-Calling-Pro" | |
| echo " - API Key: (not required)" | |
| echo "" | |
| echo "Press Ctrl+C to stop server" | |
| echo "================================" | |
| python3 -m llama_cpp.server \ | |
| --model Qwen3-4B-Function-Calling-Pro.gguf \ | |
| --host 0.0.0.0 \ | |
| --port 8000 \ | |
| --n_ctx 2048 \ | |
| --n_threads 8 \ | |
| --temperature 0.7 | |
| } | |
| # Function to show help | |
| show_help() { | |
| echo "Usage: $0 [OPTION]" | |
| echo "" | |
| echo "Options:" | |
| echo " run, r Run the model interactively (default)" | |
| echo " server, s Start Codex-compatible server" | |
| echo " help, h Show this help message" | |
| echo "" | |
| echo "Examples:" | |
| echo " $0 # Run interactively" | |
| echo " $0 run # Run interactively" | |
| echo " $0 server # Start server for Codex" | |
| echo " $0 help # Show this help" | |
| } | |
| # Main script logic | |
| case "${1:-run}" in | |
| "run"|"r"|"") | |
| run_model | |
| ;; | |
| "server"|"s") | |
| run_server | |
| ;; | |
| "help"|"h"|"-h"|"--help") | |
| show_help | |
| ;; | |
| *) | |
| echo "β Unknown option: $1" | |
| echo "" | |
| show_help | |
| exit 1 | |
| ;; | |
| esac |