Text Generation
Transformers
Safetensors
qwen3
mergekit
Merge
conversational
text-generation-inference
Instructions to use yasserrmd/AgenticCoder-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yasserrmd/AgenticCoder-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yasserrmd/AgenticCoder-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yasserrmd/AgenticCoder-4B") model = AutoModelForCausalLM.from_pretrained("yasserrmd/AgenticCoder-4B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yasserrmd/AgenticCoder-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yasserrmd/AgenticCoder-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yasserrmd/AgenticCoder-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yasserrmd/AgenticCoder-4B
- SGLang
How to use yasserrmd/AgenticCoder-4B 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 "yasserrmd/AgenticCoder-4B" \ --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": "yasserrmd/AgenticCoder-4B", "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 "yasserrmd/AgenticCoder-4B" \ --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": "yasserrmd/AgenticCoder-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yasserrmd/AgenticCoder-4B with Docker Model Runner:
docker model run hf.co/yasserrmd/AgenticCoder-4B
| base_model: | |
| - ertghiu256/qwen3-4b-code-reasoning | |
| - Menlo/Jan-nano | |
| library_name: transformers | |
| tags: | |
| - mergekit | |
| - merge | |
| # 🧠 AgenticCoder‑4B | |
| <img src="banner.png" width="800" /> | |
| **AgenticCoder‑4B** is a compact 4B parameter language model designed for autonomous agent workflows and intelligent code reasoning. It merges the planning and tool-use strengths of `Jan-nano` with the coding and logic capabilities of `Qwen3‑4B‑Code‑Reasoning`, creating a balanced model ideal for real-world assistant scenarios, research agents, and smart development tools. | |
| --- | |
| ## ✨ Key Features | |
| - 🔁 **Agentic Planning & MCP Alignment** | |
| Trained on datasets and architectures optimized for multi-step reasoning, task decomposition, and memory–contextual workflows. | |
| - 💻 **Code Understanding & Reasoning** | |
| Strong capabilities in Python code generation, script explanation, optimization, and multi-turn task development. | |
| - 🧰 **Tool Use Simulation** | |
| Handles realistic tool interaction prompts such as CSV analysis, OCR, and file parsing in code. | |
| - 📦 **Compact & Efficient (4B)** | |
| Lightweight enough for cost-efficient deployment, edge device integration, and fine-tuning. | |
| --- | |
| ## 🛠️ Merge Details | |
| - **Merge Method:** SLERP (`t = 0.4`) | |
| - **Base Model:** [`Menlo/Jan-nano`](https://huggingface.co/Menlo/Jan-nano) | |
| - **Merged With:** [`ertghiu256/qwen3-4b-code-reasoning`](https://huggingface.co/ertghiu256/qwen3-4b-code-reasoning) | |
| - **Precision:** `float16` | |
| - **Tokenizer Source:** `Menlo/Jan-nano` | |
| --- | |
| ## 📎 Example Use Cases | |
| ```text | |
| ✅ "Design a 3-week beginner Python curriculum including AI tools." | |
| ✅ "Write a Python function to recursively scan JSON for a key, without using recursion." | |
| ✅ "Read a folder of images and extract text using OCR, save to files." | |
| ✅ "Summarize trends in a sales CSV and visualize monthly performance." | |
| ```` | |
| --- | |
| ## 📁 License & Use | |
| This model is provided for research and development use under the terms of the base models’ respective licenses. Please ensure compliance before commercial usage. | |
| --- | |
| ## 🧬 Citation | |
| If you use this model, consider citing it as: | |
| ``` | |
| @misc{agenticcoder4b2025, | |
| title={AgenticCoder-4B: A Compact Agent + Code Reasoning Model}, | |
| author={Yasser, M.}, | |
| year={2025}, | |
| url={https://huggingface.co/your-username/AgenticCoder-4B} | |
| } | |
| ``` | |
| --- | |
| ## 🤝 Acknowledgements | |
| * [Menlo/Jan-nano](https://huggingface.co/Menlo/Jan-nano) by Menlo Systems | |
| * [Qwen3‑4B‑Code‑Reasoning](https://huggingface.co/ertghiu256/qwen3-4b-code-reasoning) by ertghiu256 | |
| * MergeKit, SLERP, Hugging Face | |
| --- | |