Zen Agent is a 4B parameter model specialized for agentic workflows, tool use, and function calling. Built on Qwen3-4B and fine-tuned for autonomous task execution with Model Context Protocol (MCP) support.
mlx/ - Quantized MLX format for Apple Silicon (Qwen3-4B)
Optimized for M1/M2/M3 Macs
4.5 bits per weight quantization
GGUF Format (llama.cpp)
gguf/zen-eco-4b-agent-qwen3.gguf - Q4_K_M (2.3GB)
gguf/zen-eco-4b-agent-Q2_K.gguf - Q2_K (1.6GB)
gguf/zen-eco-4b-agent-f16.gguf - F16 (7.5GB)
Usage
Tool Calling Example
fromtransformersimportAutoModelForCausalLM,AutoTokenizermodel=AutoModelForCausalLM.from_pretrained("zenlm/zen-eco-4b-agent")tokenizer=AutoTokenizer.from_pretrained("zenlm/zen-eco-4b-agent")prompt="""
Available functions:
- get_weather(location: str) -> dict
- search_web(query: str) -> list
User: What's the weather in Paris?
Assistant:"""inputs=tokenizer(prompt,return_tensors="pt")outputs=model.generate(**inputs,max_new_tokens=100)print(tokenizer.decode(outputs[0]))
MLX (Apple Silicon)
frommlx_lmimportload,generatemodel,tokenizer=load("zenlm/zen-eco-4b-agent")response=generate(model,tokenizer,prompt="Call weather API for Tokyo",max_tokens=50)
GGUF (LM Studio / llama.cpp)
# Download
wget https://huggingface.co/zenlm/zen-eco-4b-agent/resolve/main/gguf/zen-eco-4b-agent-qwen3.gguf
# Run with llama.cpp
./llama-cli -m zen-eco-4b-agent-qwen3.gguf -p "Get weather for Paris"
Model Details
Base: Qwen3-4B (NOT Qwen2)
Parameters: 4B
Context Length: 32K tokens
Training: Fine-tuned on xlam-function-calling-60k dataset
@misc{zen-agent-4b-2025,title={Zen Agent 4B: Tool-Calling Language Model},author={Zen AI Team},year={2025},howpublished={\url{https://huggingface.co/zenlm/zen-agent-4b}}}@article{xlam2024,title={xLAM: A Family of Large Action Models to Empower AI Agent Systems},author={Salesforce Research},journal={arXiv preprint},year={2024}}