mirror of
https://github.com/zenlm/zen-eco-coder.git
synced 2026-10-30 14:58:09 +00:00
1.5 KiB
1.5 KiB
Zen Eco 4B Coder
Code generation and analysis model. Part of the Zen Eco family.
Overview
Zen Eco 4B Coder is the code-specialized variant of Zen Eco 4B. Optimized for code generation, completion, debugging, and explanation across multiple programming languages while retaining the compact Eco architecture.
| Property | Value |
|---|---|
| Parameters | 4B |
| Context | 32K |
| License | Apache 2.0 |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("zenlm/zen-eco-coder")
tokenizer = AutoTokenizer.from_pretrained("zenlm/zen-eco-coder")
messages = [{"role": "user", "content": "Write a Python function that implements binary search on a sorted list."}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
output = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(output[0], skip_special_tokens=True))