Zen Eco Instruct is a 4B parameter instruction-tuned language model optimized for conversational AI and task completion. Based on Qwen3-4B-Instruct, it provides excellent balance between capability and efficiency.
fromtransformersimportAutoModelForCausalLM,AutoTokenizermodel=AutoModelForCausalLM.from_pretrained("zenlm/zen-eco-4b-instruct",torch_dtype="auto",device_map="auto")tokenizer=AutoTokenizer.from_pretrained("zenlm/zen-eco-4b-instruct")# Chatmessages=[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"Explain quantum computing"}]text=tokenizer.apply_chat_template(messages,tokenize=False,add_generation_prompt=True)inputs=tokenizer(text,return_tensors="pt").to(model.device)outputs=model.generate(**inputs,max_new_tokens=500)print(tokenizer.decode(outputs[0]))
fromopenaiimportOpenAIclient=OpenAI(base_url="http://localhost:3690/v1",api_key="not-needed")response=client.chat.completions.create(model="zen-eco-4b-instruct",messages=[{"role":"user","content":"What is machine learning?"}])print(response.choices[0].message.content)
Training with Zen Gym
Fine-tune for your domain:
cd /path/to/zen-gym
llamafactory-cli train \
--config configs/zen_eco_instruct_lora.yaml \
--dataset your_dataset
Benchmarks
Task
Score
Notes
MMLU
58.7%
5-shot
GSM8K
68.2%
8-shot CoT
HumanEval
52.4%
pass@1
MATH
42.8%
4-shot
BBH
61.3%
3-shot
Chat Template
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Hello!<|im_end|>
<|im_start|>assistant
Limitations
May produce incorrect information
Limited knowledge cutoff
Quantization reduces quality
Not suitable for safety-critical applications
Requires prompt engineering for best results
Citation
@misc{zeneco2025instruct,title={Zen Eco 4B Instruct: Efficient Instruction-Tuned Language Model},author={Zen AI Team},year={2025},howpublished={\url{https://huggingface.co/zenlm/zen-eco-4b-instruct}}}