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)# pip install -U transformers accelerate # 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=256) 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,38 +8,81 @@ tags:
|
|
| 8 |
- merge
|
| 9 |
|
| 10 |
---
|
| 11 |
-
# merged-medical-reasoning
|
| 12 |
|
| 13 |
-
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
This model was merged using the [SLERP](https://en.wikipedia.org/wiki/Slerp) merge method.
|
| 19 |
|
| 20 |
-
### Models Merged
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
| 33 |
-
base_model: Menlo/Jan-nano
|
| 34 |
|
| 35 |
-
|
| 36 |
-
- model: Menlo/Jan-nano
|
| 37 |
-
- model: ertghiu256/qwen3-4b-code-reasoning
|
| 38 |
|
| 39 |
-
|
| 40 |
-
t: 0.4 # 70% base (MedScholar), 30% Nemotron reasoning
|
| 41 |
|
| 42 |
-
|
| 43 |
-
tokenizer_source: Menlo/Jan-nano
|
| 44 |
|
| 45 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
- merge
|
| 9 |
|
| 10 |
---
|
|
|
|
| 11 |
|
|
|
|
| 12 |
|
| 13 |
+
# 🧠 AgenticCoder‑4B
|
| 14 |
+
|
| 15 |
+
**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.
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
## ✨ Key Features
|
| 20 |
+
|
| 21 |
+
- 🔁 **Agentic Planning & MCP Alignment**
|
| 22 |
+
Trained on datasets and architectures optimized for multi-step reasoning, task decomposition, and memory–contextual workflows.
|
| 23 |
+
|
| 24 |
+
- 💻 **Code Understanding & Reasoning**
|
| 25 |
+
Strong capabilities in Python code generation, script explanation, optimization, and multi-turn task development.
|
| 26 |
+
|
| 27 |
+
- 🧰 **Tool Use Simulation**
|
| 28 |
+
Handles realistic tool interaction prompts such as CSV analysis, OCR, and file parsing in code.
|
| 29 |
+
|
| 30 |
+
- 📦 **Compact & Efficient (4B)**
|
| 31 |
+
Lightweight enough for cost-efficient deployment, edge device integration, and fine-tuning.
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## 🛠️ Merge Details
|
| 36 |
+
|
| 37 |
+
- **Merge Method:** SLERP (`t = 0.4`)
|
| 38 |
+
- **Base Model:** [`Menlo/Jan-nano`](https://huggingface.co/Menlo/Jan-nano)
|
| 39 |
+
- **Merged With:** [`ertghiu256/qwen3-4b-code-reasoning`](https://huggingface.co/ertghiu256/qwen3-4b-code-reasoning)
|
| 40 |
+
- **Precision:** `float16`
|
| 41 |
+
- **Tokenizer Source:** `Menlo/Jan-nano`
|
| 42 |
+
|
| 43 |
|
|
|
|
| 44 |
|
|
|
|
| 45 |
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## 📎 Example Use Cases
|
| 49 |
|
| 50 |
+
```text
|
| 51 |
+
✅ "Design a 3-week beginner Python curriculum including AI tools."
|
| 52 |
+
✅ "Write a Python function to recursively scan JSON for a key, without using recursion."
|
| 53 |
+
✅ "Read a folder of images and extract text using OCR, save to files."
|
| 54 |
+
✅ "Summarize trends in a sales CSV and visualize monthly performance."
|
| 55 |
+
````
|
| 56 |
|
| 57 |
+
---
|
| 58 |
|
| 59 |
+
## 📁 License & Use
|
| 60 |
|
| 61 |
+
This model is provided for research and development use under the terms of the base models’ respective licenses. Please ensure compliance before commercial usage.
|
|
|
|
| 62 |
|
| 63 |
+
---
|
|
|
|
|
|
|
| 64 |
|
| 65 |
+
## 🧬 Citation
|
|
|
|
| 66 |
|
| 67 |
+
If you use this model, consider citing it as:
|
|
|
|
| 68 |
|
| 69 |
```
|
| 70 |
+
@misc{agenticcoder4b2025,
|
| 71 |
+
title={AgenticCoder-4B: A Compact Agent + Code Reasoning Model},
|
| 72 |
+
author={Yasser, M.},
|
| 73 |
+
year={2025},
|
| 74 |
+
url={https://huggingface.co/your-username/AgenticCoder-4B}
|
| 75 |
+
}
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## 🤝 Acknowledgements
|
| 81 |
+
|
| 82 |
+
* [Menlo/Jan-nano](https://huggingface.co/Menlo/Jan-nano) by Menlo Systems
|
| 83 |
+
* [Qwen3‑4B‑Code‑Reasoning](https://huggingface.co/ertghiu256/qwen3-4b-code-reasoning) by ertghiu256
|
| 84 |
+
* MergeKit, SLERP, Hugging Face
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
|